private void jobCardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Jobcard jc = new Jobcard();

            jc.Show();
            this.Close();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                con.Open();
                string services = string.Empty;
                foreach (String s in CheckBoxList1.CheckedItems)
                {
                    services += s + ",";
                }

                cmd = new SqlCommand("insert into Customer_Details values('" + name.Text + "','" + cust_id.Text + "','" + contact_no.Text + "','" + address.Text + "','" + veichle_name.Text + "','" + veichle_no.Text + "','" + this.dateTimePicker1.Text + "','" + services + "')", con);
                cmd.ExecuteNonQuery();

                SqlCommand cmd1 = new SqlCommand("insert into Pending values('" + cust_id.Text + "','" + veichle_name.Text + "','" + services + "','" + name.Text + "')", con);
                cmd1.ExecuteNonQuery();

                MessageBox.Show("Database Updated Successfully");



                Jobcard f2 = new Jobcard();
                f2.Show();

                this.Close();

                con.Close();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            con.Open();
            string services = string.Empty;

            foreach (String s in CheckBoxList1.CheckedItems)
            {
                services += s + ",";
            }
            SqlCommand cmd1 = new SqlCommand("update Customer_Details set ser_req='" + CheckBoxList1.CheckedItems + "' where cust_id='" + cust_id.Text.ToString() + "'", con);

            cmd1.ExecuteNonQuery();

            SqlCommand cmd2 = new SqlCommand("insert into Pending values('" + cust_id.Text + "','" + veichle_name.Text + "','" + services + "','" + name.Text + "')", con);

            cmd2.ExecuteNonQuery();
            MessageBox.Show("Databse Updated Successfully", "", MessageBoxButtons.OK, MessageBoxIcon.Information);

            Jobcard f2 = new Jobcard();

            f2.Show();

            con.Close();
            this.Close();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            con.Open();
            SqlCommand cmd = new SqlCommand("insert into jobspares values('" + job_spares_id.Text + "','" + item_code.Text + "','" + item_name.Text + "','" + units_sold.Text + "','" + unit_price.Text + "','" + handling.Text + "','" + vat.Text + "')", con);

            cmd.ExecuteNonQuery();

            Jobcard f2 = new Jobcard();

            f2.Refresh();

            this.Close();
            MessageBox.Show("Saved Successfully", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }