예제 #1
0
        private void dgv_mostrar_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int bandera = 1;

            if (btn_Aceptar.Enabled == false)
            {
                txt_existencia.Text         = Convert.ToString(dgv_mostrar.Rows[e.RowIndex].Cells[1].Value.ToString());
                txt_codigoEnvio.Enabled     = true;
                Txt_DirInicial.Enabled      = true;
                txt_inicioTraslado.Enabled  = true;
                cmb_sedeDestino.Enabled     = true;
                cmb_Placa.Enabled           = true;
                cmb_direccionFinal.Enabled  = true;
                btn_Actualizar.Enabled      = false;
                cmb_sedeDestino.DataSource  = CapaDatos_TrasladoProductos.llenarCombobox();
                cmb_sedeDestino.ValueMember = "PK_id_Sede";

                cmb_direccionFinal.DataSource  = CapaDatos_TrasladoProductos.llenarDirFinal();
                cmb_direccionFinal.ValueMember = "PK_correlativo_Destino";
                cmb_Placa.DataSource           = CapaDatos_TrasladoProductos.llenarPlaca();
                cmb_Placa.ValueMember          = "PK_id_Vehiculos";
            }
            else
            {
                txt_codigoEnvio.Text    = Convert.ToString(dgv_mostrar.Rows[e.RowIndex].Cells[0].Value.ToString());
                txt_inicioTraslado.Text = Convert.ToString(dgv_mostrar.Rows[e.RowIndex].Cells[1].Value.ToString());
                Txt_DirInicial.Text     = Convert.ToString(dgv_mostrar.Rows[e.RowIndex].Cells[2].Value.ToString());
                cmb_sedeDestino.Text    = Convert.ToString(dgv_mostrar.Rows[e.RowIndex].Cells[3].Value.ToString());
                cmb_direccionFinal.Text = Convert.ToString(dgv_mostrar.Rows[e.RowIndex].Cells[4].Value.ToString());
                cmb_Placa.Text          = Convert.ToString(dgv_mostrar.Rows[e.RowIndex].Cells[5].Value.ToString());
                //txt_codigoEnvio.Enabled = false;

                this.btn_continuar.Enabled = false;
                //btn_Guardar.Enabled = true;
                //dgv_mostrar.DataSource = CapaDatos_TrasladoProductos.llenarDirFinal();
            }
        }
예제 #2
0
 private void cmb_Placa_SelectedIndexChanged(object sender, EventArgs e)
 {
     dgv_mostrar.DataSource = CapaDatos_TrasladoProductos.llenarPlaca();
 }