Esempio n. 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (dataGridView2.Rows.Count > 1)
     {
         addDiscount fm = new addDiscount();
         fm.ShowDialog();
         if (fm.rate_dis != "")
         {
             foreach (DataGridViewRow row in dataGridView2.SelectedRows)
             {
                 if (this.dataGridView2.SelectedRows.Count > 0)
                 {
                     if (this.dataGridView2.SelectedRows.Count > 0)
                     {
                         Class.cOrder_detial order        = new Class.cOrder_detial();
                         int             selectedrowindex = dataGridView2.SelectedCells[0].RowIndex;
                         DataGridViewRow selectedRow      = dataGridView2.Rows[selectedrowindex];
                         int             id__             = Convert.ToInt32(selectedRow.Cells[0].Value);
                         order.add_discount(Convert.ToInt32(txtInvo.Text), Convert.ToInt32(id__), Convert.ToInt32(fm.rate_dis));
                         gethold_inv(txtTable.Text);
                         get_order_hold(txtInvo.Text);
                     }
                 }
             }
         }
     }
 }
Esempio n. 2
0
        private void button11_Click_1(object sender, EventArgs e)
        {
            addDiscount dis = new addDiscount();

            dis.ShowDialog();
            txtDiscount.Text = dis.rate_dis;
            getTotal();
        }