private void binduser() { DAL.DALUser dal = new DAL.DALUser(); var user = dal.GetUser8Name("pinker3"); guid.Text = user.ID.ToString(); username.Text = user.Name; userpsw.Text = user.Password; }
public bool Login(User u) { //authenticate code //Create DAL DALUser dal = new DALUser(); //check the valid of user: //1)Select the user pwd from the User table User uDB = dal.GetUser(u.UserName); //2)Compare the pwd with the one submitted by user return uDB.Password.Equals(u.Password); }