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();
     }
 }
예제 #2
0
 public ActionResult Delete(int curPage)
 {
     resp = familyService.DeleteFamily(Request);
     return(this.JudgeResult(resp, () => RedirectToAction("Details", new
     {
         curpage = curPage,
         msg = "删除成员完成"
     })));
 }
예제 #3
0
        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) }));
        }
예제 #4
0
        public IHttpActionResult Delete(int id)
        {
            var response = service.DeleteFamily(id);

            return(Ok(response));
        }