예제 #1
0
        private void btnEditar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (currentRow == null)
            {
                lblStatus.Caption = "Por favor seleccione un elemento de la Lista";
                return;
            }
            else
            {
                lblStatus.Caption = "";
            }
            isEdition = true;

            HabilitarControles(true);
            //Inactivar Controles que no se editan
            this.slkupGrupo.ReadOnly       = true;
            this.slkupCuentaMayor.ReadOnly = true;

            if (CuentaContableDAC.GetCountCuentaByNivel(currentRow["Nivel1"].ToString(), currentRow["Nivel2"].ToString(), currentRow["Nivel3"].ToString(), currentRow["Nivel4"].ToString(), currentRow["Nivel5"].ToString(), currentRow["Nivel6"].ToString()) > 1)
            {
                this.chkAceptaDatos.ReadOnly = true;
                this.chkEsMayor.ReadOnly     = true;
                this.chkActiva.ReadOnly      = true;
            }
            else
            {
                this.chkAceptaDatos.ReadOnly = false;
                this.chkEsMayor.ReadOnly     = false;
                this.chkActiva.ReadOnly      = false;
            }

            lblStatus.Caption = "Editando el registro : " + currentRow["Descr"].ToString();
        }
예제 #2
0
        void frmConsultaLibroMayor_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime fechatemp = DateTime.Today;
                this.dtpFechaInicial.EditValue = new DateTime(fechatemp.Year, fechatemp.Month, 1);
                if (fechatemp.Month + 1 < 13)
                {
                    this.dtpFechaFinal.EditValue = new DateTime(fechatemp.Year, fechatemp.Month + 1, 1).AddDays(-1);
                }
                else
                {
                    this.dtpFechaFinal.EditValue = new DateTime(Convert.ToInt32(fechatemp.Year) + 1, 1, 1).AddDays(-1);
                }



                _dtCuenta = CuentaContableDAC.GetData(-1, -1, -1, "*", "*", "*", "*", "*", "*", "*", -1, 0, 1, 1, -1, -1).Tables[0];

                this.chkComboCuenta.Properties.DataSource    = _dtCuenta;
                this.chkComboCuenta.Properties.DisplayMember = "Descr";
                this.chkComboCuenta.Properties.ValueMember   = "IDCuenta";
                this.chkComboCuenta.Properties.SeparatorChar = '|';
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #3
0
        private void FrmConsultaSaldoCentro_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime fechatemp = DateTime.Today;
                this.dtpFechaInicial.EditValue = new DateTime(fechatemp.Year, fechatemp.Month, 1);
                if (fechatemp.Month + 1 < 13)
                {
                    this.dtpFechaFinal.EditValue = new DateTime(fechatemp.Year, fechatemp.Month + 1, 1).AddDays(-1);
                }
                else
                {
                    this.dtpFechaFinal.EditValue = new DateTime(Convert.ToInt32(fechatemp.Year) + 1, 1, 1).AddDays(-1);
                }


                _dtCuenta = CuentaContableDAC.GetData(-1, -1, -1, "*", "*", "*", "*", "*", "*", "*", -1, -1, -1, 1, -1, -1).Tables[0];

                Util.Util.ConfigLookupEdit(this.slkupCuenta, _dtCuenta, "Descr", "IDCuenta");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuenta, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");
                this.slkupCuenta.Properties.ShowClearButton = true;
                this.slkupCuenta.Properties.PopupFormSize   = new Size(400, 300);
                this.slkupCuenta.Properties.BestFitMode     = DevExpress.XtraEditors.Controls.BestFitMode.BestFit;
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }
예제 #4
0
        private void PopulateGrid()
        {
            _dsCuenta = CuentaContableDAC.GetData(-1, -1, -1, "*", "*", "*", "*", "*", "*", "*", -1, -1, -1, -1, -1, -1);

            _dtCuenta           = _dsCuenta.Tables[0];
            this.dtg.DataSource = null;
            this.dtg.DataSource = _dtCuenta;
            this.gridView.SelectRow(-1);

            PopulateDataSearchLookup();
        }
