コード例 #1
0
 protected void btnDeleteImage_Click(object sender, EventArgs e)
 {
     HomePageBlocks dao = new HomePageBlocks();
     if (dao.DeleteImage(this.GroupID))
         btnDeleteImage.Visible = false;
 }
コード例 #2
0
        private void BindCommonFields()
        {
            HomePageBlocks dao = new HomePageBlocks();
            HomePageBlock item = dao.GetByLangGroup("ru", GroupID);

            if (item != null)
            {
                btnDeleteImage.Visible = item.HasImage;
            }
        }
コード例 #3
0
 private void SaveCommonFields()
 {
     HomePageBlocks dao = new HomePageBlocks();
     if (fuImage.HasFile)
     {
         if (dao.UpdateImage(this.GroupID, fuImage.FileBytes))
             btnDeleteImage.Visible = true;
     }
 }
コード例 #4
0
        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();
        }