public User(int existingUserID) { this.dataUser = new JiaJiao.Data.User(); this.departmentID = "-1"; this.userID = existingUserID; this.LoadFromID(); }
public User(AccountsPrincipal existingPrincipal) { this.dataUser = new JiaJiao.Data.User(); this.departmentID = "-1"; this.userID = ((SiteIdentity) existingPrincipal.Identity).UserID; this.LoadFromID(); }
public AccountsPrincipal(string userName) { this.dataUser = new JiaJiao.Data.User(); this.identity = new SiteIdentity(userName); this.permissionList = this.dataUser.GetEffectivePermissionList(((SiteIdentity) this.identity).UserID); this.permissionListid = this.dataUser.GetEffectivePermissionListID(((SiteIdentity) this.identity).UserID); this.roleList = this.dataUser.GetUserRoles(((SiteIdentity) this.identity).UserID); }
public SiteIdentity(string currentUserName) { this.dataUser = new JiaJiao.Data.User(); DataRow row = this.dataUser.Retrieve(currentUserName); if (row != null) { this.userName = currentUserName; this.trueName = (string) row["TrueName"]; this.email = (string) row["Email"]; this.userID = (int) row["UserID"]; this.password = (byte[]) row["Password"]; this.sex = (string) row["Sex"]; } }
public User(string UserName) { this.dataUser = new JiaJiao.Data.User(); this.departmentID = "-1"; DataRow row = this.dataUser.Retrieve(UserName); if (row != null) { this.userID = (int) row["UserID"]; this.trueName = (string) row["TrueName"]; this.sex = (string) row["Sex"]; this.phone = (string) row["Phone"]; this.email = (string) row["Email"]; this.employeeID = (int) row["EmployeeID"]; this.departmentID = (string) row["DepartmentID"]; this.activity = (bool) row["Activity"]; this.userType = (string) row["UserType"]; this.password = (byte[]) row["Password"]; this.style = (int) row["Style"]; } }
public static AccountsPrincipal ValidateLogin(string userName, string password) { byte[] encPassword = EncryptPassword(password); JiaJiao.Data.User user = new JiaJiao.Data.User(); int userID = user.ValidateLogin(userName, encPassword); if (userID > 0) { return new AccountsPrincipal(userID); } return null; }
public User() { this.dataUser = new JiaJiao.Data.User(); this.departmentID = "-1"; }