Exemplo n.º 1
0
        public ActionResult Delete(int primaryKey)
        {
            long count = OrganizeService.GetChildCount(primaryKey);

            if (count == 0)
            {
                int row = OrganizeService.Delete(primaryKey);
                return(row > 0 ? Success() : Error());
            }
            return(Error(string.Format("操作失败,请先删除该项的{0}个子级机构。", count)));
        }