Exemplo n.º 1
0
 public void cargaDatosST(int codigo, int mov)
 {
     try
     {
         SolicitudTransporte_Entity st = new SolicitudTransporte_BOL().verUnoST(codigo, mov);
         lblEstado.Text           = st.NombreEstado;
         txtIdSolicitud.Text      = st.idSolicitud.ToString();
         txtIdMovimiento.Text     = st.idMovimiento.ToString();
         lblFechaCreacion.Text    = st.FechaSolicitud.ToString();
         lblFechaSalida.Text      = st.FechaRegreso.ToString();
         cmbEstados.SelectedValue = st.idEstado;
         lblNotas.Text            = st.Notas.ToString();
         if (st.idVehiculo > 0)
         {
             lblAvisoFlota.Text = "Vehiculo Asignado";
         }
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message);
     }
 }
Exemplo n.º 2
0
        public void cargaDatosST(int codigo, int mov)
        {
            //Codigo para realizar la verificacion de Transporte
            try
            {
                SolicitudTransporte_Entity st = new SolicitudTransporte_BOL().verUnoST(codigo, mov);
                lblAvisoVehiculo.Text = st.idVehiculo.ToString();
                if (lblAvisoVehiculo.Text == "" || lblAvisoVehiculo.Text == "0")
                {
                    lblAvisoVehiculo.Text   = "0";
                    lblMensajeVehiculo.Text = "No se ha asingado ningun vehiculo";
                    txtPlaca.Clear();
                    txtTipoVehiculo.Clear();
                    txtKMS.Clear();
                }
                else
                {
                    txtIdVehiculo.Text      = st.idVehiculo.ToString();
                    lblMensajeVehiculo.Text = "La solicitud ya tiene asignado el vehiculo";

                    vehiculo_Entity eVehiculo = new Vehiculo_BO().verUno(st.idVehiculo);
                    txtPlaca.Text        = eVehiculo._placa;
                    txtTipoVehiculo.Text = eVehiculo._nombretipov;
                    txtKMS.Text          = eVehiculo._kms.ToString();
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }

            //Codigo para realizar la verificacion de asingacion de Tranpsortistas

            try
            {
                Transportistas_ST_Entity st = new ST_Asignaciones_BOL().verEmpleadoAsignado(codigo);

                lblAvisoPersonal.Text = st.codigoEmpleado.ToString();
                //lblAvisoVehiculo.Text = st.idVehiculo.ToString();
                if (lblAvisoPersonal.Text == "" || lblAvisoPersonal.Text == "0")
                {
                    //lblAvisoVehiculo.Text = "0";
                    lblMensajePersonal.Text = "No se ha asingado ningun empleado";
                    txtCodigoEmpleado.Clear();
                    txtNombreEmplead.Clear();
                    txtLicencia.Clear();
                }
                else
                {
                    txtCodigoEmpleado.Text = st.codigoEmpleado.ToString();

                    lblMensajePersonal.Text = "La solicitud ya tiene asignado un empleado";

                    //vehiculo_Entity eVehiculo = new Vehiculo_BO().verUno(st.idVehiculo);
                    Transportistas_ST_Entity eEmpleado = new ST_Asignaciones_BOL().verEmpleadoAsignado(codigo);
                    txtCodigoEmpleado.Text = st.codigoEmpleado.ToString();
                    txtNombreEmplead.Text  = st.nombreEmpleado.ToString();
                    txtLicencia.Text       = st.licenciaEmpleado.ToString();
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }