public void AddFinancialRequest(RequestingDepartment department, Event reuqestedEvent, string ammountText, string reason, User user) { double ammount = double.Parse(ammountText); FinancialRequest financialRequest = new FinancialRequest(department, reuqestedEvent, ammount, reason, user); Seed.financialRequests.Add(financialRequest); }
public FinancialRequest(RequestingDepartment department, Event reuqestedEvent, double ammount, string reason, User user) { this.Department = department; this.Event = reuqestedEvent; this.Ammount = ammount; this.Reason = reason; this.User = user; }
public RecruitmentRequest(Contractype type, RequestingDepartment department, int yearsOfExperience, string jobTitle, string jobDescription, User user) { Contractype = type; RequestingDepartment = department; YearsOfExperience = yearsOfExperience; JobTitle = jobTitle; JobDescription = jobDescription; User = user; }
public RecruitmentRequest Create(Contractype contractype, RequestingDepartment requestingDepartment, string yearsOfExperience, string jobTitle, string jobDescription, User user) { if (string.IsNullOrEmpty(yearsOfExperience)) { throw new ApplicationException("Years of experience for the job is not specified"); } if (string.IsNullOrEmpty(jobTitle)) { throw new ApplicationException("Job Title is not specified"); } var recruitmentRequest = new RecruitmentRequest(contractype, requestingDepartment, int.Parse(yearsOfExperience), jobTitle, jobDescription, user); Seed.recruitmentRequests.Add(recruitmentRequest); return(recruitmentRequest); }