当前位置: 首页>>代码示例>>C#>>正文


C# JpCommon.queryString2StrID方法代码示例

本文整理汇总了C#中TPortalClass.JpCommon.queryString2StrID方法的典型用法代码示例。如果您正苦于以下问题:C# JpCommon.queryString2StrID方法的具体用法?C# JpCommon.queryString2StrID怎么用?C# JpCommon.queryString2StrID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TPortalClass.JpCommon的用法示例。


在下文中一共展示了JpCommon.queryString2StrID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        if (this.Request.QueryString["cid"] != null)
            this.cid = JpCommon.queryString2StrID(this.Request.QueryString["cid"].ToString(), 9);
        if (this.Request.QueryString["aid"] != null)
            this.aid = JpCommon.queryString2StrID(this.Request.QueryString["aid"].ToString(), 9);

        if (!this.IsPostBack)
        {
            this.txtDocid.Value = System.Guid.NewGuid().ToString();
        }
        DataPlay();
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:14,代码来源:comment_Detail.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        //获取参数
        string ls_aid = "", ls_cid = "", ls_page = "1", ls_pagesize = "10";
        JpCommon JpCommon = new JpCommon();
        if (this.Request.QueryString["cid"] != null)
            ls_cid = JpCommon.queryString2StrID(this.Request.QueryString["cid"].ToString(), 9);
        if (this.Request.QueryString["aid"] != null)
            ls_aid = JpCommon.queryString2StrID(this.Request.QueryString["aid"].ToString(), 9);

        if (this.Request.QueryString["page"] != null)
            ls_page = JpCommon.queryString2StrID(this.Request.QueryString["page"].ToString(), 9);
        if (this.Request.QueryString["pagesize"] != null)
            ls_pagesize = JpCommon.queryString2StrID(this.Request.QueryString["pagesize"].ToString(), 9);

        TPortalClass.JpComment JpComment = new TPortalClass.JpComment();
        TPortalClass.JpUserVip JpUserVip = new TPortalClass.JpUserVip();
        DataTable dt = JpComment.Getdocsbyaid_ysh_fy(ls_aid, ls_cid, Convert.ToInt32(ls_page), Convert.ToInt32(ls_pagesize));
        DataTable tempTable = dt.Clone();
        DataColumn col1 = new DataColumn("rytx", typeof(String));
        DataColumn col2 = new DataColumn("showTime", typeof(String));
        tempTable.Columns.Add(col1);
        tempTable.Columns.Add(col2);
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            DataRow dr = tempTable.NewRow();
            string ls_user = dt.Rows[i]["usid"].ToString();
            DataTable dtrytx = JpUserVip.GetJpUserPic(ls_user);
            if (dtrytx.Rows.Count > 0)
            {
                dr["rytx"] = dtrytx.Rows[0]["hy_pic"].ToString();
            }
            else
            {
                dr["rytx"] = "images/1211p1.png";
            }
            dr["showTime"] = JpCommon.DateDiff(DateTime.Now, Convert.ToDateTime(dt.Rows[i]["commenttime"].ToString()));
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[dt.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            tempTable.Rows.Add(dr);
        }
        //转换成json格式
        string strJson = JsonConvert.SerializeObject(tempTable);
        //数据抛出
        Response.Write(strJson);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:48,代码来源:hyajax_commentListMore.aspx.cs

