示例#1
0
        private IChofer obtenerChofer()
        {
            IChofer chof = ChoferFactory.GetChofer();

            chof.ChoferID = Utiles.Validaciones.obtieneEntero(busqChofer.ChoferID);
            chof.Consultar();
            return(chof);
        }
示例#2
0
 private void Editar()
 {
     try
     {
         IChofer chofer = ChoferFactory.GetChofer();
         chofer.ChoferID = Utiles.Validaciones.obtieneEntero(txtChoferID.Text);
         chofer.Consultar();                //traigo los datos del chofer elegido
         //y los muestro
         txtLegajo.Text = chofer.LegajoSITT;
         int index = chofer.Nombre.IndexOf(",", 0, chofer.Nombre.Length);
         txtNombre.Text   = (chofer.Nombre.Substring(index + 1, chofer.Nombre.Length - index - 1)).Trim();
         txtApellido.Text = chofer.Apellido;
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }