public ActionResult Index(ExportModel Expmodel, TrainBookingRequestModel model, FormCollection frm, int?page) { TrainBookingRequestRepository _rep = new TrainBookingRequestRepository(); var ts = (TravelSession)Session["TravelPortalSessionInfo"]; model.StatusId = 1; model.PagedList = _rep.GetBrachPendingBookingPagedList(model, page, ts.LoginTypeId); ViewData["DisList"] = new SelectList(defaultProvider.GetDistributorList(ts.LoginTypeId), "DistributorId", "DistributorName"); if (TrainGeneralRepository.Message != null) { model.Message = TrainGeneralRepository.Message; } else { model.Message = _msg; } GetExportTypeClicked(Expmodel, frm); if (Expmodel != null && (Expmodel.ExportTypeExcel != null || Expmodel.ExportTypeWord != null || Expmodel.ExportTypeCSV != null || Expmodel.ExportTypePdf != null)) { try { if (Expmodel.ExportTypeExcel != null) { Expmodel.ExportTypeExcel = Expmodel.ExportTypeExcel; } else if (Expmodel.ExportTypeWord != null) { Expmodel.ExportTypeWord = Expmodel.ExportTypeWord; } else if (Expmodel.ExportTypePdf != null) { Expmodel.ExportTypePdf = Expmodel.ExportTypePdf; } var exportData = _rep.BranchList(model, ts.LoginTypeId).Select(m => new { SNo = m.SNo, Passenger_Name = m.FullName, Sector = m.Sector, DepartureDate = m.DepartureDate, RequestDate = m.CreateDate, TicketStatusName = m.StatusName, RequestBy = m.CreatedByName, Request_ID = "AH-TR-" + m.TrainPNRId.ToString().PadLeft(5, '0') }); App_Class.AppCollection.Export(Expmodel, exportData, "TrainBookingRequestList"); } catch (Exception ex) { ATLTravelPortal.Utility.ErrorLogging.LogException(ex); } } return(View(model)); }
public ActionResult Process(int?page, TrainBookingRequestModel _model) { TrainBookingRequestRepository _rep = new TrainBookingRequestRepository(); var ts = (TravelSession)Session["TravelPortalSessionInfo"]; _model.StatusId = 7; _model.PagedList = _rep.GetBranchProcessBookingPagedList(_model, page, ts.LoginTypeId); if (TrainGeneralRepository.Message != null) { _model.Message = TrainGeneralRepository.Message; } else { _model.Message = _msg; } ViewData["DisList"] = new SelectList(defaultProvider.GetDistributorList(ts.LoginTypeId), "DistributorId", "DistributorName"); return(View(_model)); }
public ActionResult Issued(int?page, TrainBookingRequestModel _model) { //TrainBookingRequestModel _model = new TrainBookingRequestModel(); TrainBookingRequestRepository _rep = new TrainBookingRequestRepository(); _model.StatusId = 4; _model.PagedList = _rep.GetPendingBookingPagedList(_model, page); if (TrainGeneralRepository.Message != null) { _model.Message = TrainGeneralRepository.Message; } else { _model.Message = _msg; } ViewData["AgentList"] = new SelectList(defaultProvider.GetAgentList(), "AgentId", "AgentName"); return(View(_model)); }