예제 #1
0
        public async Task <IActionResult> PostEmployer(Guid companyId, [FromBody] EmployerPostRequest request)
        {
            try
            {
                if (request == null)
                {
                    return(BadRequest(request));
                }

                await _employerService.UpdateEmployer(request.EmployerId, new Application.Entities.EmployerEntity()
                {
                    CompanyId  = request.CompanyId,
                    Name       = request.Name,
                    LastName   = request.LastName,
                    EmployerId = request.EmployerId,
                    Birthday   = request.Birthday,
                    Genre      = request.Genre
                });

                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(request));
            }
        }
 public async Task <IActionResult> UpdateEmployerBusinessDetails([FromBody] SaveEmployerModel saveEmplyerdModel)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     return(Ok(await _employerService.UpdateEmployer(saveEmplyerdModel)));
 }
예제 #3
0
        // api/Employer/Update
        public IHttpActionResult Put(EmployerUpdate employer)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }


            if (!_employerService.UpdateEmployer(employer))
            {
                return(InternalServerError());
            }

            return(Ok());
        }
예제 #4
0
        private void btEditEmployer_Click(object sender, RoutedEventArgs e)
        {
            EmployerViewModels employerModel = dGridEmployer.SelectedItem as EmployerViewModels;
            int Index = dGridEmployer.SelectedIndex;
            var ae    = new EditEmployer(employerModel);

            ae.Title = "Изменить запсиь";
            ae.Owner = this;
            var result = ae.ShowDialog();

            if (result == true)
            {
                employerService.UpdateEmployer(employerModel);
                ResetCollection("EmployerViewModel");
                ResetCollection("VacanciesViewModel");
                ae.Close();
            }
        }
예제 #5
0
 public IActionResult EditEmployer(NewEmployerVm model)
 {
     _employerService.UpdateEmployer(model);
     return(RedirectToAction("Index"));
 }