Esempio n. 1
0
        public JsonResult Delete(string Ids)
        {
            string[] arr = Ids.Split(',').ToArray();
            if (arr.Length <= 0)
            {
                return(Json(new { ret = "-999", msg = "请选择要删除的记录!" }));
            }
            List <Guid> delIds = new List <Guid>();

            foreach (var item in arr)
            {
                delIds.Add(Guid.Parse(item));
            }
            bool IsSucceed = _BannerAppService.DeleteBatch(delIds);

            return(Json(new { ret = IsSucceed ? "0000" : "-999", msg = IsSucceed ? "删除成功!" : "删除失败,请先删除外键关联记录!" }));
        }