Ejemplo n.º 1
0
 partial void Deletecash_t(cash_t instance);
Ejemplo n.º 2
0
 partial void Updatecash_t(cash_t instance);
Ejemplo n.º 3
0
		private void detach_cash_ts(cash_t entity)
		{
			this.SendPropertyChanging();
			entity.global_session_t = null;
		}
Ejemplo n.º 4
0
 partial void Insertcash_t(cash_t instance);
Ejemplo n.º 5
0
 public void AddMoneyToCash(double cash, int dailyId)
 {
     var db = new dbDataContext();
     lock (db)
     {
     //                int dId = GetOpenedGlobalSession().daily_id;
         var getCashFromCurrentSession = (from c in db.GetTable<cash_t>()
             where c.daily_id == dailyId
             select c).SingleOrDefault();
         if (getCashFromCurrentSession != null)
         {
             getCashFromCurrentSession.cash_amount = getCashFromCurrentSession.cash_amount + cash;
             db.SubmitChanges();
         }
         else
         {
             var cashTable = db.GetTable<cash_t>();
             var cashT = new cash_t {cash_amount = cash, daily_id = dailyId};
             cashTable.InsertOnSubmit(cashT);
             db.SubmitChanges();
         }
     }
 }