Ejemplo n.º 1
0
        public async Task <ActionResult> List(string keyword, DateTime?startTime, DateTime?endTime, int pageIndex = 1)
        {
            SettingListViewModel model = new SettingListViewModel();
            var tilte = await settingService.GetModelByNameAsync("系统标题");

            model.SysTitle = new SettingParm {
                Id = tilte.Id, Parm = tilte.Param
            };
            var phone1 = await settingService.GetModelByNameAsync("客服电话");

            model.Phone1 = new SettingParm {
                Id = phone1.Id, Parm = phone1.Param
            };
            var phone2 = await settingService.GetModelByNameAsync("客服电话1");

            model.Phone2 = new SettingParm {
                Id = phone2.Id, Parm = phone2.Param
            };
            var logo = await settingService.GetModelByNameAsync("系统LOGO");

            model.Logo = new SettingParm {
                Id = logo.Id, Parm = logo.Param
            };
            var about = await settingService.GetModelByNameAsync("关于我们");

            model.About = new SettingParm {
                Id = about.Id, Parm = about.Param
            };

            return(Json(new AjaxResult {
                Status = 1, Data = model
            }));
        }
 public IActionResult Edit(SettingListViewModel model)
 {
     if (ModelState.IsValid)
     {
         UpdateLanguage(model.Language);
     }
     return(RedirectToAction(nameof(Index)));
 }
Ejemplo n.º 3
0
        public SettingListView()
        {
            InitializeComponent();

            SettingListViewModel vm = new SettingListViewModel(this);

            this.DataContext = this.ViewModel = vm;
            this.list.PreviewMouseRightButtonDown += (s, e) => { e.Handled = true; };
        }
Ejemplo n.º 4
0
        public SettingListView()
        {
            InitializeComponent();
            UItaskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
            SettingListViewModel vm = new SettingListViewModel(this);

            this.DataContext = this.ViewModel = vm;
            this.list.PreviewMouseRightButtonDown += (s, e) => { e.Handled = true; };
        }
        public IActionResult Index()
        {
            var model = new SettingListViewModel
            {
                Language           = Request.HttpContext.Features.Get <IRequestCultureFeature>().RequestCulture.Culture.Name,
                AvailableLanguages = supportedCultures.Select(c => new SelectListItem(c.NativeName, c.Name)).ToList()
            };

            return(View(model));
        }
Ejemplo n.º 6
0
        public async Task <ActionResult> List(bool flag = true)
        {
            SettingListViewModel model = new SettingListViewModel();

            model.Address = await settingService.GetModelByNameAsync("公司地址");

            model.Phone = await settingService.GetModelByNameAsync("客服电话");

            model.Code = await settingService.GetModelByNameAsync("客服二维码");

            model.AppImg01 = await settingService.GetModelByNameAsync("App引导图1");

            model.AppImg02 = await settingService.GetModelByNameAsync("App引导图2");

            model.AppImg03 = await settingService.GetModelByNameAsync("App引导图3");

            model.Logo = await settingService.GetModelByNameAsync("系统LOGO");

            model.About = await settingService.GetModelByNameAsync("关于我们");

            return(Json(new AjaxResult {
                Status = 1, Data = model
            }));
        }