public static Graph30DaysComplains loadlast30DaysComplains(string selDate) { try { Graph30DaysComplains list = new Graph30DaysComplains(); if (dt_30Com == null) { dt_30Com = new DataTable(); } if (obj == null) { obj = new MethodCalling(); } dt_30Com = obj.Getlast30DaysComplains(selDate); foreach (DataRow row in dt_30Com.Rows) { last30DaysComplains data = new last30DaysComplains(); data.y = Convert.ToInt32(row["Count"]); data.x = row["Period"].ToString(); list.last30DaysComplainsOnCall.Add(data); } return(list); } catch (Exception ex) { throw ex; } }
public static AllGraphLoading loadAllGraph() { try { AllGraphLoading list = new AllGraphLoading(); if (dt_CC == null) { dt_CC = new DataTable(); } if (dt_IC == null) { dt_IC = new DataTable(); } if (dt_DC == null) { dt_DC = new DataTable(); } if (dt_30Com == null) { dt_30Com = new DataTable(); } if (obj == null) { obj = new MethodCalling(); } dt_CC = obj.GetComplainsViaCustomer(); if (dt_CC.Rows.Count > 0) { foreach (DataRow row in dt_CC.Rows) { BarChart data = new BarChart(); data.y = Convert.ToInt32(row["ComplainsCount"].ToString()); data.label = row["Customer"].ToString(); list.Top10Chart.Add(data); } } dt_DC = obj.GetComplainDetailsviaDepart(); if (dt_DC.Rows.Count > 0) { foreach (DataRow row in dt_DC.Rows) { BarChart data = new BarChart(); data.y = Convert.ToInt32(row["ComplainCount"].ToString()); data.label = row["AssignDepartment"].ToString(); list.DepartChart.Add(data); } } dt_IC = obj.GetComplainsViaInfra(); if (dt_IC.Rows.Count > 0) { foreach (DataRow row in dt_IC.Rows) { PieChart data = new PieChart(); data.y = Convert.ToInt32(row["ComplainsCount"].ToString()); data.indexLabel = row["Infra"].ToString(); list.InfrPieChart.Add(data); } } dt_30Com = obj.Getlast30DaysComplains(SelectDate); foreach (DataRow row in dt_30Com.Rows) { last30DaysComplains data = new last30DaysComplains(); data.y = Convert.ToInt32(row["Count"]); data.x = row["Period"].ToString(); list.last30DaysComplains.Add(data); } return(list); } catch (Exception ex) { throw ex; } }