コード例 #1
0
ファイル: BasePage.cs プロジェクト: eryueren/OScms
        /// <summary>
        /// 获取Foot菜单项
        /// </summary>
        /// <returns></returns>
        public static string GetMenuFootLst()
        {
            StringBuilder rStr = new StringBuilder();

            BLL.contents.article_category bll = new BLL.contents.article_category();
            DataTable dt = bll.GetLists(1, " parent_id=1  and id!=91  and  is_lock=0 ");

            if (dt != null && dt.Rows.Count > 0)
            {
                int num = 1;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    rStr.Append("<dl>");
                    rStr.Append(" <dt><a href=\"" + dt.Rows[i]["link_url"] + "\">");
                    rStr.Append(dt.Rows[i]["title"]);
                    DataTable dtChild  = bll.GetLists(Convert.ToInt32(dt.Rows[i]["id"]), " parent_id=" + dt.Rows[i]["id"] + "  and  is_lock=0 ");
                    int       numChild = 1;
                    for (int ic = 0; ic < dtChild.Rows.Count; ic++)
                    {
                        rStr.Append("<dd>");
                        rStr.Append("<a  id=\"child" + numChild + "\" href=\"" + dtChild.Rows[ic]["link_url"]);
                        rStr.Append("?IdF=" + dtChild.Rows[ic]["parent_id"] + "&id=" + dtChild.Rows[ic]["id"] + "&mId=" + numChild + "\">" + dtChild.Rows[ic]["title"].ToString() + "</a>");
                        numChild++;
                        rStr.Append("</dd>");
                    }
                    rStr.Append("</a></dt>");
                    rStr.Append("</dl>");
                    num++;
                }
            }
            return(rStr.ToString());
        }
コード例 #2
0
        protected void ColumnListBind()
        {
            DataTable dt = bll.GetLists(0, "channel_id>0 ");

            this.ColumnList.DataSource = dt;
            this.ColumnList.DataBind();
        }
コード例 #3
0
        //数据绑定
        private void RptBind()
        {
            BLL.contents.article_category bll = new BLL.contents.article_category();
            DataTable dt = bll.GetLists(0, "");

            this.rptList.DataSource = dt;
            this.rptList.DataBind();
        }
コード例 #4
0
ファイル: BasePage.cs プロジェクト: eryueren/OScms
        /// <summary>
        /// 获取菜单项
        /// </summary>
        /// <returns></returns>
        public static string GetMenuAndChildLstByFidAndId(int Fid, int id)
        {
            StringBuilder rStr = new StringBuilder();

            BLL.contents.article_category bll = new BLL.contents.article_category();
            //一级菜单
            DataTable dt = bll.GetList(-1, " parent_id=" + Fid + "   and  is_lock=0  and model_id<5 ", "sort_id").Tables[0];

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string classStr = string.Empty;
                    if (id == Convert.ToInt32(dt.Rows[i]["id"]))
                    {
                        classStr = "class=\"changechild\"";
                    }
                    //二级菜单
                    DataTable dtChild = bll.GetLists(Convert.ToInt32(dt.Rows[i]["id"]), " parent_id=" + dt.Rows[i]["id"] + "  and  is_lock=0  and id not in(221,147,154,206,207,251,252,253,254,257) and   model_id<5");
                    if (dtChild.Rows.Count > 0)
                    {
                        rStr.Append(" <li " + classStr + "  id=\"child" + dt.Rows[i]["id"] + "\"> <div> <a><b>");
                        rStr.Append(dt.Rows[i]["title"]);
                        rStr.Append(" </b> <span class=\"arrow up\"></span></a></div>");
                        rStr.Append("<ul class=\"body_int_gk_li_div\" style=\"display: block;\">");
                    }
                    else
                    {
                        rStr.Append(" <li " + classStr + " id=\"child" + dt.Rows[i]["id"] + "\"> <a   href=\"" + dt.Rows[i]["link_url"] + "?id=" + dt.Rows[i]["id"] + "\">");
                        rStr.Append(dt.Rows[i]["title"]);
                        rStr.Append(" </a>");
                    }
                    int numChild = 1;
                    for (int ic = 0; ic < dtChild.Rows.Count; ic++)
                    {
                        rStr.Append("<li><a  id=\"child" + numChild + "\" href=\"" + dtChild.Rows[ic]["link_url"]);
                        rStr.Append("?id=" + dtChild.Rows[ic]["id"] + "\">" + dtChild.Rows[ic]["title"].ToString() + "</a></li>");
                        numChild++;
                    }
                    if (dtChild.Rows.Count > 0)
                    {
                        rStr.Append("</ul>");
                    }
                    rStr.Append("</li>");
                }
            }
            return(rStr.ToString());
        }
