예제 #1
0
 public static ESTACIONAMIENTO_VISITA buscarIdEstacionamiento(long estacionamiento)
 {
     using (EasyLifeEntities dbc = new EasyLifeEntities())
     {
         ESTACIONAMIENTO_VISITA aux = (from u in dbc.ESTACIONAMIENTO_VISITA
                                       where u.ID_ESTACIONAMIENTO == estacionamiento
                                       select u).FirstOrDefault();
         if (aux != null)
         {
             return(aux);
         }
         else
         {
             return(null);
         }
     }
 }
예제 #2
0
        public void cargarParametros(string estacionamiento)
        {
            ESTACIONAMIENTO_VISITA aux           = Controller.ControllerEstacionamientoVisita.buscarIdEstacionamiento(Convert.ToInt64(estacionamiento));
            DEPARTAMENTO           dep           = Controller.ControllerDepartamento.buscarDepartamento(aux.NUM_DEP, aux.EDIFICIO);
            List <DEPARTAMENTO>    listaEdificio = Controller.ControllerDepartamento.listaDepartamentoOcupado(aux.EDIFICIO);

            dplDepartamento.DataSource     = listaEdificio;
            dplDepartamento.DataValueField = "ID_DEPARTAMENTO";
            dplDepartamento.DataTextField  = "NUMERO_DEP";
            dplDepartamento.DataBind();
            dplEdificio.SelectedValue     = aux.EDIFICIO.ToString();
            dplDepartamento.SelectedValue = dep.ID_DEPARTAMENTO.ToString();
            txtPatente.Text = aux.PATENTE;

            string horaE = aux.HORA_ENTRADA.Substring(11, 5);

            txtHoraEntrada.Text       = horaE;
            btnRegistroEst.Visible    = false;
            btnRegistroSalida.Visible = true;
        }