Exemple #1
0
 //赋值操作
 private void ShowInfo(int _id)
 {
     Spread.BLL.Video bll = new Spread.BLL.Video();
     Spread.Model.Video model = bll.GetModel(_id);
     txtTitle.Text = model.Title;
     txtForm.Text = model.Form;            
     lbFile.Text = model.Zhaiyao;
 }
Exemple #2
0
        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Spread.BLL.Video bll = new Spread.BLL.Video();
            Spread.Model.Video model = bll.GetModel(this.Id);
            if (FileUpload1.HasFile)
            {
                FileUpload1.SaveAs(Server.MapPath("~/UpLoadFiles/Files/") + FileUpload1.FileName);

            }
            model.Title = txtTitle.Text.Trim();
            model.Form = txtForm.Text.Trim();         
            model.AddTime = DateTime.Now;
            if (FileUpload1.HasFile)
            {
                model.Zhaiyao = "/UpLoadFiles/Files/" + FileUpload1.FileName;
            }
            else
            {
                model.Zhaiyao = lbFile.Text;
            }
            model.IsMsg = false;
            model.IsTop = false;
            model.IsRed = false;
            model.IsHot = false;
            model.IsSlide = false;
            model.LanguageType = "zh";

            model.IsMsg = false;
            model.IsTop = false;
            model.IsRed = false;
            model.IsHot = false;
            model.IsSlide = false;

            bll.Update(model);
            JscriptPrint("视频编辑成功啦!", "VideoList.aspx", "Success");


        }
Exemple #3
0
 //设置操作
 protected void rptList_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     int id = Convert.ToInt32(((Label)e.Item.FindControl("lb_id")).Text);
     Spread.BLL.Video bll = new Spread.BLL.Video();
     Spread.Model.Video model = bll.GetModel(id);
     switch (e.CommandName.ToLower())
     {
         case "ibtnmsg":
             if (model.IsMsg == true)
                 bll.UpdateField(id, "IsMsg=false");
             else
                 bll.UpdateField(id, "IsMsg=true");
             break;
         case "ibtntop":
             if (model.IsTop == true)
                 bll.UpdateField(id, "IsTop=false");
             else
                 bll.UpdateField(id, "IsTop=true");
             break;
         case "ibtnred":
             if (model.IsRed == true)
                 bll.UpdateField(id, "IsRed=false");
             else
                 bll.UpdateField(id, "IsRed=true");
             break;
         case "ibtnhot":
             if (model.IsHot == true)
                 bll.UpdateField(id, "IsHot=false");
             else
                 bll.UpdateField(id, "IsHot=true");
             break;
         case "ibtnslide":
             if (model.IsSlide == true)
                 bll.UpdateField(id, "IsSlide=false");
             else
                 bll.UpdateField(id, "IsSlide=true");
             break;
     }
     RptBind("Id>0 and LanguageType='zh' " + this.CombSqlTxt(this.classId, this.keywords, this.property), "AddTime desc");
 }