コード例 #5
0
ファイル: BasePage.cs プロジェクト: eryueren/OScms
        /// <summary>
        /// 获取菜单项
        /// </summary>
        /// <returns></returns>
        public static string GetMenuAndChildLst()
        {
            StringBuilder rStr = new StringBuilder();

            BLL.contents.article_category bll = new BLL.contents.article_category();
            //一级菜单
            DataTable dt = bll.GetList(-1, " parent_id=1   and  is_lock=0  and model_id<5 ", "sort_id").Tables[0];

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    rStr.Append(" <li  id=\"menu" + dt.Rows[i]["id"] + "\"> <span  class=\"nav_span_f\"><a  href=\"" + dt.Rows[i]["link_url"] + "\">");
                    rStr.Append(dt.Rows[i]["title"]);
                    rStr.Append(" </span></a>");
                    //二级菜单
                    DataTable dtChild = bll.GetLists(Convert.ToInt32(dt.Rows[i]["id"]), " parent_id=" + dt.Rows[i]["id"] + "  and  is_lock=0  and id not in(96,97,121,122,128,129,130) and   model_id<5");
                    if (dtChild.Rows.Count > 0)
                    {
                        rStr.Append("<div>");
                    }
                    for (int ic = 0; ic < dtChild.Rows.Count; ic++)
                    {
                        if (dtChild.Rows[ic]["id"].ToString().Trim() == "167")
                        {
                            rStr.Append("<a  id=\"child" + dtChild.Rows[ic]["id"] + "\"  target=\"_blank\"  href=\"" + dtChild.Rows[ic]["link_url"]);
                        }
                        else
                        {
                            rStr.Append("<a  id=\"child" + dtChild.Rows[ic]["id"] + "\" href=\"" + dtChild.Rows[ic]["link_url"]);
                        }
                        rStr.Append("?id=" + dtChild.Rows[ic]["id"] + "\"><span>" + dtChild.Rows[ic]["title"].ToString() + "</span></a>");
                    }
                    if (dtChild.Rows.Count > 0)
                    {
                        rStr.Append("</div>");
                    }
                    rStr.Append("</li>");
                }
            }
            return(rStr.ToString());
        }
コード例 #6
0
        private void ShowInfo(DropDownList ddl)
        {
            //BLL.carts.orders bll = new BLL.carts.orders();
            //Model.carts.orders model = bll.GetModel(_order_no);

            //BLL.carts.express bll2 = new BLL.carts.express();
            //DataTable dt = bll2.GetList("").Tables[0];
            //ddlExpressId.Items.Clear();
            //ddlExpressId.Items.Add(new ListItem("请选择配送方式", ""));
            //foreach (DataRow dr in dt.Rows)
            //{
            //    ddlExpressId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString()));
            //}

            //txtExpressNo.Text = model.express_no;
            //ddlExpressId.SelectedValue = model.express_id.ToString();


            BLL.contents.article_category bll = new BLL.contents.article_category();
            DataTable dt = bll.GetLists(1, "channel_id>0 ");

            ddl.Items.Clear();
            ddl.Items.Add(new ListItem(siteConfig.webname, "1"));
            foreach (DataRow dr in dt.Rows)
            {
                string Id         = dr["id"].ToString();
                int    ClassLayer = int.Parse(dr["class_layer"].ToString());
                string Title      = dr["title"].ToString().Trim();

                if (ClassLayer == 2)
                {
                    ddl.Items.Add(new ListItem(Title, Id));
                }
                else
                {
                    Title = "├ " + Title;
                    Title = Utils.StringOfChar(ClassLayer - 1, " ") + Title;
                    ddl.Items.Add(new ListItem(Title, Id));
                }
            }
        }
