Пример #1
0
        public static DetallesViaje getDetalles(DataRow dr)
        {
            DetallesViaje detalles = new DetallesViaje()
            {
                NotificacionId = EntidadBase.IsLong(dr, "NotificacionId"),
                DestinoId      = EntidadBase.IsLong(dr, "DestinoId"),
                PaisId         = EntidadBase.IsLong(dr, "PaisId"),
                País           = EntidadBase.IsString(dr, "PaisNombre"),
                FechaInicio    = EntidadBase.IsString(dr, "FechaInicio"),
                FechaFin       = EntidadBase.IsString(dr, "FechaFin")
            };
            long destino = detalles.DestinoId;

            detalles.Key = CryptoUtils.EncryptMD5(destino.ToString());
            return(detalles);
        }
Пример #2
0
        public ResponseWs <List <DetallesViaje> > DetallesNotificacion(string sesion)
        {
            ResponseWs <List <DetallesViaje> > responseW = new ResponseWs <List <DetallesViaje> >();
            SessionAfiliado sessionAfiliado = HelperSession.SA_GetSession(sesion);

            if (sessionAfiliado != null)
            {
                responseW.CodError  = 0;
                responseW.Resultado = "OK";
                responseW.Data      = new List <DetallesViaje>();
                foreach (DataRow row in HelperNotificacionIBP.DestinoByNotificacion(sessionAfiliado.AF_Id).Tables[0].Rows)
                {
                    responseW.Data.Add(DetallesViaje.getDetalles(row));
                }
            }
            else
            {
                responseW.CodError  = 1;
                responseW.Resultado = "FAIL";
            }
            return(responseW);
        }