Ejemplo n.º 1
0
        private void Refresh(bool rmodule, bool rmenu, bool rmenudtl, bool rrole, bool ruser)
        {
            if (rmodule)
            {
                ModuleList.Clear();
                ModuleList.AddRange(PubMaster.Mod.RoleSql.QueryWcsModuleList());
            }

            if (rmenu)
            {
                MenuList.Clear();
                MenuList.AddRange(PubMaster.Mod.RoleSql.QueryWcsMenuList());
            }

            if (rmenudtl)
            {
                MenuDtlList.Clear();
                MenuDtlList.AddRange(PubMaster.Mod.RoleSql.QueryWcsMenuDtlList());
            }

            if (rrole)
            {
                RoleList.Clear();
                RoleList.AddRange(PubMaster.Mod.RoleSql.QueryWcsRoleList());
            }

            if (ruser)
            {
                UserList.Clear();
                UserList.AddRange(PubMaster.Mod.RoleSql.QueryWcsUserList());
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public RoleAddViewModel()
 {
     CurrentDataModel.PropertyChanged += CurrentDataModel_PropertyChanged;
     initCommand();
     ModuleList.AddRange(dbContext.ModuleDb.GetList().OrderBy(a => a.OrderCode));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 public RoleEditViewModel()
 {
     initCommand();
     ModuleList.AddRange(dbContext.ModuleDb.GetList().OrderBy(a => a.OrderCode));
 }