コード例 #7
0
ファイル: BasePage.cs プロジェクト: eryueren/OScms
        /// <summary>
        /// 获取菜单项
        /// </summary>
        /// <returns></returns>
        public static string GetMenuLst()
        {
            StringBuilder rStr = new StringBuilder();

            BLL.contents.article_category bll = new BLL.contents.article_category();
            //一级菜单
            DataTable dt = bll.GetLists(1, " parent_id=1  and  is_lock=0 ");

            if (dt != null && dt.Rows.Count > 0)
            {
                int num = 1;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    rStr.Append(" <li><a id=\"menu" + dt.Rows[i]["id"] + "\" class=\"\"  href=\"" + dt.Rows[i]["link_url"] + "\">");
                    rStr.Append(dt.Rows[i]["title"]);
                    rStr.Append("</a></li>");
                }
                num++;
            }
            return(rStr.ToString());
        }
コード例 #8
0
ファイル: dialog_category.aspx.cs プロジェクト: eyren/OScms
        private void ShowInfo(DropDownList  ddl)
        {
            //BLL.carts.orders bll = new BLL.carts.orders();
            //Model.carts.orders model = bll.GetModel(_order_no);

            //BLL.carts.express bll2 = new BLL.carts.express();
            //DataTable dt = bll2.GetList("").Tables[0];
            //ddlExpressId.Items.Clear();
            //ddlExpressId.Items.Add(new ListItem("请选择配送方式", ""));
            //foreach (DataRow dr in dt.Rows)
            //{
            //    ddlExpressId.Items.Add(new ListItem(dr["title"].ToString(), dr["id"].ToString()));
            //}

            //txtExpressNo.Text = model.express_no;
            //ddlExpressId.SelectedValue = model.express_id.ToString();

            BLL.contents.article_category bll = new BLL.contents.article_category();
            DataTable dt = bll.GetLists(1, "channel_id>0 ");

            ddl.Items.Clear();
            ddl.Items.Add(new ListItem(siteConfig.webname, "1"));
            foreach (DataRow dr in dt.Rows)
            {
                string Id = dr["id"].ToString();
                int ClassLayer = int.Parse(dr["class_layer"].ToString());
                string Title = dr["title"].ToString().Trim();

                if (ClassLayer == 2)
                {
                    ddl.Items.Add(new ListItem(Title, Id));
                }
                else
                {
                    Title = "├ " + Title;
                    Title = Utils.StringOfChar(ClassLayer - 1, " ") + Title;
                    ddl.Items.Add(new ListItem(Title, Id));
                }
            }
        }
コード例 #9
0
ファイル: BasePage.cs プロジェクト: eryueren/OScms
        /// <summary>
        /// 获取菜单项
        /// </summary>
        /// <returns></returns>
        public static string GetMenuLstOfPhone()
        {
            StringBuilder rStr = new StringBuilder();

            BLL.contents.article_category bll = new BLL.contents.article_category();
            //一级菜单
            DataTable dt = bll.GetLists(1, " parent_id=1  and  is_lock=0 ");

            if (dt != null && dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    switch (Convert.ToInt32(dt.Rows[i]["id"]))
                    {
                    case 123:
                        rStr.Append(" <li ><a href=\"index.aspx\">");
                        break;

                    case 129:
                        rStr.Append(" <li ><a href=\"jqg.aspx?fId=" + dt.Rows[i]["id"] + "&cId=137\">");
                        break;

                    case 134:
                        rStr.Append(" <li ><a href=\"jqg.aspx?fId=" + dt.Rows[i]["id"] + "&cId=135\">");
                        break;

                    default:
                        rStr.Append(" <li ><a href=\"jqg.aspx?fId=" + dt.Rows[i]["id"] + "&cId=" + dt.Rows[i]["id"] + "\">");
                        break;
                    }
                    rStr.Append(dt.Rows[i]["title"]);
                    rStr.Append("<i></i></a></li>");
                }
            }
            return(rStr.ToString());
        }
コード例 #10
0
ファイル: role_edit.aspx.cs プロジェクト: eyren/OScms
 private void NavBind()
 {
     BLL.contents.article_category bll = new BLL.contents.article_category();
     DataTable dt = bll.GetLists(0, "");
     this.rptList.DataSource = dt;
     this.rptList.DataBind();
 }
