Пример #1
0
 public string DeleteConfirmed()
 {
     try
     {
         string ids    = Request["ids"] ?? "";
         int[]  idList = WebComm.GetIntArrayByString(ids);
         foreach (int item in idList)
         {
             UserAccount ua = db.UserAccounts.Find(item);
             if (ua != null)
             {
                 db.UserAccounts.Remove(ua);
             }
         }
         db.SaveChanges();
         return(WebComm.ReturnAlertMessage(ActionReturnStatus.成功, "删除成功", "UserAccountList", "", CallBackType.none, ""));
     }
     catch (Exception ex)
     {
         return(WebComm.ReturnAlertMessage(ActionReturnStatus.失败, "删除失败!" + ex.Message, "", "", CallBackType.none, ""));
     }
 }