public ActionResult Agent() { ViewBag.sDate = DateTime.Now.ToString("dd/MM/yyyy"); ViewBag.eDate = DateTime.Now.ToString("dd/MM/yyyy"); var agents = _user.GetAll(); ViewBag.Agents = agents; if (agents.Count() > 0) { ViewBag.currentAgent = agents[0].UserId; ViewBag.currentAgentName = agents[0].DisplayName; } else { ViewBag.currentAgent = 0; ViewBag.currentAgentName = "Agent Dashbord"; } var dt = _vComplaint.FilterComplaint(DateTime.Now.Date, DateTime.Now.Date, 0, 0, 0, agents[0].UserId); ViewBag.dts = dt; DashboardViewModel obj = new DashboardViewModel(); obj.TotalUnresolved = dt.Where(c => c.SolutionStatus.ToUpper() != "RESOLVED FULLY").ToList().Count(); obj.TotalClosed = dt.Where(c => c.ComplaintStatus.ToUpper() == "CLOSED").ToList().Count(); obj.TotalComplaint = dt.Count(); obj.TotalResolved = dt.Where(c => c.SolutionStatus.ToUpper() == "RESOLVED FULLY").ToList().Count(); var ct = GetAgentChartData(DateTime.Now, DateTime.Now, (int)ViewBag.currentAgent); if (ct.series.Count() > 0) { ViewBag.Chart = _app.GetChart(ChartTypes.Column, "Complaints Chart", ct.data.ToArray(), ct.series.ToArray(), Color.White, Color.White, $"Complaints from {DateTime.Now.ToString("MMM dd, yyyy")} To {DateTime.Now.ToString("MMM dd, yyyy")}", "Complaint Code", "No.of Complaints"); } else { ViewBag.Chart = new Highcharts("columnchart"); } return(View(obj)); }
public ActionResult Index(DateTime date, int complaintStatus, int complaintType, int solnStatus, int agent) { ViewBag.Date = date; ViewBag.ComplaintType = _complaintType.GetAll(); ViewBag.currentType = complaintType; ViewBag.ComplaintStatus = _complaintStatus.GetAll(); ViewBag.currentStatus = complaintStatus; ViewBag.SolutionStatus = _slnStatus.GetAll(); ViewBag.currentSolutionStatus = solnStatus; ViewBag.Agents = _user.GetAll(); ViewBag.currentAgent = agent; var complaints = _vComplaint.FilterComplaint(date, date, complaintType, complaintStatus, solnStatus, agent).Where(c => c.ComplaintStatus.ToUpper() != "CLOSED").ToList(); return(View(complaints)); }
public ActionResult Index(DateTime date, int complaintStatus, int complaintType, int solnStatus, int supportUser, int complaintUser) { ViewBag.Date = date; ViewBag.ComplaintType = _complaintType.GetAll(); ViewBag.currentType = complaintType; ViewBag.ComplaintStatus = _complaintStatus.GetAll(); ViewBag.currentStatus = complaintStatus; ViewBag.SolutionStatus = _slnStatus.GetAll(); ViewBag.currentSolutionStatus = solnStatus; ViewBag.Users = _user.GetAll(); ViewBag.currentSupportUser = supportUser; ViewBag.currentComplaintUser = complaintUser; var complaints = _vComplaint.FilterComplaintBySupportUser(date, date, complaintType, complaintStatus, solnStatus, supportUser, complaintUser).Where(c => c.ComplaintStatus.ToUpper() != "CLOSED").ToList(); return(View(complaints)); }