Example #1
0
 private void CreateRentalItem(Rental rent)
 {
     foreach (RentalItem itm in rent.Items)
     {
         RentalItem item = new RentalItem
         {
             RentalId = rent.RentalId,
             ItemId = itm.ItemId,
             Deskripsi = itm.Deskripsi,
             Qty = itm.Qty,
             Harga = itm.Harga,
             Total = itm.Total
         };
         Penyewaan.CreateRentalItem(item);
     }
 }
Example #2
0
 private decimal CreateRentalSummary(Rental rent)
 {
     decimal subtotal = 0;
     foreach (RentalItem itm in rent.Items)
     {
         subtotal += itm.Total;
     }
     RentalSummary summary = new RentalSummary()
     {
         RentalId = rent.RentalId,
         Total = subtotal
     };
     Penyewaan.CreateRentalSummary(summary);
     return subtotal;
 }
Example #3
0
 private void CreateRentalHeader(Rental rent)
 {
     RentalHeader header = new RentalHeader
     {
         CustId = rent.CustId,
         DueDate = rent.DueDate,
         RentalId = rent.RentalId,
         RentalNo = rent.RentalNo,
         TransactionDate = rent.TransactionDate,
         Status = RentalStatus.APPROVED
     };
     Penyewaan.CreateRentalHeader(header);
 }