Exemplo n.º 1
0
        /// <summary>
        /// 执行删除
        /// </summary>
        public void delPro()
        {
            int    recordid = int.Parse(Context.Request["Recordid"].ToString());
            Result row      = IsdeleteCollege();

            try
            {
                if (row == Result.记录不存在)
                {
                    Result result = titrecordbll.delete(recordid);
                    if (result == Result.除成功)
                    {
                        LogHelper.Info(this.GetType(), collegeAdmin.TeaAccount + " - " + collegeAdmin.TeaName + " - 删除" + recordid + "选题记录");
                        Response.Write("删除成功");
                        Response.End();
                    }
                    else
                    {
                        Response.Write("删除失败");
                        Response.End();
                    }
                }
                else
                {
                    Response.Write("在其他表中有关联不能删除");
                    Response.End();
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(this.GetType(), ex);
            }
        }