예제 #5
0
        private void FrmReporteDelMayor_Load(object sender, EventArgs e)
        {
            try
            {
                this.FormBorderStyle = FormBorderStyle.FixedSingle;
                this.MaximizeBox     = false;
                this.StartPosition   = FormStartPosition.CenterScreen;

                //Obtener los datos
                _dtCentroCosto    = CentroCostoDAC.GetData(-1, "*", "*", "*", "*", 0).Tables[0]; //No estamos tomando los acumuladores
                _dtCuentaContable = CuentaContableDAC.GetData(-1, -1, -1, "*", "*", "*", "*", "*", "*", "*", -1, -1, -1, 1, -1, -1).Tables[0];

                Util.Util.ConfigLookupEdit(this.slkupCentoCostoDesde, _dtCentroCosto, "Descr", "IDCentro");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCentoCostoDesde, "[{'ColumnCaption':'Centro','ColumnField':'Centro','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");

                Util.Util.ConfigLookupEdit(this.slkupCentroCostoHasta, _dtCentroCosto, "Descr", "IDCentro");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCentroCostoHasta, "[{'ColumnCaption':'Centro','ColumnField':'Centro','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");


                Util.Util.ConfigLookupEdit(this.slkupCuentaContableDesde, _dtCuentaContable, "Descr", "IDCuenta");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaContableDesde, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");

                Util.Util.ConfigLookupEdit(this.slkupCuentaContableHasta, _dtCuentaContable, "Descr", "IDCuenta");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaContableHasta, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");


                this.rbTotalesDiarios.Checked              = true;
                this.rgImprimirCuentas.SelectedIndex       = 0;
                this.rgCuentasSinMovimientos.SelectedIndex = 0;
                this.chkActivo.Checked     = true;
                this.chkPasivo.Checked     = true;
                this.chkGasto.Checked      = true;
                this.chkIngreso.Checked    = true;
                this.chkOrden.Checked      = true;
                this.chkPatrimonio.Checked = true;

                DateTime fechatemp = DateTime.Today;
                this.dtpFechaDesde.EditValue = new DateTime(fechatemp.Year, fechatemp.Month, 1);
                if (fechatemp.Month + 1 < 13)
                {
                    this.dtpFechaHasta.EditValue = new DateTime(fechatemp.Year, fechatemp.Month + 1, 1).AddDays(-1);
                }
                else
                {
                    this.dtpFechaHasta.EditValue = new DateTime(fechatemp.Year + 1, 1, 1).AddDays(-1);
                }

                this.rgCuentasSinMovimientos.SelectedIndex = 1;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #6
0
        private void popupCuentaContable_Load(object sender, EventArgs e)
        {
            _dtCuentas = CuentaContableDAC.GetData(-1, -1, -1, "*", "*", "*", "*", "*", "*", "*", -1, -1, -1, 1, -1, -1).Tables[0];
            // _dtCuentasConstante = _dtCuentas.Clone();

            this.gridCuentas.DataSource = _dtCuentas;

            if (sCuentasSelected != "")
            {
                CheckElements();
            }
        }
예제 #7
0
        private bool ValidarDatos()
        {
            bool   result   = true;
            String sMensaje = "";

            if (this.slkupTipo.EditValue == null)
            {
                sMensaje = sMensaje + "     • Tipo de Cuenta. \n\r";
            }
            if (this.slkupSubTipo.EditValue == null)
            {
                sMensaje = sMensaje + "     • Sub Tipo de Cuenta. \n\r";
            }
            if (this.slkupGrupo.EditValue == null)
            {
                sMensaje = sMensaje + "     • Grupo de Cuenta. \n\r";
            }
            if (this.txtNivel1.Text == "")
            {
                sMensaje = sMensaje + "     • Nivel 1. \n\r";
            }
            if (this.txtDescripcion.Text == "")
            {
                sMensaje = sMensaje + "     • Descripción de la Cuenta. \n\r";
            }
            if (this.chkAceptaDatos.EditValue == null && this.chkEsMayor.EditValue == null)
            {
                sMensaje = sMensaje + "     • Debe seleccionar si la cuenta es de Mayor o Acepta Datos. \n\r";
            }


            if (this.slkupCuentaMayor.EditValue == null)
            {
                //Validar que la cuenta de mayor no este ingresadas
                if (CuentaContableDAC.ExisteCuentaPrimerNivel(Convert.ToInt32(this.txtNivel1.Text)))
                {
                    sMensaje = sMensaje + "     • Por favor seleccione la cuenta de mayor.";
                }
            }
            if (sMensaje != "")
            {
                result = false;
                MessageBox.Show("Por favor revise los siguientes campos, puede que sean obligatorios: \n\r\n\r" + sMensaje);
            }
            return(result);
        }
