Beispiel #1
0
 partial void Deletepromo_bonus(promo_bonus instance);
Beispiel #2
0
 partial void Insertpromo_bonus(promo_bonus instance);
Beispiel #3
0
 partial void Updatepromo_bonus(promo_bonus instance);
Beispiel #4
0
 public void InsertNewDiscountBonus(TimeSpan? hours, string itemsId, int? numOfItem, double? moneySum,
     double? sumDiscount)
 {
     var db = new dbDataContext();
     lock (db)
     {
         Table<promo_bonus> discountBonusesTable = db.GetTable<promo_bonus>();
         var promoBonus = new promo_bonus
         {
             promo_bonus_hours = hours,
             promo_bonus_item_to_buy = itemsId,
             promo_bonus_money_sum = moneySum,
             promo_bonus_num_of_item = numOfItem,
             promo_bonus_sum_discount = sumDiscount
         };
         try
         {
             discountBonusesTable.InsertOnSubmit(promoBonus);
             db.SubmitChanges();
         }
         catch (Exception)
         {
             MessageBox.Show(ErrorsAndWarningsMessages.ErrorsAndWarningsInstance().GetError(54));
         }
     }
 }