コード例 #11
0
ファイル: BasePage.cs プロジェクト: eyren/OScms
 /// <summary>
 /// 获取菜单项
 /// </summary>
 /// <returns></returns>
 public static string GetMenuLstOfPhone()
 {
     StringBuilder rStr = new StringBuilder();
     BLL.contents.article_category bll = new BLL.contents.article_category();
     //一级菜单
     DataTable dt = bll.GetLists(1, " parent_id=1  and  is_lock=0 ");
     if (dt != null && dt.Rows.Count > 0) {
         for (int i = 0; i < dt.Rows.Count; i++) {
             switch (Convert.ToInt32(dt.Rows[i]["id"])) {
                 case 123:
                     rStr.Append(" <li ><a href=\"index.aspx\">");
                     break;
                 case 129:
                     rStr.Append(" <li ><a href=\"jqg.aspx?fId=" + dt.Rows[i]["id"] + "&cId=137\">");
                     break;
                 case 134:
                     rStr.Append(" <li ><a href=\"jqg.aspx?fId=" + dt.Rows[i]["id"] + "&cId=135\">");
                     break;
                 default:
                     rStr.Append(" <li ><a href=\"jqg.aspx?fId=" + dt.Rows[i]["id"] + "&cId=" + dt.Rows[i]["id"] + "\">");
                     break;
             }
             rStr.Append(dt.Rows[i]["title"]);
             rStr.Append("<i></i></a></li>");
         }
     }
     return rStr.ToString();
 }
コード例 #12
0
ファイル: BasePage.cs プロジェクト: eyren/OScms
 /// <summary>
 /// 获取菜单项
 /// </summary>
 /// <returns></returns>
 public static string GetMenuLst()
 {
     StringBuilder rStr = new StringBuilder();
     BLL.contents.article_category bll = new BLL.contents.article_category();
     //一级菜单
     DataTable dt = bll.GetLists(1, " parent_id=1  and  is_lock=0 ");
     if (dt != null && dt.Rows.Count > 0) {
         int num = 1;
         for (int i = 0; i < dt.Rows.Count; i++) {
             rStr.Append(" <li><a id=\"menu" + dt.Rows[i]["id"] + "\" class=\"\"  href=\"" + dt.Rows[i]["link_url"] + "\">");
             rStr.Append(dt.Rows[i]["title"]);
             rStr.Append("</a></li>");
         }
         num++;
     }
     return rStr.ToString();
 }
コード例 #13
0
ファイル: BasePage.cs プロジェクト: eyren/OScms
 /// <summary>
 /// 获取Foot菜单项
 /// </summary>
 /// <returns></returns>
 public static string GetMenuFootLst()
 {
     StringBuilder rStr = new StringBuilder();
     BLL.contents.article_category bll = new BLL.contents.article_category();
     DataTable dt = bll.GetLists(1, " parent_id=1  and id!=91  and  is_lock=0 ");
     if (dt != null && dt.Rows.Count > 0) {
         int num = 1;
         for (int i = 0; i < dt.Rows.Count; i++) {
             rStr.Append("<dl>");
             rStr.Append(" <dt><a href=\"" + dt.Rows[i]["link_url"] + "\">");
             rStr.Append(dt.Rows[i]["title"]);
             DataTable dtChild = bll.GetLists(Convert.ToInt32(dt.Rows[i]["id"]), " parent_id=" + dt.Rows[i]["id"] + "  and  is_lock=0 ");
             int numChild = 1;
             for (int ic = 0; ic < dtChild.Rows.Count; ic++) {
                 rStr.Append("<dd>");
                 rStr.Append("<a  id=\"child" + numChild + "\" href=\"" + dtChild.Rows[ic]["link_url"]);
                 rStr.Append("?IdF=" + dtChild.Rows[ic]["parent_id"] + "&id=" + dtChild.Rows[ic]["id"] + "&mId=" + numChild + "\">" + dtChild.Rows[ic]["title"].ToString() + "</a>");
                 numChild++;
                 rStr.Append("</dd>");
             }
             rStr.Append("</a></dt>");
             rStr.Append("</dl>");
             num++;
         }
     }
     return rStr.ToString();
 }
