Beispiel #1
0
 private void updateDictionary()
 {
     if (idClient != -1)
     {
         discountFactor = ticketBL.getDiscounts(listAdded, idClient, (comboBox1.SelectedIndex));
         totalSaleDisc  = 0;
         foreach (Product p in listAdded)
         {
             if (discountFactor.ContainsKey(p.Id))
             {
                 p.SubtotalDisc = p.Subtotal * discountFactor[p.Id];
             }
             else
             {
                 p.SubtotalDisc = p.Subtotal;
             }
             totalSaleDisc += p.SubtotalDisc;
         }
     }
 }