Exemple #1
0
        public ActionResult GenerateBilling(GenerateBillingViewModel model)
        {
            if (ModelState.IsValid)
            {
                var start    = DateTime.Parse(model.StartDateTime);
                var end      = DateTime.Parse(model.EndDateTime);
                var billings = BillingHelper.GetBillingsGrouppedByParking(start, end);

                return(Json(new { Success = true, Content = RenderRazorViewToString("_BillingPartial", billings) }));
            }

            return(Json(new { Success = false, Content = RenderRazorViewToString("_GenerateBillingPartial", model) }));
        }