public int CreateNewCharge(Charge charge)
        {
            AuthorizationCheck();

            var repo = new ExpensesRepository();
            charge.ChargeId = 0;
            var dbCharge = repo.SaveCharge(new DbCharge(charge));

            return dbCharge.ChargeId;
        }
示例#2
0
 public DbCharge(Charge charge)
 {
     this.BilledAmount = charge.BilledAmount;
     this.ChargeId = charge.ChargeId;
     this.Description = charge.Description;
     this.EmployeeId = charge.EmployeeId;
     this.ExpenseDate = charge.ExpenseDate;
     this.ExpenseReportId = charge.ExpenseReportId;
     this.Location = charge.Location;
     this.Merchant = charge.Merchant;
     this.Notes = charge.Notes;
     this.TransactionAmount = charge.TransactionAmount;
 }