private void SaveCommonFields() { LatestProducts dao = new LatestProducts(); if (fuImage.HasFile) { if (dao.UpdateImage(this.GroupID, fuImage.FileBytes)) btnDeleteImage.Visible = true; } //save pages dao.ShowOnPages(this.GroupID, cp.GetSelectedIDs()); //save sections dao.ShowInSections(this.GroupID, cs.GetSelectedIDs()); }
protected void btnDeleteImage_Click(object sender, EventArgs e) { LatestProducts dao = new LatestProducts(); if (dao.DeleteImage(this.GroupID)) btnDeleteImage.Visible = false; }
private void BindCommonFields() { LatestProducts dao = new LatestProducts(); LatestProduct item = dao.GetByLangGroup("ru", GroupID); if (item != null) { //dpLatestProductDate.SelectedDate = item.Date; //ip.CheckItem(item.ImagePosition); btnDeleteImage.Visible = item.HasImage; List<int> pages = dao.GetContentPagesIDs(item.GroupID); List<int> sections = dao.GetContentSectionsIDs(item.GroupID); cp.CheckItems(pages); cs.CheckItems(sections); } }