private void BindObject(int objID) { HeadFooterInfo obj = HeadFooterManager.Select(objID); if (obj != null) { img1.DescriptionUrl = "~/Upload/" + obj.Contents; img1.ImageUrl = "~/Upload/" + obj.Contents; lblImg1.Text = this.imageName; imageName = obj.Contents; } }
protected void btnSave_Click(object sender, EventArgs e) { if (id > 0) { HeadFooterInfo obj = new HeadFooterInfo(); obj.Contents = imageName; obj.Type = 1;//header obj.ID = id; HeadFooterManager.Update(obj); lblError.Text = "Cập nhật thành công"; } else { HeadFooterInfo obj = new HeadFooterInfo(); obj.Contents = imageName; obj.Type = 1;//header HeadFooterManager.Insert(obj); lblError.Text = "Thêm mới thành công"; } }
private void BindObject(int i) { HeadFooterInfo obj = HeadFooterManager.Select(i); txtDetailText.Value = obj.Contents; }
public string Getlogo(int id) { HeadFooterInfo info = HeadFooterManager.Select(id); return(info.Contents); }