Example #1
0
        public ActionResult ViewCatalogInfo(int custAutoID, string catalogInsertStatus = "", int quoteid = 0)
        {
            _catalogInfoSrv.UserVM          = UserVM;
            ViewData["CatalogInsertStatus"] = !string.IsNullOrEmpty(catalogInsertStatus) ? catalogInsertStatus : "false";
            //getting the View from the Service along with the dropdwn values
            CatalogInfoViewModel catInfoVM = _catalogInfoSrv.getCatalogInfoValues(custAutoID);

            if (quoteid != 0)
            {
                UserVM.CurrentQuoteID = quoteid;
                catInfoVM.ISARRCExits = _catalogInfoSrv.CheckARRCLevelExitsForTitlesByQuoteID(quoteid);
            }
            this.AssignUserVM(_catalogInfoSrv.UserVM);
            return(View("../TCPViews/CatalogInformation", catInfoVM));
        }
        public CatalogInfoViewModel getCatalogInfoValues(int custAutoID)
        {
            CatalogInfoViewModel catalogInfoVM = new CatalogInfoViewModel();
            QuoteViewService     quoteService  = new QuoteViewService();

            catalogInfoVM.ThisUserID     = custAutoID;
            catalogInfoVM.CatalogOptions = FillCatalogOptionsInfo(catalogInfoVM.ThisUserID);
            catalogInfoVM.ValidationCatalogBasicProfileModel = FillValidationsInfo();
            CustomerCatalogInformation ccInfo = _Context.CustomerCatalogInformation.GetAll(e => e.CustAutoID == custAutoID).OrderByDescending(e => e.UpdatedDate).FirstOrDefault();

            catalogInfoVM.UpdatedDate     = ccInfo != null ? ccInfo.UpdatedDate : (DateTime?)null;
            catalogInfoVM.UpdatedUserName = ccInfo != null ? ccInfo.User != null?ccInfo.User.UserName.ToString() : string.Empty : string.Empty;

            quoteService.UserVM   = UserVM;
            UserVM.CurrentQuoteID = quoteService.getCustomerSCQuoteID();
            catalogInfoVM.UserVM  = UserVM;
            return(catalogInfoVM);
        }