示例3: RptBind

    private void RptBind()
    {
        TPortalClass.JpCommon JpCommon2 = new TPortalClass.JpCommon();
        if (this.Request.QueryString["cid"] != null)
            this.pis_cid = JpCommon2.queryString2StrID(this.Request.QueryString["cid"].ToString(), 9);

        TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
        string ls_where = " and cid like '" + pis_cid + "%' ";
        string ls_order = " order by pubtime desc";
        DataTable dt = JpArticle.SearchdocsByKey(ls_where, ls_order, 1, 3);
        DataTable tempTable = dt.Clone();
        //在现有的DatatTable增加一列
        DataColumn col = new DataColumn("showTime", typeof(String));
        //将列添加到DataTable中去
        tempTable.Columns.Add(col);
        //循环  对DataTable重新赋值
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[tempTable.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            //获得间隔的时间
            dr["showTime"] = JpCommon.DateDiff(DateTime.Now, Convert.ToDateTime(dt.Rows[i]["crtime"].ToString()));
            tempTable.Rows.Add(dr);
        }
        rptList.DataSource = tempTable;
        rptList.DataBind();
        this.pis_totalCount = JpArticle.SearchdocsByKeyNum(ls_where);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:31,代码来源:straight_list.aspx.cs

示例4: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
     if (this.Request.QueryString["cid"] != null)
         this.pis_cid = JpCommon.queryString2StrID(this.Request.QueryString["cid"].ToString(), 9);
     string ls_where = " and cid like '" + pis_cid + "%' and sfzwd='否' ";
     TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
     this.pis_totalCount = JpArticle.SearchdocsByKeyNum(ls_where);
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:9,代码来源:list.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_cid = "", ls_page = "1", la_pagesize = "10";
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        if (this.Request.QueryString["cid"] != null)
        {
            ls_cid = JpCommon.queryString2StrID(this.Request.QueryString["cid"].ToString(), 9);
        }
        if (this.Request.QueryString["page"] != null)
        {
            ls_page = JpCommon.Filter(this.Request.QueryString["page"].ToString());
        }
        if (this.Request.QueryString["pagesize"] != null)
        {
            la_pagesize = JpCommon.Filter(this.Request.QueryString["pagesize"].ToString());
        }
        //根据传入的文章栏目ID、页码、页数返回列表信息
        TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
        string ls_where = "", ls_order = "";
        ls_where = " and cid like '" + ls_cid + "%' and sfzwd='否' ";
        ls_order = " order by pubtime desc";
        DataTable dt = JpArticle.SearchdocsByKey(ls_where, ls_order, int.Parse(ls_page), int.Parse(la_pagesize));
        //复制一个DataTalbe
        DataTable tempTable = dt.Clone();
        //在现有的DatatTable增加一列
        DataColumn col = new DataColumn("showTime", typeof(String));
        //将列添加到DataTable中去
        tempTable.Columns.Add(col);

        //在现有的DatatTable增加一列
        DataColumn col2 = new DataColumn("commentCount", typeof(String));
        //将列添加到DataTable中去
        tempTable.Columns.Add(col2);

        int commentCount = 0;
        JpComment jpComment = new JpComment();
        //循环  对DataTable重新赋值
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            DataRow dr = tempTable.NewRow();
            for (int j = 0; j < dt.Columns.Count; j++)
            {
                dr[tempTable.Columns[j].ColumnName] = dt.Rows[i][j];
            }
            DataTable dtComment = jpComment.Getdocsbyaid_ysh(ls_cid, dt.Rows[i]["aid"].ToString());
            commentCount = dtComment.Rows.Count;
            //获得间隔的时间
            dr["showTime"] = JpCommon.DateDiff(DateTime.Now, Convert.ToDateTime(dt.Rows[i]["crtime"].ToString()));
            dr["commentCount"] = commentCount;
            tempTable.Rows.Add(dr);
        }
        //转换成json格式
        string strJson = JsonConvert.SerializeObject(tempTable);
        //数据抛出
        Response.Write(strJson);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:56,代码来源:hyajax_list.aspx.cs

示例6: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     JpCommon JpCommon = new JpCommon();
     if (this.Request.QueryString["cid"] != null)
     {
         this.txtcid.Value = this.Request.QueryString["cid"].ToString();
         this.pis_cid = JpCommon.queryString2StrID(this.Request.QueryString["cid"].ToString(), 9);
     }
     string ls_where = " and cid = '" + this.txtcid.Value + "'  and sfzwd='是'";
     JpArticle JpArticle = new JpArticle();
     this.pis_totalCount = JpArticle.SearchdocsByKeyNum(ls_where);
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:12,代码来源:column_list.aspx.cs

