Exemple #1
0
 public DetailedTransaction(TransactionUser transactionUser, DatabaseContext db)
 {
     this.transactionUser = transactionUser;
     this.db = db;
     multiuserManager = new MultiuserManager(
         db, transactionUser.User, transactionUser.Transaction);
     if (transactionUser.Transaction.HouseholdExpence != null)
     {
         type = "Household expenses";
     }
     else if (transactionUser.Transaction.Wage != null)
     {
         type = "Wage";
     }
     else if (transactionUser.Transaction.Deposit != null)
     {
         type = "Income on deposit";
     }
     else if (transactionUser.Transaction.Grant != null)
     {
         type = "Scholarship";
     }
     else if (transactionUser.Transaction.OtherIncome != null)
     {
         type = "Other income";
     }
     else if (transactionUser.Transaction.Rent != null)
     {
         type = "Rent";
     }
     else if (transactionUser.Transaction.Credit != null)
     {
         type = "Credit expenses";
     }
     else if (transactionUser.Transaction.LongTermExpence != null)
     {
         type = "Long term expenses";
     }
     else if (transactionUser.Transaction.OtherExpence != null)
     {
         type = "Other expenses";
     }
 }
Exemple #2
0
 public DetailedTransaction(TransactionUser transactionUser, DatabaseContext db)
 {
     this.transactionUser = transactionUser;
     this.db          = db;
     multiuserManager = new MultiuserManager(
         db, transactionUser.User, transactionUser.Transaction);
     if (transactionUser.Transaction.HouseholdExpence != null)
     {
         type = "Household expenses";
     }
     else if (transactionUser.Transaction.Wage != null)
     {
         type = "Wage";
     }
     else if (transactionUser.Transaction.Deposit != null)
     {
         type = "Income on deposit";
     }
     else if (transactionUser.Transaction.Grant != null)
     {
         type = "Scholarship";
     }
     else if (transactionUser.Transaction.OtherIncome != null)
     {
         type = "Other income";
     }
     else if (transactionUser.Transaction.Rent != null)
     {
         type = "Rent";
     }
     else if (transactionUser.Transaction.Credit != null)
     {
         type = "Credit expenses";
     }
     else if (transactionUser.Transaction.LongTermExpence != null)
     {
         type = "Long term expenses";
     }
     else if (transactionUser.Transaction.OtherExpence != null)
     {
         type = "Other expenses";
     }
 }