/// <summary> /// Gets all available data. /// </summary> /// <returns>The model</returns> public static UserListModel Get() { UserListModel m = new UserListModel(); m.Users = SysUser.Get(new Params() { OrderBy = "sysuser_login" }); return(m); }
/// <summary> /// Gets all available data. /// </summary> /// <returns>The model</returns> public static UserListModel Get() { UserListModel m = new UserListModel(); m.Users = SysUser.Get(new Params() { OrderBy = "sysuser_login" }); m.Groups = SysGroup.GetStructure().Flatten(); return(m); }
/// <summary> /// Gets the available user for the given group. /// </summary> /// <param name="groupId">The group id</param> /// <returns>The model</returns> public static UserListModel GetByGroupId(Guid groupId) { UserListModel m = new UserListModel(); m.Users = SysUser.Get("sysuser_group_id= @0", groupId, new Params() { OrderBy = "sysuser_login" }); m.Groups = SysGroup.GetStructure().Flatten(); m.ActiveGroup = groupId; return(m); }
public UserInfo GetUserInfo(string sessionID) { UserInfo ui = null; string uistr = USServiceClient.GetUserInfo(sessionID); if (!String.IsNullOrEmpty(uistr)) { DataForm df = new DataForm(uistr); string loginName = df.GetValue("SystemName") == null?df.GetValue("LoginName") : df.GetValue("SystemName"); SysUser user = SysUser.Get(loginName); ui = new GwUserInfo(user.UserID, loginName, user.Name); } return(ui); }