protected void btnSave_Click(object sender, EventArgs e)
    {
        GZS.Model.VideoSysM model = new GZS.Model.VideoSysM();
        if (this.txttitle.Text.Trim() == "")
        {
            Response.Write("<script>alert('请输入视频标题!');</script>");
            return;
        }
        if (this.txtVidoiName.Text.Trim() == "")
        {
            Response.Write("<script>alert('请输入视频地址!');</script>");
            return;
        }
        if (this.txtLaiYuan.Text.Trim() == "")
        {
            Response.Write("<script>alert('请输入视频来源!');</script>");
            return;
        }
        model.videotitle   = this.txttitle.Text.Trim();
        model.VidoiName    = this.txtVidoiName.Text.Trim();
        model.introduction = this.txtJieShao.Text.Trim();
        model.form         = this.txtLaiYuan.Text.Trim();
        model.videoid      = id;
        if (picTitle.Trim() == "")
        {
            model.ImageName = defualImageName;
        }
        else
        {
            model.ImageName = picTitle.Trim();
        }
        string urladdress = videosysbll.GetModel(id).htmlurl.Trim();

        if (urladdress == "NULL" || urladdress == "")
        {
            List <GZS.Model.VideoSysM> list = videosysbll.GetAllModel(loginname);
            int    dsa      = Convert.ToInt32(list.Count) - 1;
            string htmlurld = "";
            if (dsa == 0)
            {
                htmlurld = "video.htm";
            }
            else
            {
                htmlurld = "video" + dsa.ToString().Trim() + ".htm";
            }
            model.htmlurl = htmlurld;
        }
        else
        {
            model.htmlurl = urladdress;
        }
        int result = videosysbll.Update(model);

        if (result > 0)
        {
            GZS.BLL.VideoSysPagestaticBLL staticbll = new GZS.BLL.VideoSysPagestaticBLL();
            List <GZS.Model.VideoSysM>    list      = videosysbll.GetAllModel(loginname);
            for (int i = 0; i < list.Count; i++)
            {
                int re = staticbll.StaticHtml(list[i].videoid, loginname);
            }
            Response.Redirect("VideoManage.aspx");
        }
    }
示例#2
0
    public void GenerateStatic(string name)
    {
        //产业优势 如果ID为0就是通过用户名查找
        PolicyStatic policySta = new PolicyStatic();

        policySta.StaticHtml(0, name);
        //产业优势右边iframe
        policySta.StaticHtml(name);
        //投资成本如果ID为0就是通过用户名查找
        StaticInvest InvestSta = new StaticInvest();

        InvestSta.StaticHtml(0, name);
        //产业优势
        StaticProduct ProductSta = new StaticProduct();

        ProductSta.StaticHtml(0, name);
        //产业优势Ifrom
        StaticIF staticIf = new StaticIF();

        staticIf.StaticHtml(name, 3);
        //staticIf.StaticHtml(name, 1);
        //园区特色
        StaticPark ParkSta = new StaticPark();

        ParkSta.StaticHtml(0, name);
        //联系方式
        ContactStatic sta = new ContactStatic();

        sta.StaticHtml(name);

        //区域概况
        GZS.BLL.AreaTabBLL areatabbll = new GZS.BLL.AreaTabBLL();
        int sdsas = areatabbll.StaticHtml(0, name);

        //IF
        areatabbll.StaticHtmls(name);
        //投资环境
        GZS.BLL.EnvironmentTabBLL envtabbll = new GZS.BLL.EnvironmentTabBLL();
        envtabbll.StaticHtml(name);
        //IF
        envtabbll.StaticHtmls(name);
        //友情链接
        GZS.BLL.FriendLinkBLL bll = new GZS.BLL.FriendLinkBLL();
        bll.StaticHtml(name);
        //相册列表
        GZS.BLL.ImageTabMBLL       imagebll = new GZS.BLL.ImageTabMBLL();
        List <GZS.Model.ImageTabM> list     = imagebll.GetAll(name);

        for (int i = 0; i < list.Count; i++)
        {
            imagebll.StaticHtmls(list[i].imageid, name);
            imagebll.StaticHtml(list[i].imageid, name);
        }
        imagebll.StaticHtmlshouye(name);
        //资讯
        NewsTabBLL newstabbll = new NewsTabBLL();
        PageStatic statics    = new PageStatic();
        List <GZS.Model.news.NewsTab> list1 = newstabbll.GetNewsTabAllByUserName(name);

        for (int i = 0; i < list1.Count; i++)
        {
            int row = statics.StaticHtml(list1[i].Newsid, name);
        }
        int dzx  = statics.StaticHtmls(name);
        int daze = newstabbll.StaticHtml(name);

        GZS.BLL.VideoSysBLL        Videobll = new GZS.BLL.VideoSysBLL();
        List <GZS.Model.VideoSysM> lista    = Videobll.GetAllModel(name);

        GZS.BLL.VideoSysPagestaticBLL staticblls = new GZS.BLL.VideoSysPagestaticBLL();
        for (int i = 0; i < lista.Count; i++)
        {
            staticblls.StaticHtml(lista[i].videoid, name);
        }
    }