Beispiel #1
0
        public void MakeFillForm() // gridviewi dolduracak seçili olan ile
        {
            dynamicTableUpdate.Dispose();
            dynamicTableNew.Dispose();
            dataGridView3.DataSource = null;

            productArray = productListOP.productListByProductOrderID(Convert.ToInt32(dataGridView1.CurrentRow.Cells[3].Value));

            dynamicTableUpdate = dynamicTable2.Clone();
            customer customer = productListOP.customerByProductOrderID();

            CustomerID  = customer.code;
            label3.Text = customer.name.ToString() + " " + customer.surname.ToString();

            for (int i = 0; i < productArray.Capacity; i++)
            {
                // null product geliyor, bunları filtrelemen lazım!
                if (productArray[i].productOrderId == Convert.ToInt32(dataGridView1.CurrentRow.Cells[3].Value))
                {
                    dynamicTableUpdate.Rows.Add(productArray[i].code, productArray[i].name, productArray[i].grup, productArray[i].price, productArray[i].brand, productArray[i].discount, productArray[i].amount);
                }
            }
            dataGridView3.DataSource = dynamicTableUpdate;
        }