Exemple #1
0
 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;
     }
 }
Exemple #2
0
        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);
        }
Exemple #3
0
 public AuthenticationBL()
 {
     usersCRUD = new UsersCRUD();
     pwHasher  = new PasswordWithSaltHasher();
 }
Exemple #4
0
 public void Put([FromBody] User user)
 {
     UsersCRUD.AddUser(user);
 }
Exemple #5
0
 public object Get()
 {
     return(UsersCRUD.GetUsers());
 }
Exemple #6
0
        public Guid FindUserGuid(string userName)
        {
            UsersCRUD usersCRUD = new UsersCRUD();

            return(usersCRUD.FindUserGuid(userName));
        }