Ejemplo n.º 1
0
 private void actualizarDetalle(DataGridViewCellEventArgs e)
 {
     DataGridViewRow filaSeleccionada;
     if (dataGridViewListado.Rows.Count == 0) return;
     filaSeleccionada = dataGridViewListado.Rows[e.RowIndex];
     datosListadoActual["id"] = new gdDataBase.ValorTipo(filaSeleccionada.Cells[0].Value, SqlDbType.NVarChar);
     var camposValores = gdDataBase.newParameters();
     camposValores.Add("id", datosListadoActual["id"]);
     camposValores.Add("fecha_inicio", datosListadoActual["fecha_inicio"]);
     camposValores.Add("fecha_fin", datosListadoActual["fecha_fin"]);
     dataGridView1.DataSource = new gdDataBase().ExecAndGetData(mapIndicesDetallesTop5[indiceListadoActual], camposValores);
 }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            dataGridView1.DataSource = null;
            var fecha_inicio = fechaInicial().Date.ToString("yyyy-MM-dd HH:mm:ss.000");
            var fecha_fin = fechaFinal().Date.ToString("yyyy-MM-dd HH:mm:ss.000");
            datosListadoActual["fecha_inicio"] = new gdDataBase.ValorTipo(fecha_inicio, SqlDbType.DateTime);
            datosListadoActual["fecha_fin"] = new gdDataBase.ValorTipo(fecha_fin, SqlDbType.DateTime);
            indiceListadoActual = comboBoxListado.SelectedIndex;
            var nombre_sp = mapIndicesNombresTop5[comboBoxListado.SelectedIndex];
            Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>();
            Dictionary<int, String> errorMensaje = new Dictionary<int, string>();

            camposValores.Add("fecha_inicio", new gdDataBase.ValorTipo(fecha_inicio, SqlDbType.DateTime));
            camposValores.Add("fecha_fin", new gdDataBase.ValorTipo(fecha_fin, SqlDbType.DateTime));
            errorMensaje.Add(2627, "Ingresó una matrícula de aeronave ya registrada. Intente nuevamente...");

            dataGridViewListado.DataSource = new gdDataBase().ExecAndGetData(nombre_sp, camposValores, errorMensaje);

            this.dataGridViewListado_RowEnter(sender, new DataGridViewCellEventArgs(0,0));
        }