コード例 #1
0
ファイル: Views.aspx.cs プロジェクト: daniela12/gooptic
    protected void uxGridProductViews_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandArgument.ToString() == "page")
        { }
        else
        {
            if (e.CommandName == "Edit")
            {
                Response.Redirect(AddViewlink + ItemID + "&productimageid=" + e.CommandArgument.ToString() + "&typeid=" + productTypeID);
            }
            else if (e.CommandName == "Delete")
            {
                ProductViewAdmin _admin = new ProductViewAdmin();

                bool check = _admin.Delete(int.Parse(e.CommandArgument.ToString()));
                if (check)
                {
                    _admin.DeleteByProductID(int.Parse(e.CommandArgument.ToString()));
                }

            }
        }
    }
コード例 #2
0
ファイル: view.aspx.cs プロジェクト: daniela12/gooptic
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void GridThumb_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Page")
     {
     }
     else
     {
         if (e.CommandName == "Edit")
         {
             Response.Redirect(AddViewlink + ItemId + "&productimageid=" + e.CommandArgument.ToString() + "&typeid=" + productTypeID);
         }
         if (e.CommandName == "RemoveItem")
         {
             ZNode.Libraries.Admin.ProductViewAdmin prodadmin = new ProductViewAdmin();
             bool Status = prodadmin.Delete(int.Parse(e.CommandArgument.ToString()));
             if (Status)
             {
                 this.BindImageDatas();
             }
         }
     }
 }