Esempio n. 1
0
		private void detach_promo_usage_histories(promo_usage_history entity)
		{
			this.SendPropertyChanging();
			entity.global_session_t = null;
		}
Esempio n. 2
0
		private void attach_promo_usage_histories(promo_usage_history entity)
		{
			this.SendPropertyChanging();
			entity.days_sessions_t = this;
		}
Esempio n. 3
0
 partial void Deletepromo_usage_history(promo_usage_history instance);
Esempio n. 4
0
 partial void Updatepromo_usage_history(promo_usage_history instance);
Esempio n. 5
0
 partial void Insertpromo_usage_history(promo_usage_history instance);
Esempio n. 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();
     }
 }