private void pictureBox3_Click(object sender, EventArgs e) { this.Hide(); Admin_page apf = new Admin_page(); apf.Show(); }
private void cmdlogin_Click(object sender, EventArgs e) { SqlDataAdapter sda = new SqlDataAdapter("select Count(*) From Administarator where UserName = '******' and _Password = '******'", con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { MessageBox.Show("You have Successfully Login!, Welcome to LifeLine Hospital", "Message", MessageBoxButtons.OK, MessageBoxIcon.None); this.Close(); Admin_page apf = new Admin_page(); apf.Show(); } else { MessageBox.Show("Please Check Your Username and Password", "Message", MessageBoxButtons.OK, MessageBoxIcon.Error); } }