Exemplo n.º 1
0
 public void OnContractorCreation(Contractor contractor)
 {
     var a = contractor;
     IPrivileges b = new HollidayPrivilege(a);
     b.AddPrivilege();
     IPrivileges d = new SalaryBonusPrivilege(a);
     d.AddPrivilege();
     _displayInfoAction.DisplayInfo(contractor);
     //contractor.DisplayAll();
 }
Exemplo n.º 2
0
 public ContractorModel(Contractor cont)
     : base(cont)
 {
     PersonType = cont.PersonType;
     City = cont.Address.City;
     Street = cont.Address.Street;
     CompanyName = cont.Company.CompanyName;
     Salary = cont.Salary.Amount;
     WorkExp = cont.WorkExp;
 }
Exemplo n.º 3
0
 public Contractor CreateContractor(string fName, string lName, DateTime bdate,
     Dictionary<string, int> skillsDictionary,
     Address address, Company company, double workexp, Salary salary)
 {
     var contractor = new Contractor(fName, lName, bdate, skillsDictionary,  address, company,
         workexp, salary);
     OnContractorCreation(contractor);
     Logger.Logger.AddToLog("ContractorFactory|CreateContractor Contractor");
     //IPrivileges a = contractor;
     //IPrivileges b = new HollidayPrivilege(a);
     //IPrivileges d = new SalaryBonusPrivilege(b);
     //d.AddPrivilege();
     //var salaryCalculator = new SalaryCalculator();
     //contractor.Salary = salaryCalculator.Calculate(contractor.Salary, new ContractorSalaryCalculator());
     return contractor;
 }
Exemplo n.º 4
0
 public virtual void AddWorker(Contractor worker)
 {
     Contractor = worker;
 }