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


C# TPortalClass.JpCommon类代码示例

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


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

示例1: 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

示例2: btnSearch_Click

 //关健字查询
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
     string pageUrl = JpCommon.CombUrlTxt("list_comment_ysh.aspx", "rnd={0}&keywords={1}",
         "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "");
     Response.Redirect(pageUrl);
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:8,代码来源:list_comment_ysh.aspx.cs

示例3: btnSave_Click

    //保存排序
    protected void btnSave_Click(object sender, EventArgs e)
    {
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        TPortalClass.JpRole JpRole = new TPortalClass.JpRole();
        for (int i = 0; i < rptList.Items.Count; i++)
        {
            //int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
            string id = ((HiddenField)rptList.Items[i].FindControl("hidId")).Value;
            float sortId;
            if (!float.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
            {
                sortId = 99;
            }
            JpRole.Updatesort(id, sortId);
        }
        string pageUrl = JpCommon.CombUrlTxt("list_role.aspx", "page={0}&rnd={1}",
            "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + "");

        //写系统日志
        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];
        }
        JpCommon.WriteLog(userip, "保存排序", "批量保存权限排序号", Session["uid"].ToString(), Session["uname"].ToString());

        Response.Write("<script>alert('保存排序成功!');window.location='" + pageUrl + "';</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:list_role.aspx.cs

示例4: RptBind

 public string RptBind()
 {
     TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
     StringBuilder stringBuilder = new StringBuilder();
     TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
     string ls_where = " and cid like '" + pis_cid + "%' and sfzwd='否' ";
     string ls_order = " order by pubtime desc";
     DataTable dt = JpArticle.SearchdocsByKey(ls_where, ls_order, 1, 6);
     int commentCount = 0;
     JpComment jpComment = new JpComment();
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         commentCount = jpComment.GetdocsbyaidAllCount(dt.Rows[i]["aid"].ToString(), pis_cid);
         stringBuilder.Append("<li><a onclick=\"locationDetail('art_detail.aspx?aid=" + dt.Rows[i]["aid"].ToString() + "&cid=" + pis_cid + "','" + locationType + "','1')\">");
         stringBuilder.Append("<img  class=\"scrollLoading\"  src=\"" + dt.Rows[i]["indexdisplaypicpath"].ToString() + "\"><h1>");
         stringBuilder.Append("" + dt.Rows[i]["title"].ToString() + "</h1>");
         stringBuilder.Append("<p class=\"fleft\">" + JpCommon.DateDiff(DateTime.Now, Convert.ToDateTime(dt.Rows[i]["crtime"].ToString())) + "</p><p class=\"fleft\"><span><i class=\"ico-dj\"></i>" + dt.Rows[i]["praiseCount"].ToString() + "</span></p><p class=\"fleft\"><span><i class=\"ico-pl\"></i>" + commentCount + "</span>");
         if (dt.Rows[i]["map_cid"].ToString() != "")
         {
             stringBuilder.Append("<p class=\"fright\"><i class=\"ico-zt\">" + dt.Rows[i]["map_cid"].ToString() + "</i></p>");
         }
         stringBuilder.Append("</a></li>");
     }
     return stringBuilder.ToString();
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:25,代码来源:list.aspx.cs

示例5: btnSubmit_Click

 //答复
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (this.Session["uid"] == null || this.Session["uid"].ToString() == "")
     {
         this.Response.Redirect("../login.aspx");
     }
     string ls_tip = "答复成功!";
     TPortalClass.DAO db = new TPortalClass.DAO();
     TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
     string ls_ = txthy_reply.Text;
     int ls_hy_ifsh = 2;
     //写系统日志
     string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
     if (userip == null || userip == "")
     {
         userip = Request.ServerVariables["REMOTE_ADDR"];
     }
     JpCommon.WriteLog(userip, "答复", "答复求助记录[id:" + this.txtid.Value + "]", Session["uid"].ToString(), Session["uname"].ToString());
     string sql_Update = "  UPDATE  hy_help SET";
     sql_Update += "   hy_reply  ='" + txthy_reply.Text + "'";
     sql_Update += " , hy_replytime ='" + DateTime.Now.ToString("yyyy-MM-dd") + "'";
     sql_Update += " , hy_ifsh =" + ls_hy_ifsh + "   where id=" + Convert.ToInt32(txtid.Value.Trim()) + "";
     db.Execute(sql_Update);
     Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:26,代码来源:main_help_sh.aspx.cs

示例6: btnAudit_Click

    //审核
    protected void btnAudit_Click(object sender, EventArgs e)
    {
        TPortalClass.DAO db = new TPortalClass.DAO();
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        TPortalClass.JpActivityusers JpActivityusers = new TPortalClass.JpActivityusers();
        string ls_tip = "审核成功!";
        for (int i = 0; i < rptList.Items.Count; i++)
        {
            string id = ((HiddenField)rptList.Items[i].FindControl("hidId")).Value;
            CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
            if (cb.Checked)
            {
                string sql = "update hy_activityusers set hy_ifsh=1 where id=" + System.Int32.Parse(id) + "";
                db.Execute(sql);
            }
        }
        string pageUrl = "";

        pageUrl = JpCommon.CombUrlTxt("list_activityusers.aspx", "page={0}&rnd={1}",
            "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + "");
        //写系统日志
        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];
        }
        JpCommon.WriteLog(userip, "审核人员", "批量审核活动报名人员", Session["uid"].ToString(), Session["uname"].ToString());
        Response.Write("<script>alert('" + ls_tip + "');window.location='" + pageUrl + "';</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:30,代码来源:list_activityusers.aspx.cs

示例7: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_flag = "";   //0登陆成功;1退出系统
        string ls_uid = "";
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        if (this.Request.QueryString["flag"] != null)
        {
            ls_flag = this.Request.QueryString["flag"].ToString();
        }

        if (ls_flag == "0")
        {
            if (this.Request.QueryString["uid"] != null)
            {
                Session["hyuid"] = this.Request.QueryString["uid"].ToString();
            }
            else
            {
                Session["hyuid"] = "";
            }
        }
        else
        {
            //退出系统
            Session["hyuid"] = "";
        }
        Response.Write(Session["hyuid"].ToString());
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:28,代码来源:login.aspx.cs

示例8: btnSubmit_Click

    //发布
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (this.Session["uid"] == null || this.Session["uid"].ToString() == "")
        {
            this.Response.Redirect("../login.aspx");
        }
        string ls_tip = "发布成功!";

        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        TPortalClass.JpPhotography JpPhotography = new TPortalClass.JpPhotography();
        JpPhotography.id = Convert.ToInt32(txtid.Value);
        JpPhotography.hy_uid = txthy_uid.Text;
        JpPhotography.hy_addtime = Convert.ToDateTime(txthy_addtime.Text);
        JpPhotography.hy_address = txthy_address.Text;
        JpPhotography.hy_content = txthy_content.Text;
        JpPhotography.hy_ifsh = 2;
        JpPhotography.hy_sort = Convert.ToInt32(txthy_sort.Text);
        JpPhotography.docid = txtDocid.Value;
        //写系统日志
        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];
        }
        JpCommon.WriteLog(userip, "发布", "发布手摄记录[id:" + this.txtid.Value + "]", Session["uid"].ToString(), Session["uname"].ToString());
        JpPhotography.Update();
        Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:main_photo.aspx.cs

示例9: btnGoto_Click

 //转到第几页
 protected void btnGoto_Click(object sender, EventArgs e)
 {
     TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
     string pageUrl = JpCommon.CombUrlTxt("list_activity_sh.aspx", "page={0}&rnd={1}&cid={2}",
         this.txtGotoPage.Text, "" + System.Guid.NewGuid().ToString() + "", "" + this.txtKeywords.Text + "");
     Response.Redirect(pageUrl);
 }
开发者ID:wjszxli,项目名称:xdjb,代码行数:8,代码来源:list_activity_sh.aspx.cs

示例10: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        string ls_aid = "", ls_cid = "", strType = "", ls_page = "1", la_pagesize = "10";
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        //获取参数
        if (this.Request.QueryString["type"] != null)
        {
            strType = this.Request.QueryString["type"].ToString();
        }
        if (this.Request.QueryString["page"] != null)
        {
            ls_page = this.Request.QueryString["page"].ToString();
        }

        if (this.Request.QueryString["cid"] != null)
        {
            ls_cid = this.Request.QueryString["cid"].ToString();
        }
        if (this.Request.QueryString["pagesize"] != null)
        {
            la_pagesize = this.Request.QueryString["pagesize"].ToString();
        }

        JpArticle JpArticle = new JpArticle();
        string ls_where = " and cid = '" + ls_cid + "' ";
        string ls_order = " order by pubtime desc";
        string test = "";
        DataTable dt = JpArticle.SearchdocsByKey(ls_where, ls_order, int.Parse(ls_page), int.Parse(la_pagesize));

        //转换成json格式
        string strJson = JsonConvert.SerializeObject(dt);
        //数据抛出
        Response.Write(strJson);
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:34,代码来源:hyajax_jbsyslist.aspx.cs

示例11: btnDelete_Click

    //批量删除
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        TPortalClass.JpHelp JpHelp = new TPortalClass.JpHelp();
        string ls_tip = "删除成功!";
        for (int i = 0; i < rptList.Items.Count; i++)
        {
            string id = ((HiddenField)rptList.Items[i].FindControl("hidId")).Value;
            CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
            if (cb.Checked)
            {
                JpHelp.id = int.Parse(id);
                JpHelp.Delete();
            }
        }
        string pageUrl = JpCommon.CombUrlTxt("list_help_sh.aspx", "page={0}&rnd={1}",
            "" + this.txtPage.Text + "", "" + System.Guid.NewGuid().ToString() + "");

        //写系统日志

        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];
        }
        JpCommon.WriteLog(userip, "删除", "批量删除帮办记录", Session["uid"].ToString(), Session["uname"].ToString());
        Response.Write("<script>alert('" + ls_tip + "');window.location='" + pageUrl + "';</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:29,代码来源:list_help_sh.aspx.cs

示例12: btndelinfo_Click

    //删除图片
    protected void btndelinfo_Click(object sender, EventArgs e)
    {
        string ls_filepath1 = "", ls_filepath2 = "";
        TPortalClass.HyFileatt HyFileatt = new TPortalClass.HyFileatt();
        DataTable dt = HyFileatt.Getdocbyid(this.txtuids.Value);
        if (dt.Rows.Count > 0)
        {
            if (dt.Rows[0]["hy_fm"].ToString() == "1")
            {
                Response.Write("<script>alert('封面图片不能删除');window.location.href=window.location.href;</script>");
                return;
            }
            //删除文件夹里的图片
            ls_filepath1 = Server.MapPath("~/") + dt.Rows[0]["hy_filepath"].ToString();
            ls_filepath2 = Server.MapPath("~/") + dt.Rows[0]["hy_filepath"].ToString().Replace("thumbnail", "original");
            if (System.IO.File.Exists(ls_filepath1))
            {
                System.IO.File.Delete(ls_filepath1);
            }
            if (System.IO.File.Exists(ls_filepath2))
            {
                System.IO.File.Delete(ls_filepath2);
            }
        }

        //删除数据库记录
        HyFileatt.Delete(this.txtuids.Value);
        //操作日志
        TPortalClass.JpCommon HyCommon = new TPortalClass.JpCommon();
        //  HyCommon.WriteLog("删除图片", "删除图片ID:" + this.txtuids.Value, this.Session["hy_id"].ToString(), this.Session["hy_name"].ToString());
        // LoadingPictures();
        Response.Write("<script>location.replace(location);</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:34,代码来源:ifr_rentpic.aspx.cs

示例13: btnSubmit_Click

    //提交
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (this.Session["uid"] == null || this.Session["uid"].ToString() == "")
        {
            this.Response.Redirect("../login.aspx");
        }

        string ls_tip = "审核成功!";

        TPortalClass.JpActivity JpActivity = new TPortalClass.JpActivity();
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        TPortalClass.DAO db = new TPortalClass.DAO();
        string sql_cg = "update hy_activity set hy_ifsh=2 where id=" + System.Int32.Parse(this.txtid.Value) + "";
        db.Execute(sql_cg);
        //写系统日志
        string userip = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (userip == null || userip == "")
        {
            userip = Request.ServerVariables["REMOTE_ADDR"];
        }
        JpCommon.WriteLog(userip, "审核", "审核活动记录[id:" + this.txtid.Value + "]", Session["uid"].ToString(), Session["uname"].ToString());
        JpActivity.Update();

        Response.Write("<script>alert('" + ls_tip + "');window.location='" + this.txturl.Value + "'</script>");
    }
开发者ID:wjszxli,项目名称:xdjb,代码行数:26,代码来源:main_activity_sh.aspx.cs

示例14: 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

示例15: 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


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