public RentalOrderDto(int _rentalOrderID, DateTime? _dateProcessed, int _employeeID, int _customerID, int _carID, string _tankLevel, int? _mileageStart, int? _mileageEnd, DateTime _rentStartDate, DateTime _rentEndDate, int? _days, decimal? _rateApplied, decimal? _orderTotal, string _orderStatus, CarDto _car, CustomerDto _customer, EmployeeDto _employee) { this.RentalOrderID = _rentalOrderID; this.DateProcessed = _dateProcessed; this.EmployeeID = _employeeID; this.CustomerID = _customerID; this.CarID = _carID; this.TankLevel = _tankLevel; this.MileageStart = _mileageStart; this.MileageEnd = _mileageEnd; this.RentStartDate = _rentStartDate; this.RentEndDate = _rentEndDate; this.Days = _days; this.RateApplied = _rateApplied; this.OrderTotal = _orderTotal; this.OrderStatus = _orderStatus; this.Car = _car; this.Customer = _customer; this.Employee = _employee; }
/// <summary> /// Updates an existing customer in the database from the given dto object. /// </summary> /// <param name="customer">The dto object.</param> public void UpdateCustomer(CustomerDto customer) { this.CustomerService.Update(customer); this.UnitOfWork.SaveChanges(); }
/// <summary> /// Adds a new customer from the given dto object into the database. /// </summary> /// <param name="customer">The dto object.</param> /// <returns>The dto key of the newly created customer.</returns> public string CreateCustomer(CustomerDto customer) { string key = this.CustomerService.Add(customer); this.UnitOfWork.SaveChanges(); return key; }