Ejemplo n.º 1
0
        private void authenticateUser(String userId, String userPassword)
        {
            //  EmployeeModel em = new EmployeeModel();
            //  dynamic employee = em.find_by(em, "user_id", userId);
            //  if (employee != null)
            // {
            //     Boolean matchPassword = BCryptHelper.CheckPassword(userPassword, employee.password);
            //    if (matchPassword)
            //   {
            Main_Frame main = new Main_Frame();

            main.Show();
            this.Hide();
            //   }
            //   else
            //   {
            //       password.Focus();
            //    MessageBox.Show("Invalid password for login ID: " + userId, "Invalid password");
            //  }
            //  }
            //  else
            //  {
            //     userid.Focus();
            //     MessageBox.Show("No employee found with ID: " + userId, "Invalid Login");
            //  }
        }
Ejemplo n.º 2
0
        private void btn_login_Click(object sender, EventArgs e)
        {
            String userId       = userid.Text;
            String userPassword = password.Text;
            //   if (userId == "" || userPassword == "")
            // {
            //   MessageBox.Show("Please input your user ID and Password");
            //  userid.Focus();
            //    return;
            //  }
            //  else
            //  {
            //  authenticateUser(userId, userPassword);
            //   }
            //InvoiceModel inv = new InvoiceModel();
            //dynamic invoice = inv.find(inv, "636548960494211");
            //InvoiceReport_Frame ir = new InvoiceReport_Frame(invoice);
            //ir.Show();
            Main_Frame main = new Main_Frame();

            main.Show();
            this.Hide();
        }