Пример #1
0
 public int userLogin(string Username, string Password)
 {
     int status = 0;
     UserDAL LoginDAL = new UserDAL();
     status = LoginDAL.FindUser(Username, Password);
     if (status > 0)//user found
     {
         DataTable userProperties = LoginDAL.selectUser(Username);
         this.UserId = Convert.ToInt32(userProperties.Rows[0][0]);
         this.Username = Username;
         this.FirstName = Convert.ToString(userProperties.Rows[0][1]);
         this.LastName = Convert.ToString(userProperties.Rows[0][2]);
         this.Email = Convert.ToString(userProperties.Rows[0][3]);
         this.ParentEmail = Convert.ToString(userProperties.Rows[0][4]);
         this.Password = Convert.ToString(userProperties.Rows[0][5]);
     }
     return status;
 }
Пример #2
0
 //constructor
 public User(string Username, string FirstName, string LastName, string Email, string ParentEmail, string Password)
 {
     UserDAL RegisterDAL;
     RegisterDAL = new UserDAL(Username, FirstName, LastName, Email, ParentEmail, Password);
     //--RegisterDAL.StatusMessage
 }
Пример #3
0
 public List<User> getUsers()
 {
     UserDAL obj = new UserDAL();
     DataSet ds = obj.getUsers();
     List<User> oUsers = new List<User>();
     foreach (DataRow orow in ds.Tables[0].Rows)
     {
         //Fill the list
     }
     return oUsers;
 }