private void btnLogin_Click(object sender, EventArgs e) { try { //if (CekIsNullOrEmptyUser()) //{ string userName = txtUserName.Text; string password = txtPassword.Text; //Users oUsers = new UsersCRUD().GetUserBy(userName, password); Users oUsers = new UsersCRUD().GetUserBy("admin", "123123"); if (oUsers != null) { FrmPOS oFrmPOS = new FrmPOS(); oFrmPOS.UserLogin = oUsers; oFrmPOS.Show(); this.Hide(); } else { MetroFramework.MetroMessageBox.Show(this, "Maaf User Name Atau Password Anda Salah !!", "LOGIN | " + "KM-POS " + VarGlobal.NamaToko, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); txtUserName.Focus(); } //} } catch (Exception) { throw; } }
public void CreateUser(string userName, string pass, string email, string question, string answer, UserInfo userInfo) { UsersCRUD usersCRUD = new UsersCRUD(); usersCRUD.CreateUser(userName, pass, email, question, answer, userInfo); }
public AuthenticationBL() { usersCRUD = new UsersCRUD(); pwHasher = new PasswordWithSaltHasher(); }
public void Put([FromBody] User user) { UsersCRUD.AddUser(user); }
public object Get() { return(UsersCRUD.GetUsers()); }
public Guid FindUserGuid(string userName) { UsersCRUD usersCRUD = new UsersCRUD(); return(usersCRUD.FindUserGuid(userName)); }