예제 #1
0
 private void ShowPendingPaymentOrders()
 {
     try
     {
         _pendingPaymentOrders = OrderOfCustomerDataAccess.GetOrdersByStatusId(CustomerInfo.customer.Id, 1);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     dataGridViewPendingPaymentOrders.Rows.Clear();
     foreach (var order in _pendingPaymentOrders)
     {
         int             rowId = dataGridViewPendingPaymentOrders.Rows.Add();
         DataGridViewRow row   = dataGridViewPendingPaymentOrders.Rows[rowId];
         row.Cells["OrderId2"].Value    = order.Id;
         row.Cells["BookISBN2"].Value   = order.Book_ISBN;
         row.Cells["Title2"].Value      = order.Title;
         row.Cells["Amount2"].Value     = order.Amount;
         row.Cells["TotalPrice2"].Value = order.Total_Price;
         row.Cells["OrderDate2"].Value  = order.Order_Date;
     }
 }
예제 #2
0
 private void ShowWaitingForDeliveryOrders()
 {
     try
     {
         _waitingForDeliveryOrders = OrderOfCustomerDataAccess.GetOrdersByStatusId(CustomerInfo.customer.Id, 2);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     dataGridViewWaitingForDeliveryOrders.Rows.Clear();
     foreach (var order in _waitingForDeliveryOrders)
     {
         int             rowId = dataGridViewWaitingForDeliveryOrders.Rows.Add();
         DataGridViewRow row   = dataGridViewWaitingForDeliveryOrders.Rows[rowId];
         row.Cells["OrderId3"].Value    = order.Id;
         row.Cells["BookISBN3"].Value   = order.Book_ISBN;
         row.Cells["Title3"].Value      = order.Title;
         row.Cells["Amount3"].Value     = order.Amount;
         row.Cells["TotalPrice3"].Value = order.Total_Price;
         row.Cells["OrderDate3"].Value  = order.Order_Date;
     }
 }