// GET: Module
 public ActionResult Index()
 {
     return(View(new GridTreeDataModel()
     {
         TreeModels = moduleService.GetModule(), Authoritys = LoadAutority()
     }));
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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));
        }
Exemplo n.º 4
0
        public void Handle(ModuleEvent message)
        {
            var module = _moduleService.GetModule(message.GetTabType());

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