private void button5_Click(object sender, EventArgs e)
        {
            ///delete order
            string       fullName = textBox5.Text;
            CurrentOrder dltOrder = db.CurrentOrders.SingleOrDefault(x => x.order_name == fullName);

            db.CurrentOrders.DeleteOnSubmit(dltOrder);
            db.SubmitChanges();
            MessageBox.Show("Order Deleted");

            //opening this window by refershing again
            Hide();
            CurrentOrderClass newObj = new CurrentOrderClass();

            newObj.whoLoggedIn = this.whoLoggedIn;
            newObj.Show();
        }
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            ///searching
            string name = comboBox1.Text;

            crDb = db.CurrentOrders.SingleOrDefault(x => x.order_name == name);
            if (crDb != null)
            {
                textBox5.Text = crDb.order_name;
                textBox1.Text = crDb.client;
                textBox2.Text = crDb.quantity.ToString();
                textBox3.Text = crDb.shipment_date;
                textBox4.Text = crDb.buyer_pays.ToString();
                textBox6.Text = crDb.estimated_cost.ToString();
                textBox7.Text = "Click To Calculate";

                pictureBox1.ImageLocation = crDb.sample.ToString();
                pictureBox1.Show();
            }
        }
 partial void UpdateCurrentOrder(CurrentOrder instance);
 partial void DeleteCurrentOrder(CurrentOrder instance);
 partial void InsertCurrentOrder(CurrentOrder instance);