private void SignInButton_Click(object sender, EventArgs e) { if (IsFormValidate()) { DbSqlServer db = new DbSqlServer(AppSettings.ConnectionString()); bool isLoginDetailsCorrect = Convert.ToBoolean(db.GetScalerValue("usp_UsersCheckLoginDetails", GetParameters())); if (isLoginDetailsCorrect) { GetLoggedInUserSetting(); this.Hide(); DashboardForm dashboardForm = new DashboardForm(); dashboardForm.Show(); } else { MessageBox.Show("User Name/Password is not correct", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void GenerateEmployeeId() { DbSqlServer db = new DbSqlServer(AppSettings.ConnectionString()); EmployeeIdTextBox.Text = db.GetScalerValue("usp_EmployeesGenerateNewEmployeeId").ToString(); }
private void GenerateStudentId() { DbSqlServer db = new DbSqlServer(AppSettings.ConnectionString()); StudentIdTextBox.Text = db.GetScalerValue("usp_StudentsGenerateNewStudentId").ToString(); }