private void btnback_Click(object sender, EventArgs e) { frmpatientDetails asdasd = new frmpatientDetails(); asdasd.Show(); this.Hide(); }
private void btnenter_Click(object sender, EventArgs e) { SqlCommand command = new SqlCommand("select * from Tbl_Patients where patienttc=@p1 and patientpassword=@p2", connectionON.connection()); command.Parameters.AddWithValue("@p1", msktc.Text); command.Parameters.AddWithValue("@p2", txtpassword.Text); SqlDataReader dr = command.ExecuteReader(); if (dr.Read()) { frmpatientDetails fr = new frmpatientDetails(); fr.ID = msktc.Text; fr.Show(); this.Hide(); } else { MessageBox.Show("ID & Password are not matched"); } connectionON.connection().Close(); }