public virtual ActionResult CashControlStoredProcedure(string name) { ReportModel rep = new ReportModel(); Dictionary<int, string> connectionString = (Dictionary<int, string>)Session["ConnectionString"]; string storeNameConnectionString = ""; if (connectionString.ContainsKey(1)) { storeNameConnectionString = connectionString[1]; } if (!ValidationUtility.IsNull(name)) { DateTime selectDate = ValidationUtility.ToDate(name); DataSet report = rep.GetControlSheet(selectDate, storeNameConnectionString); // return View(report); if (report != null && report.Tables[0].Rows.Count > 0) { return View(report); } else { ViewBag.Message = " Exception occured in fetching data "; return View(); } } else { DataSet report = rep.GetControlSheet(DateTime.Now, storeNameConnectionString); if (report != null && report.Tables.Count > 0) { return View(report); } else { ViewBag.Message = " Exception occured in fetching data "; return View(); } } }
public virtual ActionResult GetStorName(string storeName) { Dictionary<string, string> connectionString = (Dictionary<string, string>)Session["ConnectionString"]; string storeNameConnectionString = "POS1"; if (connectionString.ContainsKey("POS1")) { storeNameConnectionString = connectionString["POS1"]; } ReportModel rep = new ReportModel(); DataSet report = rep.GetControlSheet(DateTime.Now, storeNameConnectionString); if (report != null && report.Tables.Count > 0) { return View("CashControlStoredProcedure", report); } else { ViewBag.Message = " Exception occured in fetching data "; return View("CashControlStoredProcedure"); } }