public static List <PieChartInputs> GetChartDailyDrugsConsumed() { List <PieChartInputs> pieCharthartInputs = new List <PieChartInputs>(); DataSet _DataList = null; _DataList = DatabaseManager.Data.DBAccessManager.RetrieveChartDailyDrugsConsumed(); if (_DataList.Tables.Count > 0) { if (_DataList.Tables[0].Rows.Count > 0) { foreach (DataRow row in _DataList.Tables[0].Rows) { var pieCharthartInput = new PieChartInputs(); pieCharthartInput.label = row["DateLabel"].ToString(); pieCharthartInput.value = Int32.Parse(row["DrugsConsumed"].ToString()); pieCharthartInputs.Add(pieCharthartInput); } } } return(pieCharthartInputs); }
public static List <PieChartInputs> GetChartCattleTreatmentTypes() { List <PieChartInputs> pieCharthartInputs = new List <PieChartInputs>(); DataSet _DataList = null; _DataList = DatabaseManager.Data.DBAccessManager.RetrieveDashboardData(); if (_DataList.Tables.Count > 0) { if (_DataList.Tables[11].Rows.Count > 0) { foreach (DataRow row in _DataList.Tables[11].Rows) { var pieCharthartInput = new PieChartInputs(); pieCharthartInput.label = row["TypeName"].ToString(); pieCharthartInput.value = Int32.Parse(row["TypeCount"].ToString()); pieCharthartInputs.Add(pieCharthartInput); } } } return(pieCharthartInputs); }
public static List <PieChartInputs> GetMonthlyDrugPurchase() { List <PieChartInputs> pieCharthartInputs = new List <PieChartInputs>(); DataSet _DataList = null; _DataList = DatabaseManager.Data.DBAccessManager.RetrieveDashboardBarchartData(); if (_DataList.Tables.Count > 0) { if (_DataList.Tables[0].Rows.Count > 0) { foreach (DataRow row in _DataList.Tables[0].Rows) { var pieCharthartInput = new PieChartInputs(); pieCharthartInput.label = row["Label"].ToString(); pieCharthartInput.value = Int32.Parse(row["Procurement"].ToString()); pieCharthartInputs.Add(pieCharthartInput); } } } return(pieCharthartInputs); }