private void GuardarDatos()
        {
            Int32 Entry;

            oForm.Freeze(true);
            try
            {
                for (Int32 iCant = 0; iCant <= oDataTable.Rows.Count - 1; iCant++)
                {
                    if (((System.String)oDataTable.GetValue("Cuenta", iCant)).Trim() != "")
                    {
                        oDBDSHeader.Clear();
                        oDBDSHeader.InsertRecord(0);
                        oDBDSHeader.SetValue("U_Cuenta", 0, ((System.String)oDataTable.GetValue("Cuenta", iCant)).Trim());
                        oDBDSHeader.SetValue("U_Desc", 0, ((System.String)oDataTable.GetValue("Descripcion", iCant)).Trim());
                        oDBDSHeader.SetValue("U_Clasif", 0, ((System.String)oDataTable.GetValue("Clasificacion", iCant)).Trim());


                        if (((System.Int32)oDataTable.GetValue("DocEntry", iCant)) == 0)
                        {
                            Entry = Funciones.AddDataSourceInt1("VID_FEPLANCTA", oDBDSHeader, "", null, "", null, "", null);
                        }
                        else
                        {
                            oDBDSHeader.SetValue("DocEntry", 0, oDataTable.GetValue("DocEntry", iCant).ToString().Trim());
                            Entry = Funciones.UpdDataSourceInt1("VID_FEPLANCTA", oDBDSHeader, "", null, "", null, "", null);
                        }

                        if (Entry > 0)
                        {
                            FSBOApp.StatusBar.SetText("Se ha guardado satisfactoriamente el Plan de Cuenta", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success);
                        }

                        else
                        {
                            FSBOApp.StatusBar.SetText("No se ha guardado Plan de Cuenta", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                        }
                    }
                }

                CargarGrilla();
                oForm.Mode = BoFormMode.fm_OK_MODE;
            }
            catch (Exception y)
            {
                FSBOApp.StatusBar.SetText("GuardarDatos: " + y.Message + " ** Trace: " + y.StackTrace, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                OutLog("GuardarDatos: " + y.Message + " ** Trace: " + y.StackTrace);
            }
            finally
            {
                oForm.Freeze(false);
            }
        }
        private void Guardar_Registros()
        {
            String CardCode;
            String CardName;
            String Activado;
            Int32  DocEntry;
            Int32  lRetCode;

            SAPbouiCOM.ProgressBar oProgressBar = null;

            oForm.Freeze(true);
            try
            {
                FSBOApp.StatusBar.SetText("Inicio de actualización lista negra", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success);
                oProgressBar = FSBOApp.StatusBar.CreateProgressBar("Actualizando lista negra...", odt.Rows.Count, false);

                for (Int32 iCont_1 = 0; iCont_1 < odt.Rows.Count; iCont_1++)
                {
                    if (((System.String)odt.GetValue("U_CardCode", iCont_1)).Trim().Length > 0)
                    {
                        oDBDSHeader.Clear();
                        oDBDSHeader.InsertRecord(0);

                        DocEntry = ((System.Int32)odt.GetValue("DocEntry", iCont_1));
                        CardCode = ((System.String)odt.GetValue("U_CardCode", iCont_1)).Trim();
                        CardName = ((System.String)odt.GetValue("U_CardName", iCont_1)).Trim();
                        s        = ((System.String)odt.GetValue("U_Activado", iCont_1)).Trim();
                        if (s == "")
                        {
                            Activado = "N";
                        }
                        else
                        {
                            Activado = s;
                        }
                        oDBDSHeader.SetValue("U_CardCode", 0, CardCode);
                        oDBDSHeader.SetValue("U_CardName", 0, CardName);
                        oDBDSHeader.SetValue("U_Activado", 0, Activado);

                        if (DocEntry != 0)
                        {
                            oDBDSHeader.SetValue("DocEntry", 0, DocEntry.ToString());
                            lRetCode = Funciones.UpdDataSourceInt1("VID_FELISTANE", oDBDSHeader, "", null, "", null, "", null);
                        }
                        else
                        {
                            lRetCode = Funciones.AddDataSourceInt1("VID_FELISTANE", oDBDSHeader, "", null, "", null, "", null);
                        }

                        if (lRetCode == 0)
                        {
                            FSBOApp.StatusBar.SetText("No se ha actualizado proveedor " + CardCode, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                        }
                        else
                        {
                            FSBOApp.StatusBar.SetText("Se ha actualizado proveedor " + CardCode, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success);
                        }
                    }
                    oProgressBar.Value = iCont_1 + 1;
                }
                oProgressBar.Value = oProgressBar.Maximum;

                oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                CargarGrid();
            }
            catch (Exception e)
            {
                FSBOApp.StatusBar.SetText(e.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                OutLog("Guardar_Registros: " + e.Message + " ** Trace: " + e.StackTrace);
            }
            finally
            {
                oForm.Freeze(false);
                oProgressBar.Stop();
                FSBOf._ReleaseCOMObject(oProgressBar);
            }
        }