Remove CRM bits

This commit is contained in:
2016-08-25 13:05:31 -04:00
parent a5fcb46e04
commit b57c5ae41c
42 changed files with 0 additions and 1471 deletions
@@ -1,47 +0,0 @@
using System;
using System.Linq;
using System.Web.Mvc;
using AutoMapper.QueryableExtensions;
using InventoryTraker.Web.Data;
using InventoryTraker.Web.Models;
using InventoryTraker.Web.Utilities;
namespace InventoryTraker.Web.Controllers
{
public class ReportController : ControllerBase
{
private readonly AppDbContext _context;
public ReportController(AppDbContext context)
{
_context = context;
}
public ActionResult Index()
{
return View();
}
public JsonResult NewCustomers()
{
var startOfMonth = DateTime.Today.ToStartOfMonth();
var endOfMonth = DateTime.Today.ToEndOfMonth();
var customers = _context.Customers.Where(x => x.CreateDate >= startOfMonth && x.CreateDate <= endOfMonth)
.ProjectTo<NewCustomerReportViewModel>().ToArray();
return BetterJson(customers);
}
public JsonResult LostCustomers()
{
var startOfMonth = DateTime.Today.ToStartOfMonth();
var endOfMonth = DateTime.Today.ToEndOfMonth();
var customers = _context.Customers.Where(x => x.TerminationDate >= startOfMonth && x.TerminationDate <= endOfMonth)
.ProjectTo<LostCustomerReportViewModel>().ToArray();
return Json(customers);
}
}
}