private void SignInButton_Click(object sender, EventArgs e)
 {
     if (isFormValid())
     {
         DBSQLServer db = new DBSQLServer(AppSetting.ConnectionString());
         bool        isLoginDetailsCorrect = Convert.ToBoolean(db.GetScalarValue("usp_UsersCheckLoginDetails", GetParameter()));
         if (isLoginDetailsCorrect)
         {
             GetLoggedInUserSetting();
             this.Hide();
             DashboardForm df = new DashboardForm();
             df.Show();
         }
         else
         {
             SMSMessageBox.ShowErrorMessage("User name/Password is not correct");
         }
     }
 }
Example #2
0
        private void btnSignIn_Click(object sender, EventArgs e)
        {
            if (IsFormValid())
            {
                DbSQLServer dbSQLServer = new DbSQLServer(AppSetting.ConnectionString());

                bool isLoginDetailsCorrect = Convert.ToBoolean(dbSQLServer.GetScalarValue("usp_UsersCheckLoginDetails", GetParameters()));

                if (isLoginDetailsCorrect)
                {
                    GetLoggedInUserSettings();
                    this.Hide();

                    DashboardForm dashboardForm = new DashboardForm();
                    dashboardForm.Show();
                }

                else
                {
                    JIMessageBox.ShowErrorMessage("User Name/Password is incorrect");
                    //MessageBox.Show("User Name/Password is incorrect", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }