Пример #1
0
        private void search_word_Click(Form_orders form_orders, EventArgs eventArgs)
        {
            foreach (DataGridViewRow item in dataGridView1.Rows)
            {
                if (Convert.ToInt16(item.Cells[0].Value) == Convert.ToInt16(product_id.Text))
                {
                    MessageBox.Show("that producted has been added befor");
                    return;
                }
            }

            DataRow row = table.NewRow();

            table.Columns.Add("");
            table.Columns.Add("");
            table.Columns.Add("");
            table.Columns.Add("");
            table.Columns.Add("");
            table.Columns.Add("");
            table.Columns.Add("");
            table.Rows.Add(product_id.Text, product_name.Text, product_price.Text, product_quantety.Text, product_total_price.Text, product_discount.Text, product_total.Text);
            dataGridView1.DataSource = table;
            double total = 0;

            foreach (DataGridViewRow item in dataGridView1.Rows)
            {
                total += Convert.ToDouble(item.Cells[6].Value);
            }
            total_value.Text = total.ToString();
        }
Пример #2
0
 public Form_Select_products(Form_orders _orders_form)
 {
     orders_form = _orders_form;
     InitializeComponent();
 }
Пример #3
0
 public Form_select_customer(Form_orders _Form_orders)
 {
     Form_orders = _Form_orders;
     InitializeComponent();
 }
Пример #4
0
        private void ادارةالمبيعاتToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form_orders form = new Form_orders(User_name);

            form.ShowDialog();
        }