예제 #1
0
 public void loadCancelSales()
 {
     try
     {
         int i = 0;
         dataCancelSales.Rows.Clear();
         using (MySqlDataReader reader = pos.loadCancel(dateCancel1.Value.ToShortDateString(), dateCancel2.Value.ToShortDateString()))
         {
             while (reader.Read())
             {
                 i++;
                 dataCancelSales.Rows.Add(i,
                                          reader["transaction_id"].ToString(),
                                          reader["products_id"].ToString(),
                                          reader["description"].ToString(),
                                          reader["price"].ToString(),
                                          reader["quantity"].ToString(),
                                          reader["total"].ToString(),
                                          reader["date_cancel"].ToString(),
                                          reader["voidby"].ToString(),
                                          reader["cancelBy"].ToString(),
                                          reader["reason"].ToString(),
                                          reader["action"].ToString());
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }