Ejemplo n.º 1
0
        public ActionResult Create(BranchDealViewModel model)
        {
            TravelSession       obj       = (TravelSession)Session["TravelPortalSessionInfo"];
            BranchDealViewModel viewModel = new BranchDealViewModel();
            BranchDealViewModel viewmodel = new BranchDealViewModel()
            {
                DealMasterList = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId),
                DealMaserText  = mDealProvider.GetBranchDealMasterById(model.DealMasterId).BranchDealName,
            };


            if (ModelState.IsValid)
            {
                model.MakerId      = obj.AppUserId;
                model.MakerDate    = DateTime.UtcNow;
                model.isVerified   = true;
                model.VerifiedBy   = obj.AppUserId;
                model.VerifiedDate = DateTime.UtcNow;
                model.isDelete     = false;
                model.CreatedBy    = obj.AppUserId;

                int dealId = mDealProvider.Save_Mobile_BranchDeals(model);

                viewModel = mDealProvider.GetMobileBranchDealDetail(dealId);

                viewModel.DealMasterList = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId);

                if (Request != null && Request.IsAjaxRequest())
                {
                    return(PartialView("VUC_DealDetail", viewModel));
                }
                else
                {
                    return(View(viewModel));
                }
            }
            else
            {
                viewModel.DealMasterList = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId);
                return(View(viewModel));
            }
        }
Ejemplo n.º 2
0
        public ActionResult AjaxBranchDealCancel(int id)
        {
            BranchDealViewModel viewModel     = new BranchDealViewModel();
            BranchDealProvider  mDealProvider = new BranchDealProvider();

            viewModel = mDealProvider.GetMobileBranchDealDetail(id);

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_BranchDealDetail", viewModel));
            }
            else
            {
                return(View(viewModel));
            }
        }
Ejemplo n.º 3
0
        public ActionResult AjaxBranchDealDetail(int id)
        {
            TravelSession       obj           = (TravelSession)Session["TravelPortalSessionInfo"];
            BranchDealViewModel viewModel     = new BranchDealViewModel();
            BranchDealProvider  mDealProvider = new BranchDealProvider();

            viewModel = mDealProvider.GetMobileBranchDealDetail(id);

            viewModel.DealMasterList     = mDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId);
            viewModel.DealIdentifierList = _DealProvider.GetMobileServiceProviders();

            if (Request != null && Request.IsAjaxRequest())
            {
                return(PartialView("VUC_BranchDealEdit", viewModel));
            }
            else
            {
                return(View(viewModel));
            }
        }
Ejemplo n.º 4
0
        public ActionResult DeleteMobileBranchMasterDealForceFully(int id, string name)
        {
            JsonResult          returnJsonData = new JsonResult();
            BranchDealViewModel viewmodel      = new BranchDealViewModel();

            viewmodel = bDealProvider.GetMobileBranchDealDetail(id);

            BranchDealViewModel masterviewmodel = new BranchDealViewModel();

            masterviewmodel = bDealProvider.GetBranchMasterDealDetail(id);

            try
            {
                bDealProvider.Mobile_BranchDealChangesLogs(viewmodel);
                //bDealProvider.Air_DistributorDealMasterChangesLogs(masterviewmodel);::TODO

                bool          result = false;
                TravelSession obj    = (TravelSession)Session["TravelPortalSessionInfo"];

                bDealProvider.Delete_Mobile_BranchDeals(id, obj.AppUserId);
                bDealProvider.Delete_Core_BranchDealMasters(id, obj.AppUserId);

                viewmodel.DealMasterList = bDealProvider.GetAllBranchDealMasterList(3, obj.LoginTypeId);

                result = true;

                viewmodel.isVerified = result;
                returnJsonData.Data  = viewmodel;
                return(returnJsonData);
            }
            catch (Exception ex)
            {
                viewmodel.isVerified = false;
                returnJsonData.Data  = viewmodel;
            }
            return(returnJsonData);
        }