Ejemplo n.º 1
0
 public ExpensesMyClass ConvertDbTableToMyClass(expenses_t expense)
 {
     var e = new ExpensesMyClass
     {
         ID_затрат = expense.expense_id,
         Время = expense.expenses_time,
         Денег_потрачено = expense.cash_amount,
         Описание = expense.comments
     };
     return e;
 }
Ejemplo n.º 2
0
 partial void Deleteexpenses_t(expenses_t instance);
Ejemplo n.º 3
0
 partial void Updateexpenses_t(expenses_t instance);
Ejemplo n.º 4
0
 partial void Insertexpenses_t(expenses_t instance);
Ejemplo n.º 5
0
		private void detach_expenses_ts(expenses_t entity)
		{
			this.SendPropertyChanging();
			entity.global_session_t = null;
		}
Ejemplo n.º 6
0
        public void InsertExpensesRecord(double money, string comments, DateTime expensesTime)
        {
            var db = new dbDataContext();
            lock (db)
            {
                Table<expenses_t> expensesTable = db.GetTable<expenses_t>();
                var expenses = new expenses_t
                {

                    daily_id = GetLastOpenedGlobalSessionDailyId(),
                    comments = comments,
                    cash_amount = money,
                    expenses_time = expensesTime
                };
                expensesTable.InsertOnSubmit(expenses);
                db.SubmitChanges();
            }
        }