Пример #1
0
 public bool SaveExpensesType(expenses_type item)
 {
     try
     {
         ctxWrite.sp_expenses_type_Update(item.id, item.expenses_type1, item.delete_result);
         return(true);
     }
     catch { return(false); }
 }
Пример #2
0
 public expenses_type find_expenses_type_By_AppId(string Appid)
 {
     try
     {
         expenses_type = db.expenses_types.SingleOrDefault(a => a.app_id == Appid);
         return(expenses_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Пример #3
0
 public expenses_type find_expenses_type_By_ID(int id)
 {
     try
     {
         expenses_type = db.expenses_types.SingleOrDefault(a => a.id == id);
         return(expenses_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Пример #4
0
 public expenses_type delete_expenses_type()
 {
     try
     {
         expenses_type prev_expenses_type = db.expenses_types.SingleOrDefault(a => a.id == expenses_type.id);
         db.expenses_types.DeleteOnSubmit(prev_expenses_type);
         return(expenses_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Пример #5
0
 public expenses_type alter_expenses_type()
 {
     try
     {
         expenses_type prev_expenses_type = db.expenses_types.SingleOrDefault(a => a.id == expenses_type.id);
         prev_expenses_type.description = expenses_type.description;
         prev_expenses_type.name        = expenses_type.name;
         db.SubmitChanges();
         return(expenses_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Пример #6
0
 public expenses_type_crud(expenses_type expenses_type_)
 {
     this.expenses_type_ = expenses_type_;
 }