private void buttonDel_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("Вы действительно хотите удалить выбранное семейство растений?!!", "ЗАПРОС НА ПОДТВЕРЖДЕНИЕ ДЕЙСТВИЯ", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes) { var gen = (FamilyViewModel)FamilyBox.SelectedItem; familyService.DeleteFamily(gen.ID); Close(); } }
public ActionResult Delete(int curPage) { resp = familyService.DeleteFamily(Request); return(this.JudgeResult(resp, () => RedirectToAction("Details", new { curpage = curPage, msg = "删除成员完成" }))); }
public async Task <IActionResult> Delete(int id) { Result result = await _familyService.DeleteFamily(id); if (result.Success) { return(View("_DeleteModel")); } return(RedirectToAction("Error", "Error", new { result.ErrorCode, modelName = nameof(Order) })); }
public IHttpActionResult Delete(int id) { var response = service.DeleteFamily(id); return(Ok(response)); }