예제 #8
0
        private void FrmReporteMayorporAsiento_Load(object sender, EventArgs e)
        {
            try
            {
                this.FormBorderStyle = FormBorderStyle.FixedSingle;
                this.MaximizeBox     = false;
                this.StartPosition   = FormStartPosition.CenterScreen;

                //Obtener los datos
                _dtCentro      = CentroCostoDAC.GetData(-1, "*", "*", "*", "*", 0).Tables[0]; //No estamos tomando los acumuladores
                _dtCuenta      = CuentaContableDAC.GetData(-1, -1, -1, "*", "*", "*", "*", "*", "*", "*", -1, -1, -1, 1, -1, -1).Tables[0];
                _dtTipoAsiento = TipoAsientoDAC.GetData().Tables[0];

                Util.Util.ConfigLookupEdit(this.slkupCentroDesde, _dtCentro, "Descr", "IDCentro");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCentroDesde, "[{'ColumnCaption':'Centro','ColumnField':'Centro','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");

                Util.Util.ConfigLookupEdit(this.slkupCentroHasta, _dtCentro, "Descr", "IDCentro");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCentroHasta, "[{'ColumnCaption':'Centro','ColumnField':'Centro','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");


                Util.Util.ConfigLookupEdit(this.slkupCuentaDesde, _dtCuenta, "Descr", "IDCuenta");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaDesde, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");

                Util.Util.ConfigLookupEdit(this.slkupCuentaHasta, _dtCuenta, "Descr", "IDCuenta");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaHasta, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");

                Util.Util.ConfigLookupEdit(this.slkupTipoAsiento, _dtTipoAsiento, "Descr", "Tipo");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupTipoAsiento, "[{'ColumnCaption':'Tipo','ColumnField':'Tipo','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");


                DateTime fechatemp = DateTime.Today;
                this.dtpFechaDesde.EditValue = new DateTime(fechatemp.Year, fechatemp.Month, 1);
                if (fechatemp.Month + 1 < 13)
                {
                    this.dtpFechaHasta.EditValue = new DateTime(fechatemp.Year, fechatemp.Month + 1, 1).AddDays(-1);
                }
                else
                {
                    this.dtpFechaHasta.EditValue = new DateTime(fechatemp.Year + 1, 1, 1).AddDays(-1);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #9
0
        private void btnEliminar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (currentRow != null)
            {
                string msg = currentRow["Descr"] + " eliminado..";

                if (MessageBox.Show("Esta seguro que desea eliminar el elemento: " + currentRow["Descr"].ToString(), _tituloVentana, MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
                {
                    //Verificar si la cuenta a eliminar es de mayor
                    if (Convert.ToBoolean(currentRow["EsMayor"]))
                    {
                        //Validar si tiene hijos
                        if (CuentaContableDAC.GetCountCuentaByNivel(currentRow["Nivel1"].ToString(), currentRow["Nivel2"].ToString(), currentRow["Nivel3"].ToString(), currentRow["Nivel4"].ToString(), currentRow["Nivel5"].ToString(), currentRow["Nivel6"].ToString()) > 1)
                        {
                            MessageBox.Show("La cuenta que desea eliminar es una cuenta de Mayor y tiene Sub Cuentas, por favor elimine las SubCuentas antes de proseguir");
                            return;
                        }
                    }

                    currentRow.Delete();

                    try
                    {
                        CuentaContableDAC.oAdaptador.Update(_dsCuenta, "Data");
                        _dsCuenta.AcceptChanges();

                        PopulateGrid();
                        lblStatus.Caption = msg;
                        Application.DoEvents();
                    }
                    catch (System.Data.SqlClient.SqlException ex)
                    {
                        _dsCuenta.RejectChanges();
                        lblStatus.Caption = "";
                        MessageBox.Show(ex.Message);
                    }
                }
            }
        }
예제 #10
0
        private void FrmParametrosContables_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox     = false;
            this.StartPosition   = FormStartPosition.CenterScreen;

            CargarParametros();
            //configurar los searchlokup
            _lstCuentasContable = CuentaContableDAC.GetData(-1, -1, -1, "*", "*", "*", "*", "*", "*", "*", -1, -1, 1, 1, -1, -1).Tables["Data"];
            Util.Util.ConfigLookupEdit(this.slkupCuentaUtilidadAcumulada, _lstCuentasContable, "Descr", "IDCuenta");
            Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaUtilidadAcumulada, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripción','ColumnField':'Descr','width':70}]");


            Util.Util.ConfigLookupEdit(this.slkupCuentaUtilidadPeriodo, _lstCuentasContable, "Descr", "IDCuenta");
            Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaUtilidadPeriodo, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripción','ColumnField':'Descr','width':70}]");

            Util.Util.ConfigLookupEdit(this.slkupTipoCambio, TipoCambioDAC.GetData("*").Tables[0], "Descr", "IDTipoCambio");
            Util.Util.ConfigLookupEditSetViewColumns(this.slkupTipoCambio, "[{'ColumnCaption':'ID','ColumnField':'IDTipoCambio','width':30},{'ColumnCaption':'Descripción','ColumnField':'Descr','width':70}]");

            this.slkupCuentaUtilidadAcumulada.Properties.ShowClearButton = true;
            this.slkupCuentaUtilidadPeriodo.Properties.ShowClearButton   = true;
        }
예제 #11
0
        private void slkupCuentaMayor_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                if (!isEdition)
                {
                    return;
                }
                if (this.slkupCuentaMayor.EditValue != null && this.slkupCuentaMayor.EditValue.ToString() != "")
                {
                    DataView dv = new DataView();
                    dv.Table     = _dtCuenta;
                    dv.RowFilter = string.Format("IDCuenta='{0}' ", this.slkupCuentaMayor.EditValue);
                    DataTable dt = dv.ToTable();
                    if (dt.Rows.Count == 0)
                    {
                        return;
                    }

                    //Este parametro permite seleccionar cual sera el tipo por defento que se seleccione
                    bool EsMayor = false;
                    if ((this.chkEsMayor.EditValue != null) || (this.chkAceptaDatos.EditValue != null))
                    {
                        EsMayor = Convert.ToBoolean((this.chkEsMayor.EditValue == null) ? false : this.chkEsMayor.EditValue);
                    }



                    if (dt.Rows[0]["Nivel5"].ToString() != "0")
                    {
                        long iProximoConsecutivo = CuentaContableDAC.GetNextConsecutivoFinal(Convert.ToInt32(dt.Rows[0]["Nivel1"]), Convert.ToInt32(dt.Rows[0]["Nivel2"]), Convert.ToInt32(dt.Rows[0]["Nivel3"]), Convert.ToInt32(dt.Rows[0]["Nivel4"]), Convert.ToInt32(dt.Rows[0]["Nivel5"]), -1);

                        // iProximoConsecutivo++;

                        this.txtNivel6.Text = iProximoConsecutivo.ToString();
                        this.txtNivel5.Text = dt.Rows[0]["Nivel5"].ToString();
                        this.txtNivel4.Text = dt.Rows[0]["Nivel4"].ToString();
                        this.txtNivel3.Text = dt.Rows[0]["Nivel3"].ToString();
                        this.txtNivel2.Text = dt.Rows[0]["Nivel2"].ToString();

                        this.chkAceptaDatos.EditValue = true;
                        this.chkAceptaDatos.ReadOnly  = true;
                    }
                    else if (dt.Rows[0]["Nivel4"].ToString() != "0")
                    {
                        long iProximoConsecutivo = CuentaContableDAC.GetNextConsecutivoFinal(Convert.ToInt32(dt.Rows[0]["Nivel1"]), Convert.ToInt32(dt.Rows[0]["Nivel2"]), Convert.ToInt32(dt.Rows[0]["Nivel3"]), Convert.ToInt32(dt.Rows[0]["Nivel4"]), -1, 0);

                        // iProximoConsecutivo++;
                        this.txtNivel6.Text = "0";
                        this.txtNivel5.Text = iProximoConsecutivo.ToString();
                        this.txtNivel4.Text = dt.Rows[0]["Nivel4"].ToString();
                        this.txtNivel3.Text = dt.Rows[0]["Nivel3"].ToString();
                        this.txtNivel2.Text = dt.Rows[0]["Nivel2"].ToString();
                    }
                    else if (dt.Rows[0]["Nivel3"].ToString() != "0")
                    {
                        long iProximoConsecutivo = CuentaContableDAC.GetNextConsecutivoFinal(Convert.ToInt32(dt.Rows[0]["Nivel1"]), Convert.ToInt32(dt.Rows[0]["Nivel2"]), Convert.ToInt32(dt.Rows[0]["Nivel3"]), -1, 0, 0);
                        // iProximoConsecutivo++;
                        this.txtNivel6.Text = "0";
                        this.txtNivel5.Text = "0";
                        this.txtNivel4.Text = iProximoConsecutivo.ToString();
                        this.txtNivel3.Text = dt.Rows[0]["Nivel3"].ToString();
                        this.txtNivel2.Text = dt.Rows[0]["Nivel2"].ToString();
                    }
                    else if (dt.Rows[0]["Nivel2"].ToString() != "0")
                    {
                        long iProximoConsecutivo = CuentaContableDAC.GetNextConsecutivoFinal(Convert.ToInt32(dt.Rows[0]["Nivel1"]), Convert.ToInt32(dt.Rows[0]["Nivel2"]), -1, 0, 0, 0);

                        // iProximoConsecutivo++;
                        this.txtNivel6.Text = "0";
                        this.txtNivel5.Text = "0";
                        this.txtNivel4.Text = "0";
                        this.txtNivel3.Text = iProximoConsecutivo.ToString();
                        this.txtNivel2.Text = dt.Rows[0]["Nivel2"].ToString();
                    }
                    else if (dt.Rows[0]["Nivel1"].ToString() != "0")
                    {
                        long iProximoConsecutivo = CuentaContableDAC.GetNextConsecutivoFinal(Convert.ToInt32(dt.Rows[0]["Nivel1"]), -1, 0, 0, 0, 0);
                        // iProximoConsecutivo++;
                        this.txtNivel6.Text = "0";
                        this.txtNivel5.Text = "0";
                        this.txtNivel4.Text = "0";
                        this.txtNivel3.Text = "0";
                        this.txtNivel2.Text = iProximoConsecutivo.ToString();
                        this.txtNivel1.Text = dt.Rows[0]["Nivel1"].ToString();
                    }
                    this.chkAceptaDatos.EditValue = null;
                    this.chkAceptaDatos.ReadOnly  = false;
                    if (this.txtNivel6.Text != "0")
                    {
                        this.chkAceptaDatos.EditValue = true;
                        this.chkAceptaDatos.Enabled   = false;
                    }
                    else
                    {
                        if (EsMayor)
                        {
                            this.chkEsMayor.EditValue = true;
                        }
                        else
                        {
                            this.chkAceptaDatos.EditValue = true;
                        }
                    }

                    this.txtDescripcion.Text = "";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #12
0
        private void slkupGrupo_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                if (!isEdition)
                {
                    return;
                }
                if (this.slkupGrupo.EditValue != null && this.slkupGrupo.EditValue.ToString() != "")
                {
                    DataView dv = new DataView();
                    dv.Table     = _dtGrupo;
                    dv.RowFilter = string.Format("IDGrupo='{0}'", this.slkupGrupo.EditValue);

                    DataTable dt = dv.ToTable();
                    if (dt.Rows.Count == 0)
                    {
                        return;
                    }
                    //Llenar tipo y sub Tipo
                    this.slkupTipo.EditValue    = dt.Rows[0]["IDTipo"].ToString();
                    this.slkupSubTipo.EditValue = dt.Rows[0]["IDSubTipo"].ToString();

                    //Validar si el tipo seleccionado ya tiene el elemento del primer nivel
                    if (CuentaContableDAC.ExisteCuentaPrimerNivel(Convert.ToInt32(dt.Rows[0]["Nivel1"].ToString())))
                    {
                        this.txtDescripcion.Text = "";
                    }
                    else
                    {
                        this.txtDescripcion.Text = dt.Rows[0]["Descr"].ToString();
                    }

                    this.txtNivel1.Text              = dt.Rows[0]["Nivel1"].ToString();
                    this.chkComplementaria.Enabled   = Convert.ToBoolean(dt.Rows[0]["UsaComplementaria"]);
                    this.chkComplementaria.EditValue = null;


                    DataView dvCuentaAnt = new DataView()
                    {
                        Table = _dtCuenta, RowFilter = "Nivel1 = " + dt.Rows[0]["Nivel1"].ToString()
                    };

                    Util.Util.ConfigLookupEdit(this.slkupCuentaAnterior, dvCuentaAnt.ToTable(), "Descr", "IDCuenta");
                    Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaAnterior, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");

                    DataView dvCuentaMayor = new DataView()
                    {
                        Table = _dtCuenta, RowFilter = "EsMayor=1 and Nivel1= " + dt.Rows[0]["Nivel1"].ToString()
                    };

                    Util.Util.ConfigLookupEdit(this.slkupCuentaMayor, dvCuentaMayor.ToTable(), "Descr", "IDCuenta");
                    Util.Util.ConfigLookupEditSetViewColumns(this.slkupCuentaMayor, "[{'ColumnCaption':'Cuenta','ColumnField':'Cuenta','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");

                    this.slkupCuentaMayor.ReadOnly = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }