private void BindShow()
 {
     GZS.Model.VideoSysM model = videosysbll.GetModel(id);
     if (model != null)
     {
         this.txttitle.Text     = model.videotitle.Trim();
         this.txtVidoiName.Text = model.VidoiName.Trim();
         this.txtJieShao.Text   = model.introduction.Trim();
         this.txtLaiYuan.Text   = model.form.Trim();
         if (model.ImageName.Trim() != ConfigurationManager.AppSettings["VideoDefaultImgeName"].ToString().Trim())
         {
             Image1.ImageUrl = "http://dp.topfo.com/img/" + loginname + "/" + model.ImageName;
         }
         else
         {
             Image1.ImageUrl = ConfigurationManager.AppSettings["VideoDefaultLuJin"].ToString();
         }
         defualImageName = model.ImageName;
     }
 }
    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");
        }
    }