private void addToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            AddItem adi = new AddItem();

            adi.m = this;
            adi.Show();
        }
        public void getVehicle(AddItem ad = null, UpDe ud = null, AddCustomer adc = null, EditCust edc = null, string veh = null)
        {
            String cmd = "exec getVehicle ''";

            if (veh != null)
            {
                cmd = "exec getVehicle '" + veh + "'";
            }
            using (Conn = new SqlConnection())
            {
                try
                {
                    Conn.ConnectionString = "Server = (local);Database = Spare_parts;Trusted_Connection = true";
                    SqlCommand Cmd = new SqlCommand(cmd, Conn);
                    Conn.Open();
                    SqlDataReader reader = Cmd.ExecuteReader();
                    if (ad != null)
                    {
                        while (reader.Read())
                        {
                            ad.Veh(reader[0].ToString());
                        }
                    }
                    else if (ud != null)
                    {
                        while (reader.Read())
                        {
                            ud.Veh(reader[0].ToString());
                        }
                    }
                    else if (edc != null)
                    {
                        while (reader.Read())
                        {
                            edc.Veh(reader[0].ToString());
                        }
                    }
                    else
                    {
                        while (reader.Read())
                        {
                            adc.Veh(reader[0].ToString());
                        }
                    }
                }
                catch (SqlException)
                {
                    MessageBox.Show("An error occured", "Error");
                }
            }
            Conn.Close();
        }
        public void GetSupp(AddOrder ado = null, AddItem ads = null, String supp = null, UpDe ud = null)
        {
            String cmd = "exec getSuppNames ''";

            if (supp != null)
            {
                cmd = "exec getSuppNames '" + supp + "'";
            }
            using (Conn = new SqlConnection())
            {
                try
                {
                    Conn.ConnectionString = "Server = (local);Database = Spare_parts;Trusted_Connection = true";
                    SqlCommand Cmd = new SqlCommand(cmd, Conn);
                    Conn.Open();
                    SqlDataReader reader = Cmd.ExecuteReader();
                    while (reader.Read())
                    {
                        if (ads != null)
                        {
                            ads.Supp(reader[0].ToString());
                        }
                        else if (ado != null)
                        {
                            ado.Supp(reader[0].ToString());
                        }
                        else
                        {
                            ud.Supp(reader[0].ToString());
                        }
                    }
                }
                catch (SqlException)
                {
                    MessageBox.Show("An error occured", "Error");
                }
            }
            Conn.Close();
        }