コード例 #14
0
ファイル: BasePage.cs プロジェクト: eyren/OScms
        /// <summary>
        /// 获取菜单项
        /// </summary>
        /// <returns></returns>
        public static string GetMenuAndChildLstByFidAndId(int Fid, int id)
        {
            StringBuilder rStr = new StringBuilder();
            BLL.contents.article_category bll = new BLL.contents.article_category();
            //一级菜单
            DataTable dt = bll.GetList(-1, " parent_id=" + Fid + "   and  is_lock=0  and model_id<5 ", "sort_id").Tables[0];
            if (dt != null && dt.Rows.Count > 0) {
                for (int i = 0; i < dt.Rows.Count; i++) {
                    string classStr = string.Empty;
                    if (id == Convert.ToInt32(dt.Rows[i]["id"])) {
                        classStr = "class=\"changechild\"";
                    }
                    //二级菜单
                    DataTable dtChild = bll.GetLists(Convert.ToInt32(dt.Rows[i]["id"]), " parent_id=" + dt.Rows[i]["id"] + "  and  is_lock=0  and id not in(221,147,154,206,207,251,252,253,254,257) and   model_id<5");
                    if (dtChild.Rows.Count > 0) {

                        rStr.Append(" <li " + classStr + "  id=\"child" + dt.Rows[i]["id"] + "\"> <div> <a><b>");
                        rStr.Append(dt.Rows[i]["title"]);
                        rStr.Append(" </b> <span class=\"arrow up\"></span></a></div>");
                        rStr.Append("<ul class=\"body_int_gk_li_div\" style=\"display: block;\">");
                    }
                    else {
                        rStr.Append(" <li " + classStr + " id=\"child" + dt.Rows[i]["id"] + "\"> <a   href=\"" + dt.Rows[i]["link_url"] + "?id=" + dt.Rows[i]["id"] + "\">");
                        rStr.Append(dt.Rows[i]["title"]);
                        rStr.Append(" </a>");
                    }
                    int numChild = 1;
                    for (int ic = 0; ic < dtChild.Rows.Count; ic++) {
                        rStr.Append("<li><a  id=\"child" + numChild + "\" href=\"" + dtChild.Rows[ic]["link_url"]);
                        rStr.Append("?id=" + dtChild.Rows[ic]["id"] + "\">" + dtChild.Rows[ic]["title"].ToString() + "</a></li>");
                        numChild++;
                    }
                    if (dtChild.Rows.Count > 0) {
                        rStr.Append("</ul>");
                    }
                    rStr.Append("</li>");
                }
            }
            return rStr.ToString();
        }
コード例 #15
0
ファイル: BasePage.cs プロジェクト: eyren/OScms
 /// <summary>
 /// 获取菜单项
 /// </summary>
 /// <returns></returns>
 public static string GetMenuAndChildLst()
 {
     StringBuilder rStr = new StringBuilder();
     BLL.contents.article_category bll = new BLL.contents.article_category();
     //一级菜单
     DataTable dt = bll.GetList(-1, " parent_id=1   and  is_lock=0  and model_id<5 ", "sort_id").Tables[0];
     if (dt != null && dt.Rows.Count > 0) {
         for (int i = 0; i < dt.Rows.Count; i++) {
             rStr.Append(" <li  id=\"menu" + dt.Rows[i]["id"] + "\"> <span  class=\"nav_span_f\"><a  href=\"" + dt.Rows[i]["link_url"] + "\">");
             rStr.Append(dt.Rows[i]["title"]);
             rStr.Append(" </span></a>");
             //二级菜单
             DataTable dtChild = bll.GetLists(Convert.ToInt32(dt.Rows[i]["id"]), " parent_id=" + dt.Rows[i]["id"] + "  and  is_lock=0  and id not in(96,97,121,122,128,129,130) and   model_id<5");
             if (dtChild.Rows.Count > 0) {
                 rStr.Append("<div>");
             }
             for (int ic = 0; ic < dtChild.Rows.Count; ic++) {
                 if (dtChild.Rows[ic]["id"].ToString().Trim() == "167") {
                     rStr.Append("<a  id=\"child" + dtChild.Rows[ic]["id"] + "\"  target=\"_blank\"  href=\"" + dtChild.Rows[ic]["link_url"]);
                 }
                 else {
                     rStr.Append("<a  id=\"child" + dtChild.Rows[ic]["id"] + "\" href=\"" + dtChild.Rows[ic]["link_url"]);
                 }
                 rStr.Append("?id=" + dtChild.Rows[ic]["id"] + "\"><span>" + dtChild.Rows[ic]["title"].ToString() + "</span></a>");
             }
             if (dtChild.Rows.Count > 0) {
                 rStr.Append("</div>");
             }
             rStr.Append("</li>");
         }
     }
     return rStr.ToString();
 }