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


C# JpCommon.OutPicGetStr方法代码示例

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


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

示例1: btnFB_Click

    //发布
    protected void btnFB_Click(object sender, EventArgs e)
    {
        if (this.Session["uid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "发布成功!";

        //新文档时
        TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();
        JpArticle.cid = this.txtcid.Text;
        JpArticle.title = this.txttitle.Text;
        JpArticle.subhead = this.txttitle2.Text;
        JpArticle.ht_content = this.content1.Value;
        if (this.txtsummary.Text == "")
        {
            JpArticle.summary = JpCommon.OutPicGetStr(this.content1.Value, 150);
        }
        else
        {
            JpArticle.summary = this.txtsummary.Text;
        }
        JpArticle.author = this.Session["uname"].ToString();

        JpArticle.status = "发布";
        //JpArticle.ifindexdisplay = "";
        string lsfilename = FileUpload1.FileName;
        string lspath = "";
        string lsurl = "";
        string str_path = "";
        if (lsfilename != "")  //attsize
        {
            //SaveCommon(ls_path, ls_attsize, lsguid);
            //将附件上传到服务器目录下
            lspath = Server.MapPath("~/");//虚拟目录的位置
            lsurl = "/upload/indexpic"; //存放的文件夹
            Directory.CreateDirectory(lspath + "/" + lsurl);
            str_path = lspath + "/" + lsurl + "/" + lsfilename;
            FileUpload1.SaveAs(str_path);
            JpArticle.indexdisplaypicpath = lsurl + "/" + lsfilename;
        }
        else
        {
            this.txtpic.Value = JpCommon.GetImg(this.content1.Value);
            JpArticle.indexdisplaypicpath = this.txtpic.Value;
        }

        if (this.txtseotitle.Text == "")
        {
            JpArticle.seotitle = this.txttitle.Text;
        }
        else
        {
            JpArticle.seotitle = this.txtseotitle.Text;
        }
        if (this.txtseokeywords.Text == "")
        {
            JpArticle.seokeywords = this.txttitle.Text;
        }
        else
        {
            JpArticle.seokeywords = this.txtseokeywords.Text;
        }
        if (this.txtseodescription.Text == "")
        {
            JpArticle.seodescription = JpCommon.OutPicGetStr(this.content1.Value, 150);
        }
        else
        {
            JpArticle.seodescription = this.txtseodescription.Text;
        }
        JpArticle.asort = System.Int32.Parse(this.txtasort.Text);
        JpArticle.iftop = this.ddlsfzd.SelectedValue;
        JpArticle.topendtime = this.txttopendtime.Value;
        JpArticle.ifindexdisplay = this.ddlsfsyss.SelectedValue;
        JpArticle.ifcomment = "0";
        JpArticle.source = this.txtsource.Value;
        JpArticle.role_userid = this.txtrole_userid.Text;
        JpArticle.role_username = this.txtrole_username.Text;
        JpArticle.input = this.Session["uid"].ToString();
        JpArticle.GUID = this.txtguid.Text;
        if (ddllb.SelectedValue != "请选择")
        {
            JpArticle.map_cid = ddllb.SelectedValue;
        }
        else
        {
            JpArticle.map_cid = "";
        }
        JpArticle.map_aid = 0;
        JpArticle.targettype = "";
        JpArticle.hits = 0;
        JpArticle.goodnum = 0;
        if (radlist.SelectedValue == "否")
        {
            JpArticle.sfzwd = radlist.SelectedValue;
            JpArticle.zwdid = ddlwz.SelectedValue;
        }
        else
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:xdjb,代码行数:101,代码来源:main_article_sh.aspx.cs

示例2: btnSave_Click

    //保存
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (this.Session["uid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        string ls_tip = "保存成功!";

        //新文档时
        TPortalClass.JpArticle JpArticle = new TPortalClass.JpArticle();
        TPortalClass.JpCommon JpCommon = new TPortalClass.JpCommon();

        JpArticle.cid = this.ddlcolname.SelectedValue;
        JpArticle.title = this.txttitle.Text;
        JpArticle.subhead = this.txttitle2.Text;
        JpArticle.ht_content = this.content1.Value;
        if (this.txtsummary.Text == "")
        {
            JpArticle.summary = JpCommon.OutPicGetStr(this.content1.Value, 150);
        }
        else
        {
            JpArticle.summary = this.txtsummary.Text;
        }
        JpArticle.author = this.Session["uname"].ToString();

        if (this.txtstatus.Text == "")
        {
            JpArticle.status = "编辑";
        }
        else
        {
            JpArticle.status = this.txtstatus.Text;
        }
        //JpArticle.ifindexdisplay = "";
        string lsfilename = FileUpload1.FileName;
        string lspath = "", lsurl = "", lsurl2 = "", str_path = "", str_path2 = "";
        if (lsfilename != "")  //attsize
        {
            lsfilename = this.txtguid.Text + "_" + lsfilename;
            //SaveCommon(ls_path, ls_attsize, lsguid);
            //将附件上传到服务器目录下
            lspath = Server.MapPath("~/");  //虚拟目录的位置
            lsurl = "/upload/indexpic_yt";  //原图存放的文件夹
            lsurl2 = "/upload/indexpic";    //缩略图存放的文件夹
            Directory.CreateDirectory(lspath + "/" + lsurl);
            Directory.CreateDirectory(lspath + "/" + lsurl2);
            str_path = lspath + "/" + lsurl + "/" + lsfilename;
            str_path2 = lspath + "/" + lsurl2 + "/" + lsfilename;
            FileUpload1.SaveAs(str_path);
            //压缩图片处理
            MakeThumbnail(str_path, str_path2, 600, 600, "HW");
            JpArticle.indexdisplaypicpath = lsurl2 + "/" + lsfilename;
        }
        else
        {
            this.txtpic.Value = JpCommon.GetImg(this.content1.Value);
            JpArticle.indexdisplaypicpath = this.txtpic.Value;
        }

        if (this.txtseotitle.Text == "")
        {
            JpArticle.seotitle = this.txttitle.Text;
        }
        else
        {
            JpArticle.seotitle = this.txtseotitle.Text;
        }
        if (this.txtseokeywords.Text == "")
        {
            JpArticle.seokeywords = this.txttitle.Text;
        }
        else
        {
            JpArticle.seokeywords = this.txtseokeywords.Text;
        }
        if (this.txtseodescription.Text == "")
        {
            JpArticle.seodescription = JpCommon.OutPicGetStr(this.content1.Value, 150);
        }
        else
        {
            JpArticle.seodescription = this.txtseodescription.Text;
        }

        JpArticle.seodescription = this.txtseodescription.Text;
        JpArticle.asort = System.Int32.Parse(this.txtasort.Text);
        JpArticle.iftop = this.ddlsfzd.SelectedValue;
        JpArticle.topendtime = this.txttopendtime.Value;
        JpArticle.ifindexdisplay = this.ddlsfsyss.SelectedValue;
        JpArticle.ifcomment = "0";
        JpArticle.source = this.txtsource.Value;
        JpArticle.role_userid = this.txtrole_userid.Text;
        JpArticle.role_username = this.txtrole_username.Text;
        JpArticle.input = this.Session["uid"].ToString();
        JpArticle.GUID = this.txtguid.Text;
        if (ddllb.SelectedValue != "请选择")
        {
            JpArticle.map_cid = ddllb.SelectedValue;
        }
//.........这里部分代码省略.........
开发者ID:wjszxli,项目名称:xdjb,代码行数:101,代码来源:main_article_fb.aspx.cs


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