Ejemplo n.º 1
0
        private void frmBalanceGeneral_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.MaximizeBox     = false;
            this.StartPosition   = FormStartPosition.CenterScreen;

            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(fechatemp.Year + 1, 1, 1).AddDays(-1);
            }


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

            Util.Util.ConfigLookupEdit(this.slkupCentroCostoDesde, _dtCentroCosto, "Descr", "IDCentro");
            Util.Util.ConfigLookupEditSetViewColumns(this.slkupCentroCostoDesde, "[{'ColumnCaption':'Centro','ColumnField':'Centro','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");
            //this.chkTotalizarporSecciones.Checked = true;
            this.chkCalcularUtilidad.Checked = true;
        }
Ejemplo n.º 2
0
        private void FrmConsultaSaldoCuenta_Load(object sender, EventArgs e)
        {
            try
            {
                DateTime fechatemp = DateTime.Today;

                this.dtDesde.EditValue = new DateTime(fechatemp.Year, fechatemp.Month, 1);
                if (fechatemp.Month + 1 < 13)
                {
                    this.dtHasta.EditValue = new DateTime(fechatemp.Year, fechatemp.Month + 1, 1).AddDays(-1);
                }
                else
                {
                    this.dtHasta.EditValue = new DateTime(Convert.ToInt32(fechatemp.Year) + 1, 1, 1).AddDays(-1);
                }



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

                Util.Util.ConfigLookupEdit(this.slkupCentroCosto, _dtCentroCosto, "Descr", "IDCentro");
                Util.Util.ConfigLookupEditSetViewColumns(this.slkupCentroCosto, "[{'ColumnCaption':'Centro','ColumnField':'Centro','width':30},{'ColumnCaption':'Descripcion','ColumnField':'Descr','width':70}]");
                this.slkupCentroCosto.Properties.ShowClearButton = true;
                this.slkupCentroCosto.Properties.PopupFormSize   = new Size(400, 300);
                this.slkupCentroCosto.Properties.BestFitMode     = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
            }
            catch (Exception ex) {
                MessageBox.Show("Han ocurrido los siguientes errores : " + ex.Message);
            }
        }
Ejemplo n.º 3
0
        private void PopulateGrid()
        {
            _dsCentro = CentroCostoDAC.GetData(-1, "*", "*", "*", "*", -1);

            _dtCentro           = _dsCentro.Tables[0];
            this.dtg.DataSource = null;
            this.dtg.DataSource = _dtCentro;

            PopulateData();
        }
Ejemplo n.º 4
0
        void frmPopPupCentroCosto_Load(object sender, EventArgs e)
        {
            _dtCentros = CentroCostoDAC.GetData(-1, "*", "*", "*", "*", -1).Tables[0];
            // _dtCuentasConstante = _dtCuentas.Clone();

            this.gridCentroCosto.DataSource = _dtCentros;
            if (sCostosSelected != "")
            {
                CheckElements();
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 6
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);
            }
        }
Ejemplo n.º 7
0
 private void PopulateData()
 {
     _lstCentroAcumuladores = CentroCostoDAC.GetData(-1, "*", "*", "*", "*", 1).Tables["Data"];
     Util.Util.ConfigLookupEdit(this.slkupCentroAcumulador, _lstCentroAcumuladores, "Descr", "IDCentro");
     Util.Util.ConfigLookupEditSetViewColumns(this.slkupCentroAcumulador, "[{'ColumnCaption':'Centro','ColumnField':'Centro','width':30},{'ColumnCaption':'Descripción','ColumnField':'Descr','width':70}]");
 }