예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ModificarRecorrido modRec = new ModificarRecorrido(codRecorrido, nroTramo.ToString(), puertoDesdeID, puertoHastaID, precioBase, contAct, rolSeleccionado);

            modRec.Visible = true;
            this.Dispose(false);
        }
예제 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            try
            {
                foreach (DataGridViewRow row in listaRecorrido.SelectedRows)
                {
                    recID       = row.Cells[0].Value.ToString();
                    ordenTramos = row.Cells[1].Value.ToString();
                    puertoD     = row.Cells[2].Value.ToString();
                    puertoH     = row.Cells[3].Value.ToString();
                    precioBase  = row.Cells[4].Value.ToString();
                    estado      = row.Cells[5].Value.ToString();

                    if (estado == "I")
                    {
                        MessageBox.Show("El recorrido esta inhabilitado");
                        DarAlta darAlta = new DarAlta(rolSelecionado, recID);
                        darAlta.Visible = true;
                        this.Dispose(false);
                    }
                    else
                    {
                        ModificarRecorrido modificarRecorrido = new ModificarRecorrido(recID, ordenTramos, puertoD, puertoH, precioBase, 1, rolSelecionado);
                        modificarRecorrido.Visible = true;
                        this.Dispose(false);
                    }
                }
            }
            catch (NullReferenceException)
            {
                MessageBox.Show("Por favor seleccione alguna fila válida", "Ok");
            }
        }