Example #1
0
 //
 public ActionResult Transactions(string sDate, string eDate, string resultID)
 {
     try
     {
         var startDate = DateTime.Parse(sDate);
         var endDate = DateTime.Parse(eDate);
         var db = new DataService();
         var json = db.GetTransaction("Transactions", startDate, endDate, resultID:resultID);
         return Json(json, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
Example #2
0
 public ActionResult GetRoutes(string sDate, string eDate, string Distributor, string Salesman)
 {
     try
     {
         var startDate = DateTime.Parse(sDate);
         var endDate = DateTime.Parse(eDate);
         var db = new DataService();
         var json = db.GetTransaction("Routes", startDate, endDate, Distributor,salesman:Salesman);
         return Json(json, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }
Example #3
0
 public ActionResult Locations(string Distributor, string Salesman, string Route, string Outlet, string sDate, string eDate, string MapType)
 {
     try
     {
         var startDate = DateTime.Parse(sDate);
         var endDate = DateTime.Parse(eDate);
         var db = new DataService();
         var json = db.GetTransaction("Locations", startDate, endDate,Distributor,Salesman,Route,"",Outlet, MapType);
         return Json(json, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json("", JsonRequestBehavior.AllowGet);
     }
 }