예제 #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();
     }
 }