/// <summary>
    /// Handles the UniGrid's OnAction event.
    /// </summary>
    /// <param name="actionName">Name of item (button) that throws event</param>
    /// <param name="actionArgument">ID (value of Primary key) of corresponding data row</param>
    protected void uniGrid_OnAction(string actionName, object actionArgument)
    {
        if (actionName == "edit")
        {
            URLHelper.Redirect("TaxClass_Frameset.aspx?taxclassid=" + Convert.ToString(actionArgument) + "&siteId=" + SiteID);
        }
        else if (actionName == "delete")
        {
            // Check permissions
            CheckConfigurationModification();

            TaxClassInfoProvider.DeleteTaxClassInfo(ValidationHelper.GetInteger(actionArgument, 0));
        }
    }
Exemple #2
0
    /// <summary>
    /// Handles the UniGrid's OnAction event.
    /// </summary>
    /// <param name="actionName">Name of item (button) that throws event</param>
    /// <param name="actionArgument">ID (value of Primary key) of corresponding data row</param>
    protected void uniGrid_OnAction(string actionName, object actionArgument)
    {
        if (actionName == "edit")
        {
            var    editElementName = IsMultiStoreConfiguration ? "edit.Tools.Ecommerce.TaxProperties" : "edit.Configuration.TaxClasses";
            string url             = GetRedirectURL(editElementName);
            url = URLHelper.AddParameterToUrl(url, "objectid", ValidationHelper.GetInteger(actionArgument, 0).ToString("0"));

            URLHelper.Redirect(url);
        }
        else if (actionName == "delete")
        {
            // Check permissions
            CheckConfigurationModification();

            TaxClassInfoProvider.DeleteTaxClassInfo(ValidationHelper.GetInteger(actionArgument, 0));
        }
    }