private void FrmABMRecorridoModificarSeleccionado_Load(object sender, EventArgs e)
        {
            //string SLCT = "SELECT tram_codigo as Codigo, P1." + Puerto.ciudad + " as Origen, P2." + Puerto.ciudad + " as Destino," + Tramo.precio + " as Precio";
            //SLCT += " FROM " + Tramo.tabla + " join [GD1C2019].[FIDEOS_CON_TUCO].[Tramos_por_recorrido] on (tram_por_reco_tramo=" + Tramo.codigo + ")";
            //SLCT += " join " + Puerto.tabla + " as P1 on (P1." + Puerto.codigo + "=" + Tramo.origen + ")";
            //SLCT += " join " + Puerto.tabla + " as P2 on (P2." + Puerto.codigo + "=" + Tramo.destino + ")";
            //SLCT += " WHERE tram_por_reco_recorrido= @ID";
            //misTramos = Coneccion.ejecutarSelect(SLCT, "@ID", ID);
            misTramos = abm.mostrarTramosDeUnRecorrido(ID);
            dataGridView1.DataSource = misTramos;

            dataGridView1.Enabled = false;
            nuevosTramos          = abm.mostrarTramosExistentes();
        }
Esempio n. 2
0
        private void frmAltaRecorrido_Load(object sender, EventArgs e)
        {
            this.CenterToScreen();
            Recorrido abm = new Recorrido();

            dt = abm.mostrarTramosExistentes();
            dataGridView1.DataSource = dt;
            if (dataGridView1.Rows.Count == 0)
            {
                this.Close();
            }
            precio = 0;
        }
Esempio n. 3
0
 private void NuevoTramo_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.Enabled = true;
     if (tramo.origen != "" && tramo.destino != "" && tramo.precio != 0)
     {
         Recorrido abm = new Recorrido();
         dt = abm.mostrarTramosExistentes();
         dataGridView1.DataSource = dt;
         listBox1.Items.Add(tramo.origen + "-" + tramo.destino); //DIZ NUTTZ
         listaTramos.Add(tramo);                                 //Tendria que chequar que no esten vacios los valores.
         filtroElProceso         = true;
         txtBoxFiltroOrigen.Text = tramo.destino;
         precio        += tramo.precio;
         lblPrecio.Text = "Precio:" + precio;
     }
 }