コード例 #1
0
        private void PopulateGrid()
        {
            DateTime FechaInicial = Convert.ToDateTime(this.dtpFechaInicial.EditValue);
            DateTime FechaFinal   = Convert.ToDateTime(this.dtpFechaFinal.EditValue);

            _dsTipoCambioDetalle = TipoCambioDetalleDAC.GetDetalleTipoCambioByID("*", FechaInicial, FechaFinal);
            if (_dsTipoCambioDetalle.Tables.Count > 0)
            {
                _dtTipoCambioDetalle = _dsTipoCambioDetalle.Tables[0];
            }
            this.grid.DataSource = null;
            this.grid.DataSource = _dtTipoCambioDetalle;
        }
コード例 #2
0
        private void btnAgregar_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                isEdition = true;
                HabilitarControles(true);
                ClearControls();
                this.dtpFecha.EditValue = TipoCambioDetalleDAC.GetNetFechaByIDTipoCambio(this.IDTipoCambio);

                currentRow = null;
            }catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #3
0
        private void CargarTipoCambio()
        {
            if (this.dtHasta.EditValue != null)
            {
                DateTime Fecha = Convert.ToDateTime(this.dtHasta.EditValue);
                if (Fecha.Month + 1 < 13)
                {
                    Fecha = new DateTime(Fecha.Year, Fecha.Month + 1, 1).AddDays(-1);
                }
                else
                {
                    Fecha = new DateTime(Convert.ToInt32(Fecha.Year) + 1, 1, 1).AddDays(-1);
                }

                double TipoCambio = TipoCambioDetalleDAC.GetLastTipoCambioFecha(Fecha);
                this.txtTasaCambio.Text = TipoCambio.ToString();
            }
        }