private void AdminLoginBtn_Click(object sender, EventArgs e) { string usernmae = txtUsername.Text; string password = txtPassword.Text; if (usernmae == "admin" && password == "admin") { adminHome adminHome = new adminHome(); this.Hide(); adminHome.StartPosition = FormStartPosition.CenterParent; adminHome.ShowDialog(); adminHome.Location = this.Location; this.Close(); } else { MessageBox.Show("Wrong Credentials!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnLogOut_Click(object sender, EventArgs e) { adminHome adminHome = new adminHome(); this.Close(); }