Esempio n. 1
0
        private void UpdateLoadDowOrderDetails()
        {
            OrderDetail.DeleteByOrderID(OrderID);
            for (int i = 0; i < gvOrderDetails.Rows.Count - 1; i++)
            {
                DataGridViewRow currRow = gvOrderDetails.Rows[i];
                OrderDetail     tempo   = new OrderDetail();

                tempo.OrderID   = _OrderID;
                tempo.ProductID = Convert.ToInt32(currRow.Cells[0].Value.ToString());

                tempo.UnitPrice = Convert.ToDouble(Convert.ToDecimal(currRow.Cells[1].Value.ToString()));
                tempo.Quantity  = Convert.ToInt16(currRow.Cells[2].Value.ToString());
                tempo.Discount  = Convert.ToDouble(currRow.Cells[3].Value.ToString());

                OrderDetail.Add(tempo);
            }
        }