コード例 #1
0
ファイル: Manage.cs プロジェクト: kayshoji/C-.Net
 // make rent lists
 public ArrayList makeRentList()
 {
     rentlist = new ArrayList();
     totalAmount = 0;
     int cnt = 0;
     foreach (Individual product in products)
     {
         RentDetail detail = new RentDetail();
         range = (RentRange)productsRange[cnt];
         decimal indAmount = detail.CalLIAmountTotal(product.RentPerDay, range);
         detail = makeRentDetail(
             product.IndCanoeID, range.ReturnDate, null, 0, 1, indAmount);
         rentlist.Add(detail);
         totalAmount += indAmount;
         cnt++;
     }
     return rentlist;
 }
コード例 #2
0
ファイル: frmRent.cs プロジェクト: kayshoji/C-.Net
 // get rent range
 private ArrayList getRentProductRange()
 {
     manage.productsRange = new ArrayList();
     foreach (DataGridViewRow row in dataGridViewRent.Rows)
     {
         try
         {
             RentRange range = new RentRange();
             range.RentDate = DateTime.Parse(row.Cells[1].Value.ToString());
             range.ReturnDate = DateTime.Parse(row.Cells[2].Value.ToString());
             manage.productsRange.Add(range);
         }
         catch (Exception)
         {
         }
     }
     return manage.productsRange;
 }