//Back to function menu private void btnBack_Click(object sender, EventArgs e) { this.Hide(); frmFunctionMenu a = new frmFunctionMenu(); a.Show(); }
private void btnLogin_Click(object sender, EventArgs e) { DataTable dataTable = pProcessCheckLogin(txbUser.Text, txbPassword.Text); if (dataTable.Rows.Count > 0) { frmFunctionMenu menuPage = new frmFunctionMenu(); menuPage.Show(); this.Hide(); dtgvLogin.DataSource = pProcessCheckLogin(txbUser.Text, txbPassword.Text); Global.EmployeeCodes = dtgvLogin.Rows[0].Cells[1].Value.ToString(); //dtgvLogin.Show(); MessageBox.Show("Login as : " + Global.EmployeeCodes); } else { MessageBox.Show("Invalid username or password"); } }