コード例 #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            try
            {
                Boolean IsProcedio = false;
                int     Opcion     = 0;
                if (dgvEmpresas.RowCount > 0)
                {
                    foreach (DataGridViewRow row in dgvEmpresas.Rows)
                    {
                        DataGridViewCheckBoxCell chk = (DataGridViewCheckBoxCell)row.Cells[0];
                        if (chk.Value != null)
                        {
                            EmpresaTopBE IEntity = new EmpresaTopBE();
                            IEntity.FlgComite = 0;
                            decimal Linea = string.IsNullOrEmpty(row.Cells["nLinea"].Value.ToString()) ? 0 : Convert.ToDecimal(row.Cells["nLinea"].Value);
                            if (chk.Value.ToString().Equals("1"))
                            {
                                IEntity.FlgComite = 1;
                            }

                            IEntity.OPCION  = 5;
                            IEntity.USUARIO = General.General.GetUsuario;
                            IEntity.Year    = row.Cells["Year"].Value.ToString();
                            IEntity.RUC     = row.Cells["RUC"].Value.ToString();
                            IEntity.nLinea  = Linea;
                            new EmpresaTopBL().ProcesarEmpresaTop(IEntity);
                        }
                    }

                    btnBuscar.PerformClick();
                    MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet      ds           = new DataSet();
                EmpresaTopBE SocioLineaBE = new EmpresaTopBE()
                {
                    OPCION      = 4,
                    USUARIO     = General.General.GetUsuario,
                    RUC         = TextBoxX1.Text.Trim(),
                    RazonSocial = txtRazonSocial.Text.Trim()
                };

                ds = new EmpresaTopBL().ProcesarEmpresaTop(SocioLineaBE);
                dgvEmpresas.DataSource = ds.Tables[0];
                lblRegistros.Text      = ds.Tables[0].Rows.Count.ToString() + " registro(s)";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
        private void btnImportar_Click(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtYear.Text))
                {
                    MessageBox.Show("Ingresar un año a cargar", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                if (txtYear.Text.Trim().Length != 4)
                {
                    MessageBox.Show("El año debe ser de 4 digitos", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                try
                {
                    DateTime dt = new DateTime(int.Parse(txtYear.Text), 1, 1);
                }
                catch
                {
                    MessageBox.Show("Ingresar un año valido", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    return;
                }

                string srutaArchivo = string.Empty;
                openFileDialog1.InitialDirectory = @"C:\";
                openFileDialog1.Filter           = "Archivos de Excel (*.xls) |*.xlsx";
                openFileDialog1.FilterIndex      = 2;
                openFileDialog1.RestoreDirectory = true;
                openFileDialog1.FileName         = "";
                List <Tuple <string, string, string> > LstNoEncontrados = new List <Tuple <string, string, string> >();

                if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    srutaArchivo = openFileDialog1.FileName;

                    try
                    {
                        cnExcel = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + srutaArchivo + ";Extended Properties='Excel 12.0 Xml;HDR=YES';");

                        if (cnExcel.State == ConnectionState.Closed)
                        {
                            cnExcel.Open();
                        }

                        if (!System.IO.File.Exists(srutaArchivo))
                        {
                            MessageBox.Show("No se encontró el Libro: " + srutaArchivo, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                        }

                        OleDbDataAdapter daExcel = new OleDbDataAdapter("Select * " +
                                                                        "From [Sheet1$A1:CH20000] ", cnExcel);

                        DataTable dtTable = new DataTable();
                        daExcel.Fill(dtTable);

                        pbCargaTop10K.Value   = 0;
                        pbCargaTop10K.Minimum = 0;
                        pbCargaTop10K.Maximum = dtTable.Rows.Count;
                        pbCargaTop10K.Step    = 1;

                        int Count              = 0;
                        int CountRegCargados   = 0;
                        int CountRegNoCargados = 0;
                        lblRegistros.Text = CountRegCargados.ToString() + " registro(s) cargado(s)";
                        foreach (DataRow row in dtTable.Rows)
                        {
                            Count = 0;
                            EmpresaTopBE IEntity = new EmpresaTopBE();
                            //RUC	Razón Social	Nombre Comercial	Ciiu	Ciiu 5dig	Sector Esp	Sector Ing	Subsector Esp	Ciiu Esp Detalle	Ciiu Ing Detalle
                            //Productos Servicios	Grupo	Partgrupo	Listada Bolsa	Regulada Sbs
                            string RUC         = row[Count].ToString().Trim(); Count++;
                            string RazonSocial = row[Count].ToString().Trim(); Count++;
                            if (string.IsNullOrEmpty(RUC))
                            {
                                break;
                            }
                            IEntity.OPCION             = 2;
                            IEntity.USUARIO            = General.General.GetUsuario;
                            IEntity.Year               = txtYear.Text.Trim();
                            IEntity.RUC                = RUC;
                            IEntity.RazonSocial        = RazonSocial;
                            IEntity.NombreComercial    = row[Count].ToString().Trim(); Count++;
                            IEntity.CIIU               = row[Count].ToString().Trim(); Count++;
                            IEntity.CIIU5              = row[Count].ToString().Trim(); Count++;
                            IEntity.SectorEsp          = row[Count].ToString().Trim(); Count++;
                            IEntity.SectorIng          = row[Count].ToString().Trim(); Count++;
                            IEntity.SubsectorEsp       = row[Count].ToString().Trim(); Count++;
                            IEntity.CIIUEspDetalle     = row[Count].ToString().Trim(); Count++;
                            IEntity.CIIUIngDetalle     = row[Count].ToString().Trim(); Count++;
                            IEntity.ProductosServicios = row[Count].ToString().Trim(); Count++;
                            IEntity.Grupo              = row[Count].ToString().Trim(); Count++;
                            IEntity.Partgrupo          = row[Count].ToString().Trim(); Count++;
                            IEntity.ListadaBolsa       = row[Count].ToString().Trim(); Count++;
                            IEntity.ReguladaSbs        = row[Count].ToString().Trim(); Count++;
                            //N Trabajadores,	N Sucursales,	Fecha Fundacion, AÑos De Funcionamiento,Tamano De Empresa,	Extranjera,	Porcextranjera,	Estatal,
                            //Porcestatal,	Situación,	Direccion,	Distrito,	Provincia,	Departamento,	Telefono1,
                            IEntity.NTrabajadores       = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : int.Parse(row[Count].ToString()); Count++;
                            IEntity.NSucursales         = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : int.Parse(row[Count].ToString()); Count++;
                            IEntity.FechaFundacion      = row[Count].ToString().Trim(); Count++;
                            IEntity.AniosFuncionamiento = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.TamanoEmpresa       = row[Count].ToString().Trim(); Count++;
                            IEntity.Extranjera          = row[Count].ToString().Trim(); Count++;
                            IEntity.PorcExtranjera      = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.Estatal             = row[Count].ToString().Trim(); Count++;
                            IEntity.PorcEstatal         = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.Situacion           = row[Count].ToString().Trim(); Count++;
                            IEntity.Direccion           = row[Count].ToString().Trim(); Count++;
                            IEntity.Distrito            = row[Count].ToString().Trim(); Count++;
                            IEntity.Provincia           = row[Count].ToString().Trim(); Count++;
                            IEntity.Departamento        = row[Count].ToString().Trim(); Count++;
                            IEntity.Telefono1           = row[Count].ToString().Trim(); Count++;
                            //Telefono2,	Telefono3,	Celular 1,	Celular 2,	Fax1,	 Fax2,	Email Corp,	Pagweb,	Ranking 2016,	Ranking 2015,	Ranking 2014,
                            //Facturado 2016 Soles Minimo,	Facturado 2016 Soles Maximo,	Facturado 2016 Usd Minimo,	Facturado 2016 Usd Maximo,
                            IEntity.Telefono2        = row[Count].ToString().Trim(); Count++;
                            IEntity.Telefono3        = row[Count].ToString().Trim(); Count++;
                            IEntity.Celular1         = row[Count].ToString().Trim(); Count++;
                            IEntity.Celular2         = row[Count].ToString().Trim(); Count++;
                            IEntity.Fax1             = row[Count].ToString().Trim(); Count++;
                            IEntity.Fax2             = row[Count].ToString().Trim(); Count++;
                            IEntity.EmailCorp        = row[Count].ToString().Trim(); Count++;
                            IEntity.PaginaWeb        = row[Count].ToString().Trim(); Count++;
                            IEntity.RankingY         = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.RankingY_1       = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.RankingY_2       = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMinSolY = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMaxSolY = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMinUsdY = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMaxUsdY = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            //Facturado 2015 Soles Minimo,	Facturado 2015 Soles Maximo,	Facturado 2015 Usd Minimo,	Facturado 2015 Usd Maximo,
                            //Facturado 2014 Soles Minimo,	Facturado 2014 Soles Maximo,	Facturado 2014 Usd Minimo,	Facturado 2014 Usd Maximo,
                            //Priv Publ,	Ingresos2016,	Utilidad Neta 2016,	Activos 2016,	Patrimonio 2016,	Pasivo Total 2016,	Ingresos2015,
                            IEntity.FacturadoMinSolY_1 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMaxSolY_1 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMinUsdY_1 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMaxUsdY_1 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMinSolY_2 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMaxSolY_2 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMinUsdY_2 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.FacturadoMaxUsdY_2 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.TipoPrivadaPublica = row[Count].ToString().Trim(); Count++;
                            IEntity.IngresosY          = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.UtilidadNetaY      = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.ActivosY           = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.PatrimonioY        = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.PasivoTotalY       = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.IngresosY_1        = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            //Utilidad Neta 2015,	Activos 2015,	Patrimonio 2015,	Pasivo Total 2015,
                            //Ingresos 2014,	Utilidad Neta 2014,	Activos 2014,	Patrimonio 2014,	Pasivo Total 2014,
                            //Exportadora,	Porcexpo Vtas2016,	Importadora,	Usdexpo2016,	Usdexpo2015,	Usdexpo2014,
                            IEntity.UtilidadNetaY_1 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.ActivosY_1      = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.PatrimonioY_1   = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.PasivoTotalY_1  = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.IngresosY_2     = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.UtilidadNetaY_2 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.ActivosY_2      = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.PatrimonioY_2   = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.PasivoTotalY_2  = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.TipoExportadora = row[Count].ToString().Trim(); Count++;
                            IEntity.PorExpoVtasY    = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.Importadora     = row[Count].ToString().Trim(); Count++;
                            IEntity.USDExpoY        = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDExpoY_1      = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDExpoY_2      = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            //Usdexpo2013,	Usdexpo2012,	Usdexpo2011,	Usdexpo2010,	Usdimpo2016,
                            //Usdimpo2015,	Usdimpo2014,	Usdimpo2013,	Usdimpo2012,	Usdimpo2011,	Usdimpo2010
                            IEntity.USDExpoY_3 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDExpoY_4 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDExpoY_5 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDExpoY_6 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDImpoY   = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDImpoY_1 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDImpoY_2 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDImpoY_3 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDImpoY_4 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDImpoY_5 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            IEntity.USDImpoY_6 = string.IsNullOrEmpty(row[Count].ToString().Trim()) ? 0 : Convert.ToDecimal(row[Count].ToString()); Count++;
                            try
                            {
                                new EmpresaTopBL().ProcesarEmpresaTop(IEntity);
                                CountRegCargados++;
                                lblRegistros.Text = CountRegCargados.ToString() + " registro(s) cargado(s)";
                            }
                            catch (Exception ex)
                            {
                                LstNoEncontrados.Add(new Tuple <string, string, string>(RUC, RazonSocial, ex.Message));
                                CountRegNoCargados++;
                            }
                            pbCargaTop10K.PerformStep();
                        }

                        cnExcel.Close();
                        lblRegNoCargados.Text             = CountRegNoCargados.ToString() + " registro(s) que no se cargaron";
                        dgvRegistrosNoCargados.DataSource = LstNoEncontrados;
                        MessageBox.Show("Se Proceso Correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        cnExcel.Close();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                throw ex;
            }
        }
コード例 #4
0
 public DataSet ProcesarEmpresaTop(EmpresaTopBE BE)
 {
     return(EmpresaTopDA.ProcesarEmpresaTop(BE));
 }
コード例 #5
0
        public DataSet ProcesarEmpresaTop(EmpresaTopBE BE)
        {
            DataSet dsResult;

            try
            {
                cmd = db.GetStoredProcCommand("EmpresaTop_Mnt");
                cmd.CommandTimeout = 0;
                db.AddInParameter(cmd, "OPCION", DbType.Int32, BE.OPCION);
                db.AddInParameter(cmd, "USUARIO", DbType.String, BE.USUARIO);
                db.AddInParameter(cmd, "Year", DbType.String, BE.Year);
                db.AddInParameter(cmd, "RUC", DbType.String, BE.RUC);
                db.AddInParameter(cmd, "RazonSocial", DbType.String, BE.RazonSocial);
                db.AddInParameter(cmd, "NombreComercial", DbType.String, BE.NombreComercial);
                db.AddInParameter(cmd, "CIIU", DbType.String, BE.CIIU);
                db.AddInParameter(cmd, "CIIU5", DbType.String, BE.CIIU5);
                db.AddInParameter(cmd, "SectorEsp", DbType.String, BE.SectorEsp);
                db.AddInParameter(cmd, "SectorIng", DbType.String, BE.SectorIng);
                db.AddInParameter(cmd, "SubsectorEsp", DbType.String, BE.SubsectorEsp);
                db.AddInParameter(cmd, "CIIUEspDetalle", DbType.String, BE.CIIUEspDetalle);
                db.AddInParameter(cmd, "CIIUIngDetalle", DbType.String, BE.CIIUIngDetalle);
                db.AddInParameter(cmd, "ProductosServicios", DbType.String, BE.ProductosServicios);
                db.AddInParameter(cmd, "Grupo", DbType.String, BE.Grupo);
                db.AddInParameter(cmd, "Partgrupo", DbType.String, BE.Partgrupo);
                db.AddInParameter(cmd, "ListadaBolsa", DbType.String, BE.ListadaBolsa);
                db.AddInParameter(cmd, "ReguladaSbs", DbType.String, BE.ReguladaSbs);
                db.AddInParameter(cmd, "NTrabajadores", DbType.Decimal, BE.NTrabajadores);
                db.AddInParameter(cmd, "NSucursales", DbType.Decimal, BE.NSucursales);
                db.AddInParameter(cmd, "FechaFundacion", DbType.String, BE.FechaFundacion);
                db.AddInParameter(cmd, "AniosFuncionamiento", DbType.Decimal, BE.AniosFuncionamiento);
                db.AddInParameter(cmd, "TamanoEmpresa", DbType.String, BE.TamanoEmpresa);
                db.AddInParameter(cmd, "Extranjera", DbType.String, BE.Extranjera);
                db.AddInParameter(cmd, "PorcExtranjera", DbType.Decimal, BE.PorcExtranjera);
                db.AddInParameter(cmd, "Estatal", DbType.String, BE.Estatal);
                db.AddInParameter(cmd, "PorcEstatal", DbType.Decimal, BE.PorcEstatal);
                db.AddInParameter(cmd, "Situacion", DbType.String, BE.Situacion);
                db.AddInParameter(cmd, "Direccion", DbType.String, BE.Direccion);
                db.AddInParameter(cmd, "Distrito", DbType.String, BE.Distrito);
                db.AddInParameter(cmd, "Provincia", DbType.String, BE.Provincia);
                db.AddInParameter(cmd, "Departamento", DbType.String, BE.Departamento);
                db.AddInParameter(cmd, "Telefono1", DbType.String, BE.Telefono1);
                db.AddInParameter(cmd, "Telefono2", DbType.String, BE.Telefono2);
                db.AddInParameter(cmd, "Telefono3", DbType.String, BE.Telefono3);
                db.AddInParameter(cmd, "Celular1", DbType.String, BE.Celular1);
                db.AddInParameter(cmd, "Celular2", DbType.String, BE.Celular2);
                db.AddInParameter(cmd, "Fax1", DbType.String, BE.Fax1);
                db.AddInParameter(cmd, "Fax2", DbType.String, BE.Fax2);
                db.AddInParameter(cmd, "EmailCorp", DbType.String, BE.EmailCorp);
                db.AddInParameter(cmd, "PaginaWeb", DbType.String, BE.PaginaWeb);
                db.AddInParameter(cmd, "RankingY", DbType.Decimal, BE.RankingY);
                db.AddInParameter(cmd, "RankingY_1", DbType.Decimal, BE.RankingY_1);
                db.AddInParameter(cmd, "RankingY_2", DbType.Decimal, BE.RankingY_2);
                db.AddInParameter(cmd, "FacturadoMinSolY", DbType.Decimal, BE.FacturadoMinSolY);
                db.AddInParameter(cmd, "FacturadoMaxSolY", DbType.Decimal, BE.FacturadoMaxSolY);
                db.AddInParameter(cmd, "FacturadoMinUsdY", DbType.Decimal, BE.FacturadoMinUsdY);
                db.AddInParameter(cmd, "FacturadoMaxUsdY", DbType.Decimal, BE.FacturadoMaxUsdY);
                db.AddInParameter(cmd, "FacturadoMinSolY_1", DbType.Decimal, BE.FacturadoMinSolY_1);
                db.AddInParameter(cmd, "FacturadoMaxSolY_1", DbType.Decimal, BE.FacturadoMaxSolY_1);
                db.AddInParameter(cmd, "FacturadoMinUsdY_1", DbType.Decimal, BE.FacturadoMinUsdY_1);
                db.AddInParameter(cmd, "FacturadoMaxUsdY_1", DbType.Decimal, BE.FacturadoMaxUsdY_1);
                db.AddInParameter(cmd, "FacturadoMinSolY_2", DbType.Decimal, BE.FacturadoMinSolY_2);
                db.AddInParameter(cmd, "FacturadoMaxSolY_2", DbType.Decimal, BE.FacturadoMaxSolY_2);
                db.AddInParameter(cmd, "FacturadoMinUsdY_2", DbType.Decimal, BE.FacturadoMinUsdY_2);
                db.AddInParameter(cmd, "FacturadoMaxUsdY_2", DbType.Decimal, BE.FacturadoMaxUsdY_2);
                db.AddInParameter(cmd, "TipoPrivadaPublica", DbType.String, BE.TipoPrivadaPublica);
                db.AddInParameter(cmd, "IngresosY", DbType.Decimal, BE.IngresosY);
                db.AddInParameter(cmd, "UtilidadNetaY", DbType.Decimal, BE.UtilidadNetaY);
                db.AddInParameter(cmd, "ActivosY", DbType.Decimal, BE.ActivosY);
                db.AddInParameter(cmd, "PatrimonioY", DbType.Decimal, BE.PatrimonioY);
                db.AddInParameter(cmd, "PasivoTotalY", DbType.Decimal, BE.PasivoTotalY);
                db.AddInParameter(cmd, "IngresosY_1", DbType.Decimal, BE.IngresosY_1);
                db.AddInParameter(cmd, "UtilidadNetaY_1", DbType.Decimal, BE.UtilidadNetaY_1);
                db.AddInParameter(cmd, "ActivosY_1", DbType.Decimal, BE.ActivosY_1);
                db.AddInParameter(cmd, "PatrimonioY_1", DbType.Decimal, BE.PatrimonioY_1);
                db.AddInParameter(cmd, "PasivoTotalY_1", DbType.Decimal, BE.PasivoTotalY_1);
                db.AddInParameter(cmd, "IngresosY_2", DbType.Decimal, BE.IngresosY_2);
                db.AddInParameter(cmd, "UtilidadNetaY_2", DbType.Decimal, BE.UtilidadNetaY_2);
                db.AddInParameter(cmd, "ActivosY_2", DbType.Decimal, BE.ActivosY_2);
                db.AddInParameter(cmd, "PatrimonioY_2", DbType.Decimal, BE.PatrimonioY_2);
                db.AddInParameter(cmd, "PasivoTotalY_2", DbType.Decimal, BE.PasivoTotalY_2);
                db.AddInParameter(cmd, "TipoExportadora", DbType.String, BE.TipoExportadora);
                db.AddInParameter(cmd, "PorExpoVtasY", DbType.Decimal, BE.PorExpoVtasY);
                db.AddInParameter(cmd, "USDExpoY", DbType.Decimal, BE.USDExpoY);
                db.AddInParameter(cmd, "USDExpoY_1", DbType.Decimal, BE.USDExpoY_1);
                db.AddInParameter(cmd, "USDExpoY_2", DbType.Decimal, BE.USDExpoY_2);
                db.AddInParameter(cmd, "USDExpoY_3", DbType.Decimal, BE.USDExpoY_3);
                db.AddInParameter(cmd, "USDExpoY_4", DbType.Decimal, BE.USDExpoY_4);
                db.AddInParameter(cmd, "USDExpoY_5", DbType.Decimal, BE.USDExpoY_5);
                db.AddInParameter(cmd, "USDExpoY_6", DbType.Decimal, BE.USDExpoY_6);
                db.AddInParameter(cmd, "USDImpoY", DbType.Decimal, BE.USDImpoY);
                db.AddInParameter(cmd, "USDImpoY_1", DbType.Decimal, BE.USDImpoY_1);
                db.AddInParameter(cmd, "USDImpoY_2", DbType.Decimal, BE.USDImpoY_2);
                db.AddInParameter(cmd, "USDImpoY_3", DbType.Decimal, BE.USDImpoY_3);
                db.AddInParameter(cmd, "USDImpoY_4", DbType.Decimal, BE.USDImpoY_4);
                db.AddInParameter(cmd, "USDImpoY_5", DbType.Decimal, BE.USDImpoY_5);
                db.AddInParameter(cmd, "USDImpoY_6", DbType.Decimal, BE.USDImpoY_6);
                db.AddInParameter(cmd, "FlgComite", DbType.Decimal, BE.FlgComite);
                db.AddInParameter(cmd, "nLinea", DbType.Decimal, BE.nLinea);
                dsResult = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(dsResult);
        }