protected void btnDeleteImage_Click(object sender, EventArgs e) { HomePageBlocks dao = new HomePageBlocks(); if (dao.DeleteImage(this.GroupID)) btnDeleteImage.Visible = false; }
private void BindCommonFields() { HomePageBlocks dao = new HomePageBlocks(); HomePageBlock item = dao.GetByLangGroup("ru", GroupID); if (item != null) { btnDeleteImage.Visible = item.HasImage; } }
private void SaveCommonFields() { HomePageBlocks dao = new HomePageBlocks(); if (fuImage.HasFile) { if (dao.UpdateImage(this.GroupID, fuImage.FileBytes)) btnDeleteImage.Visible = true; } }
protected void GridViewItemsList_RowCommand(object sender, GridViewCommandEventArgs e) { HomePageBlocks dao = new HomePageBlocks(); if (e.CommandName == "MoveUp") { int id = int.Parse((string)e.CommandArgument); dao.MoveUp(id); } else if (e.CommandName == "MoveDown") { int id = int.Parse((string)e.CommandArgument); dao.MoveDown(id); } GridViewItemsList.DataBind(); }