示例7: RptBind

    private void RptBind()
    {
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        if (this.Request.QueryString["cid"] != null)
            this.pis_cid = JpCommon.queryString2StrID(this.Request.QueryString["cid"].ToString(),9);

        TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
        string ls_where = " and cid like '" + pis_cid + "%' ";
        string ls_order = " order by pubtime desc";
        DataTable dt = JpArticle.SearchdocsByKey(ls_where, ls_order, 1, 4);
        rptList.DataSource = dt;
        rptList.DataBind();
        this.pis_totalCount = JpArticle.SearchdocsByKeyNum(ls_where);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:14,代码来源:laboratory_list.aspx.cs

示例8: RptBind

    public String RptBind()
    {
        StringBuilder stringBuilder = new StringBuilder();
        JpCommon JpCommon = new JpCommon();
        if (this.Request.QueryString["aid"] != null)
        {
            this.pis_aid = JpCommon.queryString2StrID(this.Request.QueryString["aid"].ToString(), 9);
        }

        JpArticle JpArticle = new JpArticle();
        DataTable dt = JpArticle.GetArticleByaid(int.Parse(pis_aid));
        if (dt.Rows.Count > 0)
        {
            pis_cid = dt.Rows[0]["cid"].ToString();
            this.lbljptx.Text = "<h1>\"" + dt.Rows[0]["title"].ToString() + "\"</h1><span><img src=\"" + dt.Rows[0]["indexdisplaypicpath"].ToString() + "\"></span>";
        }

        string ls_where = " and cid = '" + pis_cid + "' and zwdid=" + pis_aid + " and sfzwd='否' ";
        string ls_order = " order by pubtime desc";
        DataTable dt2 = JpArticle.SearchdocsByKey(ls_where, ls_order, 1, 5);
        string strTitle = "";
        if (dt2.Rows.Count > 0)
        {
            for (int i = 0; i < dt2.Rows.Count; i++)
            {
                strTitle = dt2.Rows[i]["title"].ToString();
                if (strTitle.Length > 18)
                {
                    strTitle = strTitle.Substring(0, 18) + "...";
                }
                stringBuilder.Append("<a onclick=\"locationDetail('art_detail.aspx?aid=" + dt2.Rows[i]["aid"].ToString() + "','" + locationType + "','0')\"><li>");
                if (dt2.Rows[i]["indexdisplaypicpath"].ToString() != "")
                {
                    stringBuilder.Append("<img src=\"" + dt2.Rows[i]["indexdisplaypicpath"].ToString() + "\">");
                }
                else
                {
                    stringBuilder.Append("<img src=\"/images/noImg.jpg\">");
                }
                stringBuilder.Append("<h1>");
                stringBuilder.Append("" + strTitle + "</h1><p class=\"fleft\">" + JpCommon.DateDiff(DateTime.Now, Convert.ToDateTime(dt2.Rows[i]["crtime"].ToString())) + "</p></li></a>");
            }
        }

        return stringBuilder.ToString();
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:46,代码来源:column_list_more.aspx.cs

示例9: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        //获取参数
        string ls_aid = "", ls_cid = "", ls_page = "1", ls_pagesize = "10";
        JpCommon JpCommon = new JpCommon();
        if (this.Request.QueryString["cid"] != null)
            ls_cid = JpCommon.queryString2StrID(this.Request.QueryString["cid"].ToString(), 9);
        if (this.Request.QueryString["aid"] != null)
            ls_aid = JpCommon.queryString2StrID(this.Request.QueryString["aid"].ToString(), 9);

        if (this.Request.QueryString["page"] != null)
            ls_page = JpCommon.queryString2StrID(this.Request.QueryString["page"].ToString(), 9);
        if (this.Request.QueryString["pagesize"] != null)
            ls_pagesize = JpCommon.queryString2StrID(this.Request.QueryString["pagesize"].ToString(), 9);

        StringBuilder stringBuilder = new StringBuilder();
        JpArticle JpArticle = new JpArticle();
        string ls_where = " and cid = '" + ls_cid + "' ";
        string ls_order = " order by pubtime desc";
        DataTable dt = JpArticle.SearchdocsByKey(ls_where, ls_order, Convert.ToInt32(ls_page), Convert.ToInt32(ls_pagesize));
        JpColumns jpColumns = new JpColumns();
        string strColumnName = "";
        stringBuilder.Append("[");
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataTable dt_columns = jpColumns.GetColumnBycid(dt.Rows[i]["cid"].ToString());
                if (dt_columns.Rows.Count > 0)
                {
                    strColumnName = dt_columns.Rows[0]["cname"].ToString();
                }
                string ls_zwdid = dt.Rows[i]["aid"].ToString();
                stringBuilder.Append("{\"aid\":\"" + dt.Rows[i]["aid"].ToString() + "\",\"cid\":\"" + dt.Rows[i]["cid"].ToString() + "\",\"cname\":\"" + strColumnName + "\",\"indexdisplaypicpath\":\"" + dt.Rows[i]["indexdisplaypicpath"].ToString() + "\",\"title\":\"" + dt.Rows[i]["title"].ToString() + "\",\"showTime\":\"" + JpCommon.DateDiff(DateTime.Now, Convert.ToDateTime(dt.Rows[i]["crtime"].ToString())) + "\",\"child\":[");
                string ls_where2 = " and cid = '" + ls_cid + "' and zwdid='" + ls_zwdid + "' and sfzwd='否' ";
                string ls_order2 = " order by pubtime desc";
                DataTable dt_zwd = JpArticle.SearchdocsByKey(ls_where2, ls_order2, Convert.ToInt32(ls_page), Convert.ToInt32(ls_pagesize));
                if (dt_zwd.Rows.Count > 0)
                {
                    for (int j = 0; j < dt_zwd.Rows.Count; j++)
                    {
                        stringBuilder.Append("{\"aid\":\"" + dt_zwd.Rows[j]["aid"].ToString() + "\",\"cid\":\"" + dt.Rows[i]["cid"].ToString() + "\",\"cname\":\"" + strColumnName + "\",\"indexdisplaypicpath\":\"" + dt_zwd.Rows[j]["indexdisplaypicpath"].ToString() + "\",\"map_cid\":\"" + dt_zwd.Rows[j]["map_cid"].ToString() + "\",\"title\":\"" + dt_zwd.Rows[j]["title"].ToString() + "\",\"showTime\":\"" + JpCommon.DateDiff(DateTime.Now, Convert.ToDateTime(dt_zwd.Rows[j]["crtime"].ToString())) + "\"");
                        if (j == dt_zwd.Rows.Count - 1)
                        {
                            stringBuilder.Append("}");
                        }
                        else
                        {
                            stringBuilder.Append("},");
                        }
                    }
                }
                stringBuilder.Append("]");
                if (dt.Rows.Count - 1 == i)
                {
                    stringBuilder.Append("}");
                }
                else
                {
                    stringBuilder.Append("},");
                }

            }
        }
        stringBuilder.Append("]");
        //数据抛出
        Response.Write(stringBuilder.ToString());
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:68,代码来源:hyajax_commentlist.aspx.cs


注:本文中的TPortalClass.JpCommon.queryString2StrID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。