public ActionResult Del(Guid id) { if (orgService.Delete(id)) { return(Redirect(SiteConfig.SiteUrl + "/Org/Search")); } else { return(Content("<script>alert('注销异常~');</script>")); } }
private void DeleteOrg_Click(object sender, RoutedEventArgs e) { var result = MessageBox.Show("Are you sure?", "Delete", MessageBoxButton.YesNo); if (result == MessageBoxResult.Yes) { OrgViewModel orVM = OrgBox.SelectedItem as OrgViewModel; orgService.Delete(orVM.OrgID); orgs = orgService.GetAll(); OrgBox.ItemsSource = orgs; clients = clientService.GetAll(); ClientBox.ItemsSource = clients; orders = orderService.GetAll(); OrderBox.ItemsSource = orders; payments = paymentService.GetAll(); PaymentGrid.ItemsSource = payments; } }
public ApiResult Delete([FromBody] RequestOrgQDTO request) { OrgService orgService = new OrgService(); string reason; var ret = orgService.Delete(request, SecurityHelper.LoginUser.ID, out reason); if (!ret) { return(new ApiResult() { Status = EnumApiStatus.BizError, Msg = reason }); } else { return(ret.ToApiResult()); } }