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()); } }
/// <summary> /// 构造函数 /// </summary> public RoleAddViewModel() { CurrentDataModel.PropertyChanged += CurrentDataModel_PropertyChanged; initCommand(); ModuleList.AddRange(dbContext.ModuleDb.GetList().OrderBy(a => a.OrderCode)); }
/// <summary> /// 构造函数 /// </summary> public RoleEditViewModel() { initCommand(); ModuleList.AddRange(dbContext.ModuleDb.GetList().OrderBy(a => a.OrderCode)); }