Exemplo n.º 1
0
        private void Delete_button_Click(object sender, EventArgs e)
        {
            BranchID_Label.Show();
            SqlConnection con = new SqlConnection(conStr);

            SqlCommand cmd = new SqlCommand("BranchMaster_Delete", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@BrachID", BranchID_Label.Text);
            cmd.Parameters.AddWithValue("@branchname", Branchname_txtbox.Text);
            cmd.Parameters.AddWithValue("@location", Location_txtbox.Text);
            cmd.Parameters.AddWithValue("@kgstno", kgst_txtbox.Text);
            cmd.Parameters.AddWithValue("@phoneno", PhoneNo_txtbox.Text);



            con.Open();
            int i = cmd.ExecuteNonQuery();



            if (i != 0)
            {
                MessageBox.Show("Data Deleted");
                DisplayData();
                BranchID_Label.Hide();

                ClearTextBoxes();
            }
        }
Exemplo n.º 2
0
        private void Clear_button_Click(object sender, EventArgs e)
        {
            BranchID_Label.Hide();

            ClearTextBoxes();
        }