Esempio n. 1
0
 public ActionResult Del(string id)
 {
     try
     {
         bool result = bll.Delete(bll.GetById(id));
         if (result)
         {
             return(Json(new { success = true, msg = "操作成功" }));
         }
         else
         {
             return(Json(new { success = false, msg = "操作失败" }));
         }
     }
     catch (Exception ex)
     {
         return(Json(new { success = false, msg = "服务器内部错误" }));
     }
 }
Esempio n. 2
0
        public int Delete(string Ids)
        {
            var arr    = Ids.Split(',');
            var result = 0;

            for (int i = 0; i < arr.Length; i++)
            {
                result += bll.Delete(Convert.ToInt32(arr[i]));
            }
            return(result);
        }