예제 #1
0
파일: Security.cs 프로젝트: JoelKDennis/N22
 /// <summary>
 /// Verify username and password
 /// </summary>
 /// <param name="userID">User ID</param>
 /// <param name="password">Password</param>
 /// <returns>Whether or not password and ID match</returns>
 public static int VerifyPassword(string userID, string password)
 {
     SecurityDO sDO = new SecurityDO();
     DataTable dt = sDO.Verify(new object[] { userID, password });
     if (dt.Rows.Count == 1)
     {
         if (dt.Rows[0][0] != null)
         {
             return int.Parse(dt.Rows[0][0].ToString());
         }
         else
         {
             return 0;
         }
     }
     else
         return 0;
 }
예제 #2
0
파일: AppUser.cs 프로젝트: JoelKDennis/N22
 /// <summary>
 /// Return List of Users from database
 /// </summary>
 /// <returns>List of User objects</returns>
 public static List<AppUser> UserList()
 {
     SecurityDO sDO = new SecurityDO();
     return BusinessDataBinder.BindData<List<AppUser>>(sDO.GetUser(new object[] { DBNull.Value }));
 }
예제 #3
0
파일: AppUser.cs 프로젝트: JoelKDennis/N22
 /// <summary>
 /// Get User
 /// </summary>
 /// <param name="userID">ID of user</param>
 /// <returns>User object</returns>
 public static AppUser GetUser(int userID)
 {
     SecurityDO sDO = new SecurityDO();
     return BusinessDataBinder.BindData<AppUser>(sDO.GetUser(new object[] { userID }));
 }