private SalaryProperties PopulateProperties()
 {
     var properties = new SalaryProperties
     {
         EmployeeId = this.employeeData.Id,
         Amount = this.NewSalaryAmount.Text,
         FromDate = this.SalaryStartsOn.Text
     };
     return properties;
 }
        public bool SendChangeEmployeeSalaryRequest(SalaryProperties populateProperties)
        {
            int empId;
            int.TryParse(populateProperties.EmployeeId, out empId);
            var request = new ChangeEmployeeSalaryRequest(empId)
            {
                Properties = populateProperties
            };

            var response = this.employeeService.ChangeSalary(request);
            if (response != null && response.Exception == null)
            {
                MessageBox.Show("Success");
                return true;
            }
            else if (response != null)
            {
                MessageBox.Show(response.Exception.ToString());
            }
            return false;
        }
        private Salary AssignAvailablePropertiesToDomain(SalaryProperties salaryProperties, Employee employee)
        {
            DateTime? nullableFromDate = DateTimeHelper.ParseNullableDateTime(salaryProperties.FromDate);
            double salaryAmount;
            double.TryParse(salaryProperties.Amount, out salaryAmount);

            Salary newSalary = Salary.CreateSalary(employee, salaryAmount, nullableFromDate);

            return newSalary;
        }