Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         className = bll.GetTitle(type);
         if (type == 1)
         {
             this.ColumnListBind();
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 返回面包屑
 public string ChannelMenu(int category_id,string _str)
 {
     StringBuilder sb = new StringBuilder();
     BLL.contents.article_category bll = new BLL.contents.article_category();
     DataTable dt = bll.GetList(0, "id=" + category_id, "sort_id asc,id desc").Tables[0];
     if (dt.Rows.Count > 0 && dt.Rows != null)
     {
         string _class_list = dt.Rows[0]["class_list"].ToString();
         string[] arr = _class_list.Replace(",1,", "").Trim(',').ToString().Split(',');
         if (arr.Length > 0)
         {
             for (int i = 0; i < arr.Length; i++)
             {
                 sb.Append("" + _str + "<a href=\"" + Url(Convert.ToInt32(arr[i])) + "\">" + bll.GetTitle(Convert.ToInt32(arr[i])) + "</a>");
             }
         }
     }
     return sb.ToString();
 }
Ejemplo n.º 3
0
 private void delete_category(HttpContext context)
 {
     //取得管理员登录信息
     Model.managers.manager adminInfo = new Web.UI.ManagePage().GetAdminInfo();
     if (adminInfo == null)
     {
         context.Response.Write("{\"status\": 0, \"msg\": \"未登录或已超时,请重新登录!\"}");
         return;
     }
     int category_id = OSRequest.GetQueryInt("category_id");
     if (category_id == 0)
     {
         context.Response.Write("{\"status\": 0, \"msg\": \"参数错误!\"}");
         return;
     }
     BLL.contents.article_category bll = new BLL.contents.article_category();
     new BLL.managers.manager_log().Add(adminInfo.id, adminInfo.user_name, OSEnums.ActionEnum.Edit.ToString(), "删除栏目:" + bll.GetTitle(category_id)); //记录日志
     bll.Delete(category_id);
     context.Response.Write("{\"status\": 1, \"msg\": \"栏目删除成功!\"}");
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 返回面包屑
        public string ChannelMenu(int category_id, string _str)
        {
            StringBuilder sb = new StringBuilder();

            BLL.contents.article_category bll = new BLL.contents.article_category();
            DataTable dt = bll.GetList(0, "id=" + category_id, "sort_id asc,id desc").Tables[0];

            if (dt.Rows.Count > 0 && dt.Rows != null)
            {
                string   _class_list = dt.Rows[0]["class_list"].ToString();
                string[] arr         = _class_list.Replace(",1,", "").Trim(',').ToString().Split(',');
                if (arr.Length > 0)
                {
                    for (int i = 0; i < arr.Length; i++)
                    {
                        sb.Append("" + _str + "<a href=\"" + Url(Convert.ToInt32(arr[i])) + "\">" + bll.GetTitle(Convert.ToInt32(arr[i])) + "</a>");
                    }
                }
            }
            return(sb.ToString());
        }
Ejemplo n.º 5
0
        private void delete_category(HttpContext context)
        {
            //取得管理员登录信息
            Model.managers.manager adminInfo = new Web.UI.ManagePage().GetAdminInfo();
            if (adminInfo == null)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"未登录或已超时,请重新登录!\"}");
                return;
            }
            int category_id = OSRequest.GetQueryInt("category_id");

            if (category_id == 0)
            {
                context.Response.Write("{\"status\": 0, \"msg\": \"参数错误!\"}");
                return;
            }
            BLL.contents.article_category bll = new BLL.contents.article_category();
            new BLL.managers.manager_log().Add(adminInfo.id, adminInfo.user_name, OSEnums.ActionEnum.Edit.ToString(), "删除栏目:" + bll.GetTitle(category_id)); //记录日志
            bll.Delete(category_id);
            context.Response.Write("{\"status\": 1, \"msg\": \"栏目删除成功!\"}");
        }