Example #1
0
 public List <Car> AllCars(CarYard yard)
 {
     return(yard.AllCars());
 }
Example #2
0
 public List <Car> GetAvailableCars(CarYard yard)
 {
     return(yard.GetAvailableCars());
 }
Example #3
0
 public List <Car> GetRentedCars(CarYard yard)
 {
     return(yard.GetRentedCars());
 }
Example #4
0
        // Constructor
        public Employee(int id, string name, DateTime dateOFBirth, string address, string telephoneNumber, CarYard carYard, string officeAddress, int extensionNumber, string username, string password, Role role) : base(id, name, dateOFBirth, address, telephoneNumber)
        {
            this.CarYard = carYard;
            if (string.IsNullOrWhiteSpace(officeAddress))
            {
                throw new ArgumentException("Please enter a valid office address");
            }

            this.officeAddress = officeAddress;

            this.ExtensionNumber = extensionNumber;
            if (string.IsNullOrWhiteSpace(username))
            {
                throw new ArgumentException("Please enter a valid username");
            }

            this.UserName = username;
            if (string.IsNullOrWhiteSpace(password))
            {
                throw new ArgumentException("Please enter a valid password");
            }

            this.Password = password;
            this.Role     = role;
        }