public DetailDto getTransactionType(String id)
        {
            transaction_type transaction_Type = db.transaction_type.Where(s => s.id == id).FirstOrDefault();
            DetailDto        dto = new DetailDto(transaction_Type.id, transaction_Type.name);

            return(dto);
        }
Esempio n. 2
0
 public transaction_type find_transaction_type_By_AppId(string Appid)
 {
     try
     {
         transaction_type = db.transaction_types.SingleOrDefault(a => a.App_id == Appid);
         return(transaction_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 3
0
 public transaction_type find_transaction_type_By_ID(int id)
 {
     try
     {
         transaction_type = db.transaction_types.SingleOrDefault(a => a.id == id);
         return(transaction_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 4
0
 public transaction_type delete_transaction_type()
 {
     try
     {
         transaction_type prev_transaction_type = db.transaction_types.SingleOrDefault(a => a.id == transaction_type.id);
         db.transaction_types.DeleteOnSubmit(prev_transaction_type);
         return(transaction_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 5
0
        public transaction_type alter_transaction_type()
        {
            try
            {
                transaction_type prev_transaction_type = db.transaction_types.SingleOrDefault(a => a.id == transaction_type.id);


                prev_transaction_type.name = transaction_type.name;


                db.SubmitChanges();
                return(transaction_type);
            }
            catch (Exception)
            {
                return(null);
            }
        }
Esempio n. 6
0
 public transaction_type_crud(transaction_type transaction_type_)
 {
     this.transaction_type_ = transaction_type_;
 }