Ejemplo n.º 1
0
        public IActionResult ReturnWithError(ListWithdrawFee model)
        {
            SettingCMSModel settingCMSModel = new SettingCMSModel();

            settingCMSModel.ListMaintainingFee                      = _maintainingFeeService.GetConfiguration();
            settingCMSModel.ListWithdrawFee                         = model;
            settingCMSModel.ContactCMSModel                         = _contactConfigurationService.GetContactConfiguration();
            settingCMSModel.GenericIntroducingSettingModel          = _introducingSettingService.GetSetting();
            settingCMSModel.InvestmentTargetSettingModel.ListModels = _investmentTargetCMSService.GetAll();
            settingCMSModel.HomepageCMSModel.HomepageModels         = _homepageCMSService.GetAll();
            ViewBag.ListPortfolio = _portfolioService.GetAllPortfolio().ToList();
            ViewBag.Data          = _investmentTargetCMSService.GetAll().ToList();

            return(View("Views/SettingsCMS/Index.cshtml", settingCMSModel));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Index(SettingCMSModel settingCMSModel)
        {
            if (!settingCMSModel.HasError)
            {
                SettingCMSModel model = new SettingCMSModel();

                //Anh DMDT
                model.HomepageCMSModel = _homepageCMSService.GetAll().FirstOrDefault(x => x.Category == "2");
                if (model.HomepageCMSModel == null)
                {
                    model.HomepageCMSModel = new HomepageCMSModel();
                }
                //Trang chu
                model.HomepageCMSModel.HomepageModels = _homepageCMSService.GetAll();
                model.GenericIntroducingSettingModel  = _introducingSettingService.GetSetting();
                model.ListMaintainingFee = GetMainTainingFees(model);
                model.ListWithdrawFee    = await GetWithdrawFees(model);

                model.InvestmentTargetSettingModel.ListModels = await _investmentTargetCMSService.GetListInvestmentTargetSetting();

                ViewBag.ListPortfolio = _portfolioService.GetAllPortfolio().ToList();
                ViewBag.Data          = _investmentTargetCMSService.GetAll().ToList();
                if (model.GenericIntroducingSettingModel == null)
                {
                    model.GenericIntroducingSettingModel = new GenericIntroducingSettingModel();
                }
                model.ContactCMSModel = _contactConfigurationService.GetContactConfiguration();

                ViewBag.ListFund = _fundService.GetAllFund().OrderBy(i => i.Code).ToList();

                return(View(model));
            }
            return(View(settingCMSModel));
        }
        public bool CheckDataExisted(int id)
        {
            var result = _investmentTargetCMSService.GetAll().Any(x => x.Id == id);

            if (result)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }