Пример #1
0
		private void detach_promo_usage_histories(promo_usage_history entity)
		{
			this.SendPropertyChanging();
			entity.global_session_t = null;
		}
Пример #2
0
		private void attach_promo_usage_histories(promo_usage_history entity)
		{
			this.SendPropertyChanging();
			entity.days_sessions_t = this;
		}
Пример #3
0
 partial void Deletepromo_usage_history(promo_usage_history instance);
Пример #4
0
 partial void Updatepromo_usage_history(promo_usage_history instance);
Пример #5
0
 partial void Insertpromo_usage_history(promo_usage_history instance);
Пример #6
0
 public void AddNewPromoUsage(int sessionid, string comment, double sum)
 {
     var db = new dbDataContext();
     lock (db)
     {
         Table<promo_usage_history> usageHistoryTable = db.GetTable<promo_usage_history>();
         var usageHistory = new promo_usage_history
         {
             daily_id = GetLastOpenedGlobalSessionDailyId(),
             promo_bonus_comment = comment,
             promo_discount_sum = sum,
             session_id = sessionid
         };
         usageHistoryTable.InsertOnSubmit(usageHistory);
         db.SubmitChanges();
     }
 }