public ActionResult GetLast24HrsDeftecsList() { ForceLoginController forceLogin = new ForceLoginController(); if (forceLogin.SaleForceLoginAuthentication()) { DataTable dt = Get24HrsDataSOQL(); if (dt != null) { Last24HrsData = LoadData(dt); ViewBag.Last24HrsCount = dt.Rows.Count; int numberOfClosedRecords = dt.Select("Escalation_Status__c = 'Closed'").Length; ViewBag.TodayClosedDefects = numberOfClosedRecords; //List<TicketData> ticketdata = LoadData(Server.MapPath("~/Source/TodaysDefects.csv")); var resultdata = Last24HrsData.GroupBy(t => t.EscalationStatus).Select(k => new { name = k.Key, y = k.Count() }); return(this.Json(resultdata, JsonRequestBehavior.AllowGet)); } else { return(null); } } else { return(null); } }
public void GetHighPriorityDefects() { ForceLoginController forceLogin = new ForceLoginController(); if (forceLogin.SaleForceLoginAuthentication()) { DataTable dt = GetHighPriorityDefectsSOQL(); int numberOfRecords = dt.AsEnumerable().Where(x => x["Priority__c"].ToString() == "High").ToList().Count; ViewBag.HighPriorityDefects = numberOfRecords; //ViewData["HighPriorityDefects"] = numberOfRecords; } else { ViewBag.HighPriorityDefects = "0"; } }
public void GetOverallNewDefects() { ForceLoginController forceLogin = new ForceLoginController(); if (forceLogin.SaleForceLoginAuthentication()) { DataTable dt = GetOverallNewDefectsSOQL(); if (dt != null) { int numberOfRecords = dt.AsEnumerable().Where(x => x["Escalation_Status__c"].ToString() == "New").ToList().Count; ViewBag.OverallNewDefects = numberOfRecords; //ViewData["OverallNewDefects"] = numberOfRecords; } } else { ViewBag.OverallNewDefects = "0"; } }
public ActionResult GetMyDefectsList() { ForceLoginController forceLogin = new ForceLoginController(); if (forceLogin.SaleForceLoginAuthentication()) { DataTable dt = GetMyDefectsData(); if (dt != null) { List <TicketData> ticketdata = LoadData(dt); //List<TicketData> ticketdata = LoadData(Server.MapPath("~/Source/Tickets.csv")); var resultdata = ticketdata.GroupBy(t => t.EscalationStatus).Select(k => new { name = k.Key, y = k.Count() }); return(this.Json(resultdata, JsonRequestBehavior.AllowGet)); } else { return(null); } } else { return(null); } }