public void Size_Click(Object sender, EventArgs e) { product.ProductId = Int32.Parse(((Button)sender).Name); //Conseguir id UserControlEventArgs args = new UserControlEventArgs(product); //se le pasa los argumentos al evento OnButtonSize_Click(args); }
public virtual void OnButtonSize_Click(UserControlEventArgs e) { ButtonSize_Click?.Invoke(this, e); }