public ActionResult PDFView(Models.OfflineBookingModel model) { //Models.OfflineBookingModel data = new Models.OfflineBookingModel(); //try //{ // string date1 = Request["FromDate"]; // string date2 = Request["ToDate"]; // DateTime FromDate = Convert.ToDateTime(date1); // DateTime ToDate = Convert.ToDateTime(date2); // //data.SupplierInvList = BLayer.SupplierInvoice.getSupplierInvoiceList_Report(0, 0, FromDate, ToDate); // List<CLayer.OfflineBooking> data = BLayer.OfflineBooking.CustomerInvoiceReport(); //} //catch (Exception ex) //{ // Common.LogHandler.HandleError(ex); //} string date1 = Request["FromDate"]; string date2 = Request["ToDate"]; string SearchString = Request["SearchString"]; DateTime FromDate = Convert.ToDateTime(date1); DateTime ToDate = Convert.ToDateTime(date2); List <CLayer.OfflineBooking> data = BLayer.OfflineBooking.CustomerInvoiceReport(SearchString, LIMIT, FromDate, ToDate); return(new ViewAsPdf("PDFView", data) { PageOrientation = Rotativa.Options.Orientation.Landscape }); //return View("~/Areas/Admin/Views/SupplierInvoiceReport/_ReportList.cshtml", data); }
public ActionResult ReportPdf(long OfflineBookingId) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); data.OfflineBookingId = OfflineBookingId; ViewBag.submitenable = "No"; return(new ViewAsPdf("~/Areas/Admin/Views/OfflineBooking/BookingDataPreview.cshtml", data)); }
public ActionResult Pager(Models.OfflineBookingModel model) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); try { string date1 = Request["FromDate"]; string date2 = Request["ToDate"]; DateTime FromDate = Convert.ToDateTime(date1); DateTime ToDate = Convert.ToDateTime(date2); data.FromDate = FromDate; data.ToDate = ToDate; data.OfflineBookingList = BLayer.SupplierInvoice.getSupplierInvoicePendings_Report((model.currentPage - 1) * model.Limit, model.Limit, FromDate, ToDate); data.currentPage = model.currentPage; data.Limit = model.Limit; if (data.OfflineBookingList.Count() > 0) { data.TotalRows = data.OfflineBookingList[0].TotalRows; } } catch (Exception ex) { Common.LogHandler.HandleError(ex); } return(View("~/Areas/Admin/Views/SupplierInvoicePendingReport/_ReportList.cshtml", data)); }
public void SaveGST(Models.OfflineBookingModel model, int CustID) { long custgststeid = 0; try { CLayer.OfflineBooking data = new CLayer.OfflineBooking(); data.SubCustomerAddress = model.SubCustomerAddress; data.SubCustomerCity = model.SubCustomerCity; data.SubCustomerCityname = model.SubCustomerCityname; data.SubCustomerpinCode = model.SubCustomerpinCode; data.SubCustomerGstRegNo = model.GSTRegistrationNo; data.SubCustomerGstStateId = Convert.ToInt32(model.StateOfRegistration); data.SubCustomerid = CustID; data.CustomerTableType = 2; data.OffGSTId = model.OffGSTId; BLayer.OfflineBooking.SaveGSTIn(data); } catch (Exception ex) { Common.LogHandler.HandleError(ex); } // }
public ActionResult Filter(Models.OfflineBookingModel data) { if (data.SearchString == null) { data.SearchString = ""; } // if (data.SearchString == "") data.SearchValue = 0; data.SearchStringCache = data.SearchString; data.SearchValue = 0; List <CLayer.OfflineBooking> cutomers = BLayer.OfflineBooking.GetAlCustomerList(data.SearchString, 0, PAGER_SIZE); data.CustomCustomerList = cutomers; // data.SearchString = ""; data.SearchValue = 0; // data.SearchStringCache = ""; data.CustomCustomerList = cutomers; data.TotalRows = 0; if (cutomers.Count > 0) { data.TotalRows = cutomers[0].TotalRows; } data.Limit = PAGER_SIZE; data.currentPage = 1; // ViewBag.Filter = data; return(View("Index", data)); }
public ActionResult Pager(Models.OfflineBookingModel data) { if (data.SearchStringCache == null) { data.SearchStringCache = ""; } // if (data.SearchString == "") data.SearchValue = 0; List <CLayer.OfflineBooking> cutomers = BLayer.OfflineBooking.GetAlCustomerList(data.SearchStringCache, (data.currentPage - 1) * PAGER_SIZE, PAGER_SIZE); ViewBag.Filter = new Models.UserSearchModel(); Models.OfflineBookingModel forPager = new Models.OfflineBookingModel() { SearchStringCache = data.SearchStringCache, SearchValue = data.SearchValue, CustomCustomerList = cutomers, TotalRows = 0, Limit = PAGER_SIZE, currentPage = data.currentPage }; if (cutomers.Count > 0) { forPager.TotalRows = cutomers[0].TotalRows; } forPager.CustomCustomerList = cutomers; // ViewBag.Filter = forPager; return(PartialView("List", forPager)); }
public ActionResult Index() { Models.OfflineBookingModel model = new Models.OfflineBookingModel(); List <CLayer.OfflineBooking> Customer = BLayer.OfflineBooking.GetAlCustomerList("", 0, PAGER_SIZE); model.CustomCustomerList = Customer; model.SearchString = ""; model.SearchValue = 0; model.SearchStringCache = ""; model.CustomCustomerList = Customer; model.TotalRows = 0; if (Customer.Count > 0) { model.TotalRows = Customer[0].TotalRows; } model.Limit = PAGER_SIZE; model.currentPage = 1; ViewBag.Filter = model; return(View(model)); }
public ActionResult GSTList(int custid) { Models.OfflineBookingModel model = new Models.OfflineBookingModel(); List <CLayer.OfflineBooking> GSTList = BLayer.OfflineBooking.GetGSTList(custid); model.CustomCustomerList = GSTList; return(View("OfflineBookingCustomerGST", model)); }
public ActionResult ExcelReport(CLayer.OfflineBooking model) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); DataTable Reportlist = new DataTable(); try { string date1 = Request["FromDate"]; string date2 = Request["ToDate"]; string SearchString = Request["SearchString"]; DateTime FromDate = Convert.ToDateTime(date1); DateTime ToDate = Convert.ToDateTime(date2); string FromDates = FromDate.ToString("MMMM dd, yyyy"); string FromDatesonlyDate = DateTime.Parse(FromDates).ToShortDateString(); string ToDates = ToDate.ToString("MMMM dd, yyyy"); string ToDatesonlyDate = DateTime.Parse(ToDates).ToShortDateString(); string email = User.Identity.GetUserName(); long LoginUserid = BLayer.User.GetUserId(email); Reportlist = BLayer.OfflineBooking.GSTInvoiceReport(SearchString, LIMIT, FromDate, ToDate, LoginUserid); ViewBag.Filter = new Models.GrossMarrginReportModel(); // data.OfflineBookingList = Reportlist; Models.OfflineBookingModel forPager = new Models.OfflineBookingModel() { SearchString = data.SearchString, SearchValue = data.SearchValue, FromDate = data.FromDate, ToDate = data.ToDate, TotalRows = 0, Limit = 2000, currentPage = data.currentPage }; //if (Reportlist.Count > 0) //{ // forPager.TotalRows = Reportlist[0].TotalRows; //} ViewBag.Filter = forPager; } catch (Exception ex) { Common.LogHandler.HandleError(ex); } Response.ContentType = "application/vnd.ms-excel"; Response.AppendHeader("content-disposition", "attachment; filename=report.xls"); Response.Charset = ""; return(View("~/Areas/Admin/Views/GSTInvoiceReport/Excel.cshtml", Reportlist)); }
public ActionResult CreateCustomer(Models.OfflineBookingModel model) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); if (model.CustomerId != 0) { return(View(model)); } else { return(View(data)); } }
public ActionResult ExcelReport(CLayer.OfflineBooking model, bool IsExcelDownload = true) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); DataTable Reportlist = null; try { string date1 = Request["FromDate"]; string date2 = Request["ToDate"]; string SearchString = Request["SearchString"]; DateTime FromDate = Convert.ToDateTime(date1); DateTime ToDate = Convert.ToDateTime(date2); string FromDates = FromDate.ToString("MMMM dd, yyyy"); string FromDatesonlyDate = DateTime.Parse(FromDates).ToShortDateString(); string ToDates = ToDate.ToString("MMMM dd, yyyy"); string ToDatesonlyDate = DateTime.Parse(ToDates).ToShortDateString(); Reportlist = BLayer.OfflineBooking.BankUploadReport(SearchString, LIMIT, FromDate, ToDate, true); ViewBag.Filter = new Models.GrossMarrginReportModel(); data.OfflineBookingTable = Reportlist; Models.OfflineBookingModel forPager = new Models.OfflineBookingModel() { SearchString = data.SearchString, SearchValue = data.SearchValue, FromDate = data.FromDate, ToDate = data.ToDate, TotalRows = 0, Limit = 2000, currentPage = data.currentPage }; if (Reportlist.Rows.Count > 0) { forPager.TotalRows = Convert.ToInt64(Reportlist.Rows.Count); } ViewBag.Filter = forPager; } catch (Exception ex) { Common.LogHandler.HandleError(ex); } return(new FileStreamResult(DataTableToExcel.GetExcelStream(Reportlist, "Report", false, null, null, null), DataTableToExcel.CONTENT_TYPE_XLSX) { FileDownloadName = "BankPaymentReport.xlsx" }); }
public ActionResult ReportPrint(Models.OfflineBookingModel model) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); try { string date1 = Request["FromDate"]; string date2 = Request["ToDate"]; DateTime FromDate = Convert.ToDateTime(date1); DateTime ToDate = Convert.ToDateTime(date2); data.OfflineBookingList = BLayer.SupplierInvoice.getSupplierInvoicePendings_Report(0, 0, FromDate, ToDate); } catch (Exception ex) { Common.LogHandler.HandleError(ex); } return(View("PDF", data)); }
public ActionResult GetCorporategstDetailsById(long B2bGSTId) { Models.OfflineBookingModel model = new Models.OfflineBookingModel(); try { CLayer.OfflineBooking GstDetails = BLayer.OfflineBooking.GetOfflinegstDetailsById(B2bGSTId); model.HiddenSubCustomerCity = GstDetails.SubCustomerCity; model.HiddenSubCustomerCityname = GstDetails.SubCustomerCityname; model.HiddenSubCustomerAddress = GstDetails.SubCustomerAddress; model.HiddenSubCustomerpinCode = GstDetails.SubCustomerpinCode; model.HiddenSubCustomerGstRegNo = GstDetails.SubCustomerGstRegNo; } catch (Exception ex) { Common.LogHandler.HandleError(ex); } return(View("~/Areas/Admin/Views/OfflineBookingGST/HiddenGstAddress.cshtml", model)); }
public ActionResult LoadList() { Models.OfflineBookingModel search = new Models.OfflineBookingModel(); long userId = GetUserId(); List <CLayer.OfflineBooking> users = BLayer.OfflineBooking.GetAllForSearch("", 1, 0, 25, 1, userId); search.SearchString = ""; search.SearchValue = 1; search.TotalRows = 0; search.OfflineBookingList = users; search.SaveStatus = 1; if (users.Count > 0) { search.TotalRows = users[0].TotalRows; } search.Limit = 25; search.currentPage = 1; ViewBag.Filter = search; return(PartialView("~/Areas/Admin/Views/OfflineBookingList/_List.cshtml", users)); }
public ActionResult ExcelView(Models.OfflineBookingModel model) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); try { string date1 = Request["FromDate"]; string date2 = Request["ToDate"]; DateTime FromDate = Convert.ToDateTime(date1); DateTime ToDate = Convert.ToDateTime(date2); data.OfflineBookingList = BLayer.SupplierInvoice.getSupplierInvoicePendings_Report(0, 0, FromDate, ToDate); } catch (Exception ex) { Common.LogHandler.HandleError(ex); } Response.ContentType = "application/vnd.ms-excel"; Response.AppendHeader("content-disposition", "attachment; filename=SupplierInvoicePendingReport.xls"); Response.Charset = ""; return(View("~/Areas/Admin/Views/SupplierInvoicePendingReport/Excel.cshtml", data)); }
public ActionResult Index() { Models.OfflineBookingModel search = new Models.OfflineBookingModel(); long userId = GetUserId(); List <CLayer.OfflineBooking> users = BLayer.OfflineBooking.GetAllForSearch("", 1, 0, 25, 1, userId); search.SearchString = ""; search.SearchValue = 1; search.TotalRows = 0; search.OfflineBookingList = users; search.SaveStatus = 1; if (users.Count > 0) { search.TotalRows = users[0].TotalRows; } search.Limit = 25; search.currentPage = 1; ViewBag.Filter = search; return(View(search)); }
public ActionResult PDFView(Models.OfflineBookingModel model) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); try { string date1 = Request["FromDate"]; string date2 = Request["ToDate"]; DateTime FromDate = Convert.ToDateTime(date1); DateTime ToDate = Convert.ToDateTime(date2); data.OfflineBookingList = BLayer.SupplierInvoice.getSupplierInvoicePendings_Report(0, 0, FromDate, ToDate); } catch (Exception ex) { Common.LogHandler.HandleError(ex); } return(new ViewAsPdf("PDF", data) { PageOrientation = Rotativa.Options.Orientation.Landscape }); }
public ActionResult Index() { Models.OfflineBookingModel model = new Models.OfflineBookingModel(); try { model.FromDate = DateTime.Now.AddDays(NOOF_DAYS); model.ToDate = DateTime.Now; model.OfflineBookingList = BLayer.SupplierInvoice.getSupplierInvoicePendings_Report(0, LIMIT, model.FromDate, model.ToDate); model.currentPage = 1; model.Limit = LIMIT; if (model.OfflineBookingList.Count() > 0) { model.TotalRows = model.OfflineBookingList[0].TotalRows; } } catch (Exception ex) { Common.LogHandler.HandleError(ex); } return(View(model)); }
public ActionResult EditCustomer(long CustomerId) { Models.OfflineBookingModel data = new Models.OfflineBookingModel(); CLayer.OfflineBooking model = BLayer.OfflineBooking.GetOfflineBookingCustomerDetailsByID(CustomerId); data.CustomerId = model.CustomerId; data.CustomerName1 = model.CustomerName; data.CustomerEmail1 = model.CustomerEmail; data.CustomerMobile1 = model.CustomerMobile; data.CustomerCountry1 = model.CustomerCountry; data.CustomerState1 = model.CustomerState; data.CustomerCity1 = model.CustomerCity; data.CustomerCityname = model.CustomerCityname; data.BillingCountryId = model.BillingCountryId; data.CustomerAddress1 = model.CustomerAddress; data.CustomerType = model.CustomerType; data.BillingAddress = model.BillingAddress; data.BillingState = model.BillingState; data.BillingCity = model.BillingCity; data.PinCode = model.PinCode; data.BillingMobile = model.BillingMobile; data.ContactPerson = model.ContactPerson; data.OfficeNO = model.OfficeNO; //data.GuestName1 = model.GuestName1; //data.GuestEmail1 = model.GuestEmail1; data.BillingCityname = model.BillingCityname; data.CustomerpinCode = model.CustomerpinCode; data.NoInvoiceMail = model.NoInvoiceMail; data.CustomerPaymentMode = model.CustomerPaymentMode; data.CreditDays = model.CreditDays; //data.LoadCustomerGstStatesExceptIncludedByCustomerId(model.CustomerId); // data.LoadPlaces(); //List<CLayer.OfflineBooking> Bookings = BLayer.OfflineBooking.GetAllBookingsByCusPropId(CustomPropertyId, 0, 25); //data.BookedpropertyList = Bookings; return(View("EditCustomer", data)); }
public ActionResult Pager(Models.ExternalInventoryBookingRequestModel data) { if (data.SearchString == null) { data.SearchString = ""; } List <CLayer.BookingExternalInventory> users = BLayer.BookingExternalInventory.GetAllForSearch(data.SearchString, data.SearchValue, (data.currentPage - 1) * data.Limit, data.Limit, data.SaveStatus); ViewBag.Filter = new Models.OfflineBookingModel(); Models.OfflineBookingModel forPager = new Models.OfflineBookingModel() { SearchString = data.SearchString, SearchValue = data.SearchValue, TotalRows = 0, Limit = 25, currentPage = data.currentPage }; if (users.Count > 0) { forPager.TotalRows = users[0].TotalRows; } ViewBag.Filter = forPager; return(PartialView("_List", users)); }
public ActionResult SaveCustomer(Models.OfflineBookingModel model) { long OfflineCustomerMasterId = 0; long CustID = model.CustomerId; try { CLayer.OfflineBooking data = new CLayer.OfflineBooking(); data.CustomerId = model.CustomerId; data.CustomerName1 = model.CustomerName1; data.CustomerEmail1 = model.CustomerEmail1; data.CustomerMobile1 = model.CustomerMobile1; data.CustomerCountry = model.CustomerCountry1; data.CustomerState = model.CustomerState1; if (model.CustomerCityname == null) { model.CustomerCityname = ""; } data.CustomerCity = model.CustomerCity1; //data.CustomerCity = -1; // other data.CustomerCityname = model.CustomerCityname; data.BillingCountryId = model.BillingCountryId; data.CustomerAddress = model.CustomerAddress1; data.CustomerType = model.CustomerType; data.BillingAddress = model.BillingAddress; data.BillingState = model.BillingState; if (model.BillingCityname == null) { model.BillingCityname = ""; } //if (model.BillingCityname == "") data.BillingCity = model.BillingCity; //else // data.BillingCity = -1; //other data.PinCode = model.PinCode; data.BillingMobile = model.BillingMobile; data.ContactPerson = model.ContactPerson; data.OfficeNO = model.OfficeNO; data.GuestName1 = model.GuestName1; data.GuestEmail1 = model.GuestEmail1; data.BillingCityname = model.BillingCityname; data.CustomerpinCode = model.CustomerpinCode; data.NoInvoiceMail = model.NoInvoiceMail; data.CustomerPaymentMode = model.CustomerPaymentMode; data.CreditDays = model.CreditDays; long OfflineCustomerId = BLayer.OfflineBooking.EditOfflineBookingCustomer(data); //Save to customer master table data.CustomerName = model.CustomerName1; data.CustomerEmail = model.CustomerEmail1; data.CustomerMobile = model.CustomerMobile1; OfflineCustomerMasterId = BLayer.OfflineBooking.SaveMasterOfflineBookingCustomer(data); //Update Noinvoicemail bool (name,email,usertype) data.CustomerId = OfflineCustomerId; BLayer.OfflineBooking.UpdateNoinvoicemail(data); model.CustomerId = OfflineCustomerId; ViewBag.hidtypeid = model.CustomerType; ViewBag.hidcustid = OfflineCustomerId; } catch (Exception ex) { Common.LogHandler.HandleError(ex); } //ViewBag.Message = "Customer details updated"; TempData["Success"] = (CustID) > 0? "Customer details updated": "Customer details added"; return(RedirectToAction("EditCustomer", new { CustomerId = OfflineCustomerMasterId })); }