public async Task<StatusData<long>> AddEmployment(AddEmployeeRequest request, SystemSession session)
        {
            var serviceRequest = new Employment
            {
                Mode = (byte)SystemDbStatus.Updated,
                City = new City { CityId = request.CityId },
                PersonEmploymentId = 0,
                //RequestId = request.RequestId != 0 ? request.RequestId : 0,
                UserId = session.UserId,
                EmployeeInfo = new CompanyEmployeeInfo { CompanyId = request.CompanyId ?? 0, CompanyName = request.CompanyName, Position = request.Position, StartDate = request.StartDate.ToString(), EndDate = request.EndDate != null ? request.EndDate.ToString() : null, EmployeeTypeId = (int)request.EmployeeTypeId }
            };
            var response = await Task.Factory.StartNew(() => Client.UserService.upsertEmployeementHistory(serviceRequest, session.GetSession())).ConfigureAwait(false);

            var result = new StatusData<long> { Status = (SystemDbStatus)response.DbStatus.DbStatusCode, Message = response.DbStatus.DbStatusMsg, SubStatus = response.DbStatus.DbSubStatusCode };
            if (!request.EndDate.HasValue && result.Status.IsOperationSuccessful())
            {
                result.Data = response.PersonEmploymentId;
                var empSch = new EmployeeWorkScheduleUpdateRequest { PersonEmploymentId = response.PersonEmploymentId, ScheduleType = request.WorkSchedule.ScheduleType, Schedules = request.WorkSchedule.Schedules };
                await UpdateEmployeeWorkSchedule(empSch, session).ConfigureAwait(false);
            }

            return result;
        }
 public Task<StatusData<long>> AddEmployment(AddEmployeeRequest request, SystemSession session)
 {
     return _jUnitOfWork.ProfilePersonal.AddEmployment(request, session);
 }