private void pictureBox2_Click(object sender, EventArgs e) { RepairCategory rc1 = new RepairCategory(); this.Hide(); rc1.Show(); }
private void button2_Click(object sender, EventArgs e) { Form fm2 = new RepairCategory(); this.Hide(); fm2.Show(); }
private void button1_Click(object sender, EventArgs e) { sql = "DELETE FROM MajorRepair WHERE invoiceNo = '" + textBox1.Text + "'"; con.Open(); cmd = new SqlCommand(sql, con); cmd.ExecuteNonQuery(); MessageBox.Show("Record Deleted Successfully"); Form fm2 = new RepairCategory(); this.Hide(); fm2.Show(); }
private void button10_Click(object sender, EventArgs e) { vehNo = textBox1.Text; SqlConnection con = new SqlConnection(@"Data Source=ROG;Initial Catalog=VehicleDB;Integrated Security=True;Pooling=False"); string query = "SELECT* FROM Vehicle WHERE vehNo='" + textBox1.Text + "'"; SqlDataAdapter sd = new SqlDataAdapter(query, con); DataTable dt = new DataTable(); sd.Fill(dt); if (dt.Rows.Count == 1) { RepairCategory fm2 = new RepairCategory(); this.Hide(); fm2.Show(); } else { MessageBox.Show("Vehicle Not found in application"); textBox1.Clear(); } }