public ActionResult Index() { CustomerInvoiceSearch obj = (CustomerInvoiceSearch)Session["CustomerInvoiceSearch"]; CustomerInvoiceSearch model = new CustomerInvoiceSearch(); int branchid = Convert.ToInt32(Session["CurrentBranchID"].ToString()); int depotId = Convert.ToInt32(Session["CurrentDepotID"].ToString()); int yearid = Convert.ToInt32(Session["fyearid"].ToString()); if (obj == null) { DateTime pFromDate; DateTime pToDate; //int pStatusId = 0; pFromDate = CommanFunctions.GetFirstDayofMonth().Date; pToDate = CommanFunctions.GetLastDayofMonth().Date; obj = new CustomerInvoiceSearch(); obj.FromDate = pFromDate; obj.ToDate = pToDate; obj.InvoiceNo = ""; Session["CustomerInvoiceSearch"] = obj; model.FromDate = pFromDate; model.ToDate = pToDate; model.InvoiceNo = ""; } else { model = obj; } List <CustomerInvoiceVM> lst = PickupRequestDAO.GetInvoiceList(obj.FromDate, obj.ToDate, model.InvoiceNo, yearid); if (lst != null) { model.InvoiceTotal = Convert.ToDecimal(lst.Sum(cc => cc.InvoiceTotal).ToString()); // ReceiptDAO.GetCustomerInvoiceTotal(obj.FromDate, obj.ToDate); } model.Details = lst; return(View(model)); }
public ActionResult Table(CustomerInvoiceSearch model) { return(PartialView("Table", model)); }
public ActionResult Index(CustomerInvoiceSearch obj) { Session["CustomerInvoiceSearch"] = obj; return(RedirectToAction("Index")); }