private void Button1_ClickAfter(object sboObject, SAPbouiCOM.SBOItemEventArg pVal)
        {
            if (Grid0.Rows.SelectedRows.Count > 0)
            {
                oUDS = oForm.DataSources.UserDataSources.Item("UD_0");
                int      nRow  = Grid0.Rows.SelectedRows.Item(0, SAPbouiCOM.BoOrderType.ot_RowOrder);
                string[] sVend = new string[2];
                sVend[0] = Convert.ToString(Grid0.DataTable.GetValue(0, nRow));
                sVend[1] = "(" + Convert.ToString(Grid0.DataTable.GetValue(1, nRow)) + ") - "
                           + Convert.ToString(Grid0.DataTable.GetValue(2, nRow));
                SAPbouiCOM.Form oFormP = Application.SBO_Application.Forms.Item(oUDS.ValueEx);
                oForm.Close();

                switch (sOrigf)
                {
                case "Pagos":
                    Comisiones.Asigna_Vendedor_Grid_Pagos(sVend[0]);
                    break;

                case "Premios":
                    Comisiones.Asigna_Vendedor_Grid_Premios(sVend[0]);
                    break;

                case "ComisionesA":
                case "ComisionesR":
                    Comisiones.Agregar_Vendedor_Comisiones_Periodo(sVend);
                    break;
                }
            }
        }