private void btn_Submit_Click(object sender, EventArgs e) { if (tb_Username.Text == "a" && tb_Password.Text == "a") { MessageBox.Show("Login Successfull...!!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); frm_Add_Student_Info ASObj = new frm_Add_Student_Info(); this.Hide(); ASObj.Show(); } else { MessageBox.Show("Invalid Username or Password..!!", "Failure", MessageBoxButtons.OK, MessageBoxIcon.Warning); } tb_Username.Text = ""; tb_Password.Text = ""; tb_Password.Enabled = false; btn_Submit.Enabled = false; tb_Username.Focus(); }
private void btn_Back_Click(object sender, EventArgs e) { frm_Add_Student_Info AObj = new frm_Add_Student_Info(); this.Close(); AObj.Show(); }