Пример #1
0
        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);
        }
Пример #2
0
 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;
 }
Пример #3
0
 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);
        }