/// <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("PaymentOption_Edit.aspx?paymentOptionId=" + Convert.ToString(actionArgument) + "&siteId=" + SelectSite.SiteID); } else if (actionName == "delete") { PaymentOptionInfo paymentInfoObj = PaymentOptionInfoProvider.GetPaymentOptionInfo(ValidationHelper.GetInteger(actionArgument, 0)); // Nothing to delete if (paymentInfoObj == null) { return; } // Check permissions CheckConfigurationModification(paymentInfoObj.PaymentOptionSiteID); if (PaymentOptionInfoProvider.CheckDependencies(paymentInfoObj.PaymentOptionID)) { // Show error message ShowError(GetString("Ecommerce.DeleteDisabled")); return; } // Delete PaymentOptionInfo object from database PaymentOptionInfoProvider.DeletePaymentOptionInfo(paymentInfoObj); } }