コード例 #1
0
 // GET: Module
 public ActionResult Index()
 {
     return(View(new GridTreeDataModel()
     {
         TreeModels = moduleService.GetModule(), Authoritys = LoadAutority()
     }));
 }
コード例 #2
0
        public ModulePopupForm(EmployeeVO employeeVO, int module_id = 0)
        {
            try
            {
                InitializeComponent();
                this.employeeVO = employeeVO;
                this.module_id  = module_id;
                this.Text       = module_id > 0 ? "모듈 수정" : "모듈 등록";
                cboApp_id.ComboBinding(new ApplicationService().GetAllApplications(true), "APP_NAME", "APP_ID");

                if (module_id > 0)
                {
                    ModuleVO moduleVO = moduleService.GetModule(module_id);

                    cboApp_id.SelectedItem = moduleVO.App_id;
                    txtModule.Text         = moduleVO.Module_name;
                    nudModule_seq.Value    = moduleVO.Module_seq;

                    if (moduleVO.Module_use == "Y")
                    {
                        rdoModule_useY.Checked = true;
                    }
                    else
                    {
                        rdoModule_useN.Checked = true;
                    }
                }
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message);
            }
        }
コード例 #3
0
        public ActionResult Edit(int id = 0)
        {
            var modules = _moduleService.GetModule(c => c.Id == id);

            if (modules == null)
            {
                return(PartialView("Create", new ModuleVM()));
            }

            var menuSource = GetMenuDropDownListSource();

            if (modules.ParentId.HasValue)
            {
                foreach (var item in menuSource)
                {
                    if (modules.ParentId.Value.ToString() == item.Value)
                    {
                        item.Selected = true;
                        break;
                    }
                }
            }

            ViewBag.ParentModuleList = menuSource;
            var model = new ModuleVM()
            {
                Id          = modules.Id,
                Name        = modules.Name,
                ParentId    = modules.ParentId,
                LinkUrl     = modules.LinkUrl,
                IsMenu      = modules.IsMenu,
                Code        = modules.Code,
                Description = modules.Description,
                Enabled     = modules.Enabled,
                Icon        = modules.Icon
            };

            return(PartialView("Create", model));
        }
コード例 #4
0
ファイル: ShellViewModel.cs プロジェクト: ajni/eve-profiteer
        public void Handle(ModuleEvent message)
        {
            var module = _moduleService.GetModule(message.GetTabType());

            ExecuteActivateTab(message.GetTabType());
        }
コード例 #5
0
 public async Task <Module> GetModule(int id, [FromUri] string lang = "fr-FR")
 {
     return(await ModuleService.GetModule(id, lang));
 }