示例#1
0
        /// <summary>
        /// 删除用户
        /// </summary>
        public void Delete()
        {
            int    id       = Convert.ToInt32(Request["cutomerId"]);
            Result isDelete = cbll.IsDelete("T_LibraryCollection", "customerId", id.ToString());

            if (isDelete == Result.关联引用)
            {
                Response.Write("该客户已被关联到其他表,不能删除!");
            }
            else
            {
                Result row = cbll.Delete(id);
                if (row == Result.除成功)
                {
                    Response.Write("删除成功");
                    Response.End();
                }
                else
                {
                    Response.Write("删除失败");
                    Response.End();
                }
            }
        }