示例#1
0
        public void getIdST(int idst)
        {
            GatosTransportes_Entity st = new ST_Asignaciones_BOL().verIdGasto(idst);

            txtIdGasto.Text      = st.idGasto.ToString();
            txtIdTransporte.Text = st.idtransporte.ToString();
            txtTotalGastos.Text  = st.gastoTotal.ToString();
        }
示例#2
0
        public void buscarTracyeto(int idst, int idmov)
        {
            txtIdSolicitud.Text  = idst.ToString();
            txtIdMovimiento.Text = idmov.ToString();
            try
            {
                TrayectoST_Entity st = new ST_Asignaciones_BOL().verTrayecto(idst, idmov);

                txtDestino.Text = st.destino;
                txtOrigen.Text  = st.origen;
                txtKms.Text     = st.kms.ToString();
                // dtpFechaRegreso = Convert.ToDateTime(st.fechallegada);
                txtIdTrayecto.Text = st.idTrayecto.ToString();
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
示例#3
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);
            }
        }