예제 #1
0
 private void Grid_SelectionChanged(object sender, EventArgs e)
 {
     if (Grid.SelectedRows.Count > 0)
     {
         this.Ahorro = (DTO.Ahorro)Grid.SelectedRows[0].DataBoundItem;
         RefreshAhorroData();
     }
 }
예제 #2
0
        private void ResetForm()
        {
            ahorroBindingSource.DataSource = DAL.Session.Ahorros.Find().OrderByDescending(p => p.CreaFecha).ToArray();
            foreach (var row in Grid.Rows.OfType <DataGridViewRow>())
            {
                var data = (DTO.Ahorro)row.DataBoundItem;
                if ((data.FechaHasta ?? DateTime.MaxValue) < DateTime.Now)
                {
                    row.DefaultCellStyle.ForeColor = Color.Red;
                }
            }

            cmbTipo.Items.Clear();
            cmbTipo.Items.AddRange(Enum.GetNames(typeof(DTO.Ahorro.TipoAhorros)));

            this.Ahorro = new DTO.Ahorro(DTO.Ahorro.TipoAhorros.PlazoFijo);
            RefreshAhorroData();
        }
예제 #3
0
 private void BNew_Click(object sender, EventArgs e)
 {
     this.Ahorro = new DTO.Ahorro(DTO.Ahorro.TipoAhorros.PlazoFijo);
     RefreshAhorroData();
 }