public static int UpYdintro(Model.Ydintro hp) { string sql = $"update Ydintro set content='{hp.content}',imgurl='{hp.imgurl}'"; DAL.SqlHelper <hp> .ExceuteNonQuery(sql); return(DAL.SqlHelper <hp> .ExceuteNonQuery(sql));; }
protected void Button1_OnClick(object sender, EventArgs e) { Tool.UpFile a = new UpFile(); Model.Ydintro hps = new Model.Ydintro() { content = at.Value, imgurl = a.upFileName(this.Image1, this.FileUpload1, "../img/Ydintro/") }; _ = BackStages.Upt.UpYdintro(hps) > 0 ? Tool.Tool.Alert("True", "../img/Ydintro/" + Hq.imgurl) : Tool.Tool.Alert("False"); }
protected void Page_Load(object sender, EventArgs e) { Hq = BLL.Product.GetYdintro()[0]; at.Value = Hq.content; Image1.ImageUrl = "../img/Ydintro/" + Hq.imgurl; }