示例#1
0
        public IActionResult SetConfirmBooking(DepatureInfoGetReq request)
        {
            HandoverViewModel model    = new HandoverViewModel();
            string            UserName = ckUserEmailId;
            string            msg      = "";
            string            status   = "";

            ConfirmBookingSetRes confirmBookingSetRes = handoverMapping.SetGoAheadConfirmMessage(token, request.QRFID, UserName, request.DepatureId);

            if (confirmBookingSetRes?.ResponseStatus?.Status?.ToLower() == "success")
            {
                foreach (var item in request.DepatureId)
                {
                    model = handoverMapping.SetConfirmBooking(token, request.QRFID, UserName, new List <long>()
                    {
                        item
                    });
                }
            }
            status = "Success";
            msg    = "Booking Confirmation done successfully.";
            return(Json(new
            {
                message = msg,
                msgstatus = status
            }));
        }
示例#2
0
        public HandoverViewModel GetHandover(string token, string QRFID)
        {
            HandoverViewModel model = new HandoverViewModel();

            model = GetSalesOfficerHeraderInfo(QRFID, token);
            return(model);
        }
示例#3
0
        public IActionResult Handover(string QRFID)
        {
            HandoverViewModel model = new HandoverViewModel();

            model = handoverMapping.GetHandover(token, QRFID);
            model.DepatureInfo = handoverMapping.GetGoAheadDeparturesDetails(token, QRFID);

            return(View("Handover/Handover", model));
        }
示例#4
0
        public HandoverViewModel SetConfirmBooking(string token, string QRFID, string username, List <long> DepatureId = null)
        {
            HandoverViewModel model = new HandoverViewModel();

            model.MenuViewModel.QRFID = QRFID;
            ConfirmBookingGetReq confirmBookingGetReq = new ConfirmBookingGetReq()
            {
                QRFID = QRFID, UserName = username, DepatureId = DepatureId
            };
            ConfirmBookingGetRes res = handoverProviders.GoAheadQuotes(confirmBookingGetReq, token).Result;

            model.ResponseStatus = res != null ? res.ResponseStatus != null ? res.ResponseStatus : new ResponseStatus() : new ResponseStatus(); return(model);
        }
示例#5
0
        public HandoverViewModel GetSalesOfficerHeraderInfo(string QRFID, string token)
        {
            HandoverViewModel model = new HandoverViewModel();

            model.MenuViewModel.QRFID    = QRFID;
            model.MenuViewModel.MenuName = "Handover";

            #region Get Costing Officer Tour Info Header By QRFId
            NewQuoteViewModel modelQuote = new NewQuoteViewModel();
            modelQuote.QRFID                    = QRFID;
            model.COHeaderViewModel             = cOCommonLibrary.GetCOTourInfoHeader(ref modelQuote, token);
            model.MenuViewModel.EnquiryPipeline = modelQuote.mdlMenuViewModel.EnquiryPipeline;
            #endregion
            return(model);
        }
示例#6
0
        public IActionResult GetGoAheadDeparturesDetails(DepatureInfoGetReq depatureInfoGetReq)
        {
            HandoverViewModel model = new HandoverViewModel();

            model.DepatureInfo = handoverMapping.GetGoAheadDeparturesDetails(token, depatureInfoGetReq.QRFID);

            if (model.DepatureInfo != null && model.DepatureInfo.Count > 0)
            {
                if (depatureInfoGetReq.DepatureId != null && depatureInfoGetReq.DepatureId.Count > 0)
                {
                    bool flag = false;
                    model.DepatureInfo.ForEach(a =>
                    {
                        if (depatureInfoGetReq.DepatureId.Contains(a.DepatureId))
                        {
                            if (flag == false && string.IsNullOrEmpty(a.ConfirmMessage))
                            {
                                flag = true;
                                a.IsShowProcessing = true;
                            }
                            else if (!string.IsNullOrEmpty(a.ConfirmMessage) && a.ConfirmMessage.ToLower() != "success")
                            {
                                a.IsShowProcessing = false;
                            }
                            else if (flag)
                            {
                                a.IsShowPending = true;
                            }
                        }
                    });
                }

                return(Json(new
                {
                    depatures = model.DepatureInfo
                }));
            }
            else
            {
                return(Json(new
                {
                    depatures = new List <Depatures>()
                }));
            }
        }