// api/Employer/Delete
        public IHttpActionResult Post(string id)
        {
            if (!_employerService.DeleteEmployer(id))
            {
                return(InternalServerError());
            }

            return(Ok());
        }
示例#2
0
        public IActionResult Delete(string EmployerId)
        {
            var result = service.DeleteEmployer(EmployerId);

            return(Ok(new SuccessResponse <string>
            {
                Code = 200,
                Data = result
            }));
        }
示例#3
0
        private void btDeleteEmployer_Click(object sender, RoutedEventArgs e)
        {
            var result = MessageBox.Show("Вы уверены?", "Удалить запись", MessageBoxButton.YesNo);

            if (result == MessageBoxResult.Yes)
            {
                var employerModel = (EmployerViewModels)dGridEmployer.SelectedItem;
                employerService.DeleteEmployer(employerModel.EmployerId);
                ResetCollectionWithFilters("EmployersViewModel");//нужно ли reset делать для др viewmodel
                ResetCollection("VacanciesViewModel");
                dGridEmployer.SelectedIndex = 0;
            }
        }
示例#4
0
 public IActionResult DeleteEmployer(int id)
 {
     _employerService.DeleteEmployer(id);
     return(RedirectToAction("Index"));
 }