コード例 #1
0
ファイル: User.cs プロジェクト: sjyanxin/JiaJiao
 public User(int existingUserID)
 {
     this.dataUser = new JiaJiao.Data.User();
     this.departmentID = "-1";
     this.userID = existingUserID;
     this.LoadFromID();
 }
コード例 #2
0
ファイル: User.cs プロジェクト: sjyanxin/JiaJiao
 public User(AccountsPrincipal existingPrincipal)
 {
     this.dataUser = new JiaJiao.Data.User();
     this.departmentID = "-1";
     this.userID = ((SiteIdentity) existingPrincipal.Identity).UserID;
     this.LoadFromID();
 }
コード例 #3
0
ファイル: AccountsPrincipal.cs プロジェクト: sjyanxin/JiaJiao
 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);
 }
コード例 #4
0
ファイル: SiteIdentity.cs プロジェクト: sjyanxin/JiaJiao
 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"];
     }
 }
コード例 #5
0
ファイル: User.cs プロジェクト: sjyanxin/JiaJiao
 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"];
     }
 }
コード例 #6
0
ファイル: AccountsPrincipal.cs プロジェクト: sjyanxin/JiaJiao
 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;
 }
コード例 #7
0
ファイル: User.cs プロジェクト: sjyanxin/JiaJiao
 public User()
 {
     this.dataUser = new JiaJiao.Data.User();
     this.departmentID = "-1";
 }