Exemple #1
0
        public ActionResult InProcessRequestForm(long?id)
        {
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();

            _model = _rep.Detail(id);
            return(View(_model));
        }
        public ActionResult InProcess(long?id)
        {
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();

            _model.Message = _rep.Process(id);
            TrainGeneralRepository.Message = _model.Message;
            ViewData["AgentList"]          = new SelectList(defaultProvider.GetAgentList(), "AgentId", "AgentName");
            return(RedirectToAction("RequestForm", new { @id = id }));
        }
Exemple #3
0
        public ActionResult InProcess(long?id)
        {
            var           ts     = (TravelSession)Session["TravelPortalSessionInfo"];
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();

            _model.Message = _rep.Process(id);
            TrainGeneralRepository.Message = _model.Message;
            ViewData["DisList"]            = new SelectList(defaultProvider.GetDistributorList(ts.LoginTypeId), "DistributorId", "DistributorName");
            return(RedirectToAction("RequestForm", new { @id = id }));
        }
Exemple #4
0
        public ActionResult InProcess(long?id)
        {
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();

            _msg   = _rep.Process(id);
            _model = _rep.Detail(id); _model.Message = _msg;
            TrainGeneralRepository.Message = _model.Message;
            ViewData["AgentList"]          = new SelectList(defaultProvider.GetAgentList(), "AgentId", "AgentName");
            return(View("Detail", _model));
        }
Exemple #5
0
        public ActionResult Book(long?id)
        {
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();

            _model = _rep.Detail(id);
            if (_model.Message.MsgNumber > 0)
            {
                TrainGeneralRepository.Message = _model.Message;
                return(View("Index"));
            }
            else
            {
                return(View(_model));
            }
        }
Exemple #6
0
        public ActionResult Edit(TrainPNRModel model)
        {
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();

            _model.Message = _rep.Edit(model);
            if (_model.Message.MsgNumber > 0)
            {
                TrainGeneralRepository.Message = _model.Message;
                return(RedirectToAction("Index"));
            }
            else
            {
                _model = _rep.Detail(model.TrainPNRId);
                return(View("Detail", _model));
            }
        }
Exemple #7
0
        public ActionResult Book(TrainPNRModel model)
        {
            TrainBookingRequestRepository _rep  = new TrainBookingRequestRepository();
            TrainBookingRequestRepository _rep1 = new TrainBookingRequestRepository();

            _msg          = _rep.Book(model);
            model         = _rep1.Detail(model.TrainPNRId);
            model.Message = _msg;
            if (_msg.MsgNumber > 0)
            {
                return(View(model));
            }
            else
            {
                return(View("Detail", model));
            }
        }
Exemple #8
0
        public ActionResult Edit(long?id)
        {
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();

            _model = _rep.Detail(id);
            //_model.ddlPrefixList = _rep.ddlPrefixList(_model.Passengers.FirstOrDefault().Prefix);
            _model.Message = _msg;
            if (_model.Message.MsgNumber > 0)
            {
                TrainGeneralRepository.Message = _model.Message;
                return(View("Index"));
            }
            else
            {
                return(View(_model));
            }
        }
Exemple #9
0
        public FileResult DownloadPNR(long?id)
        {
            TrainPNRModel _model = new TrainPNRModel();
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();
            var _fileName = _rep.IsValidFile(id);

            if (!string.IsNullOrEmpty(_fileName))
            {
                string filPath     = Path.Combine(TrainGeneralRepository.TrainPNRLocation, _fileName);
                string format      = _fileName.Substring(_fileName.Length - 3);
                string fileName    = "Train-PNR-" + id.ToString() + "." + format;
                string contentType = "application/" + format;
                return(File(filPath, contentType, fileName));
            }
            else
            {
                return(null);
            }
        }
Exemple #10
0
        public ActionResult InProcessRequestForm(long?id, TrainPNRModel _model)
        {
            TrainBookingRequestRepository _rep = new TrainBookingRequestRepository();
            TrainPNRModel _model1 = new TrainPNRModel();

            _model1 = _rep.Detail(id);


            string body = RenderPartialViewToString("VUC_RequestForm", _model1);

            try
            {
                _rep.SendEmail(body, _model.txtEmailTo, id);
                ViewData["isEmailSent"] = "Your email is right on the way, you'll get email in a minute.";
            }
            catch (Exception ex)
            {
                ViewData["isEmailSent"] = "Unable to Send Email";
            }

            return(View("RequestForm", _model1));
        }