public int Execute() { if (!Helper.ChkUsername(username)) { return(4); } if (dm.Read(username)) { return(1); } if (!Helper.ChkPasswordlength(password)) { return(3); } if (!password.Equals(confirmPassword)) { return(2); } User u = new User(username, Helper.HashPassword(password)); dm.Create(u); return(0); }
public bool Execute() { string HashPassword = Helper.HashPassword(password); return(dm.Read(username, HashPassword)); }