Esempio n. 1
0
       public ActionResult ListCarts(DateTime? start, DateTime? end, int? stateValue)
       {
           var model = new ListCartsModel();
           try
           {
               if (!start.HasValue || !end.HasValue || !stateValue.HasValue)
               {
                   model = CartBuilder.BuildListCarts(dataService.GetCartsByDateAndStatus(DateTime.Now.Date, DateTime.Now.Date, 1), DateTime.Now.Date, DateTime.Now.Date, 1);
               }
               else
               {
                   model = CartBuilder.BuildListCarts(dataService.GetCartsByDateAndStatus(start.Value, end.Value, stateValue.Value), start.Value, end.Value, stateValue.Value);
               }
               
           }
           catch (Exception err)
           {

           }
           return View("ListCarts", model);
       }