Esempio n. 1
0
        public void escribirViaje(SolicitudDeViaje viaje)
        {
            String viajes = lec_archivo.leerViaje();

            try
            {
                StreamWriter sw = new StreamWriter(@"C:\Users\Cristian Betancourt\source\repos\ProyectoAAP\ModulosG4\ModulosG4\Archivos\Viaje.txt");
                sw.WriteLine(viajes);
                sw.WriteLine(viaje.ToString());
                sw.Close();
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }
Esempio n. 2
0
 public void obtenerDatos()
 {
     viaje = new SolicitudDeViaje(txt_ciSolicitante.Text, txt_nombreSolicitante.Text, cb_destino.SelectedText, cb_conductor.SelectedText, dtf_salida.Value.ToString("MM/dd/yyyy"), dth_salida.Value.ToString("hh/mm/ss"), dtf_llegada.Value.ToString("MM/dd/yyyy"), dth_llegada.Value.ToString("hh:mm:ss"), txt_motivo.Text);
 }