コード例 #1
0
        public void Audit(AuditEvent auditEvent)
        {
            decimal sessionID   = Convert.ToDecimal(Nucleo.Common.Security.SecurityManager.CurrentUser.NucleoIdentity.SessionId);//(decimal)(Nucleo.Shared.DataHolder.GetValue(ClaimNames.SessionID.ToString()) ?? -1m);
            decimal fichaID     = (decimal)(Nucleo.Shared.DataHolder.GetValue(ClaimNames.FichaID.ToString()) ?? -1m);
            decimal episodioID  = (decimal)(Nucleo.Shared.DataHolder.GetValue(ClaimNames.EpisodioID.ToString()) ?? -1m);
            decimal encuentroID = (decimal)(Nucleo.Shared.DataHolder.GetValue(ClaimNames.EncuentroID.ToString()) ?? -1m);


            if (auditEvent.Context.ContainsKey(ClaimEventType.ModuleUsageStartAuditing.ToString()))
            {
                if (auditEvent.EventText.Contains("Container"))
                {
                    return;
                }

                if (auditEvent.EventText.Contains("ReportViewer"))
                {
                    return;
                }

                var client = new WsauditoriagestionWebClient();

                using (ServiceChannel.AsDisposable(client))
                {
                    var res = client.fcespIniciaAuditoriaAsync(auditEvent.EventText, sessionID, fichaID, episodioID, encuentroID);
                }
            }
        }
コード例 #2
0
        public decimal GetIndicadoresCRM(decimal usuario, DateTime fechaInicio, DateTime fechaFin)
        {
            decimal ppnId = usuario;

            decimal crm = 0;

            using (Tracer t = new Tracer())
            {
                t.TraceVerbose("llamada a GetCabecerasMensaje ppnId: [{0}]", ppnId);

                try
                {
                    var cliente = new WsIntegracionCRM.AL_INTEGRACION_NUCLEO_PortTypeClient();

                    using (ServiceChannel.AsDisposable(cliente))
                    {
                        WsIntegracionCRM.AL_CONS_REQXMED_RESUMEN_CREQType ppnIdResumen = new WsIntegracionCRM.AL_CONS_REQXMED_RESUMEN_CREQType()
                        {
                            AL_CONS_REQXMED_RESUMEN_PREQ = new WsIntegracionCRM.AL_CONS_REQXMED_RESUMEN_PREQ_TypeShape()
                            {
                                AL_PPN_PROF_WKI = new WsIntegracionCRM.AL_PPN_PROF_WKIMsgDataRecord_TypeShape()
                                {
                                    AL_PPN_PROF = ppnId.ToString()
                                }
                            }
                        };

                        var result = cliente.AL_CONS_REQXMED_RESUMEN(ppnIdResumen);

                        if (result != null && result.Any(m => m != null && m.AL_REQCDRES_WKI != null))
                        {
                            crm = result.Where(m => m != null &&
                                               m.AL_REQCDRES_WKI != null &&
                                               Convert.ToDateTime(m.AL_REQCDRES_WKI.ROW_ADDED_DTTM).Date >= fechaInicio.Date &&
                                               fechaFin.Date >= Convert.ToDateTime(m.AL_REQCDRES_WKI.ROW_ADDED_DTTM).Date)
                                  .Count();
                        }
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error = " + ex.Message);
                    t.TraceError("Error = " + ex.Message);
                }
            }

            return(crm);
        }
コード例 #3
0
        public IEnumerable <ValorVariable> GetValoresVariablesIncidenciaModulo(decimal idIncidenciaModulo)
        {
            using (Tracer t = new Tracer())
            {
                t.TraceVerbose("llamada a GetModuloHistorico idPlantilla: [{0}] ", idIncidenciaModulo);

                try
                {
                    var cliente = new WsincidenciamoduloWebClient();

                    using (ServiceChannel.AsDisposable(cliente))
                    {
                        var result = cliente.evpspVarIncModSel(idIncidenciaModulo);

                        if (result.poFcenuCodret != 0)
                        {
                            throw new ArgumentException(String.Format("Error en BD. Codigo de error: {0}. Descripcion de error: {1}", result.poFcenuCodret, result.poFcevaDesret));
                        }

                        if (result.variableIncidenciaModulo != null && result.variableIncidenciaModulo.Any())
                        {
                            return(result.variableIncidenciaModulo.Select(v => new ValorVariable()
                            {
                                Id = v.id,
                                IdVariable = v.idVariable,
                                IdAgrupador = v.idAgrupador,
                                IdModuloIncidencia = idIncidenciaModulo,
                                Valor = v.valor,
                                Fila = v.fila,
                                Columna = v.columna,
                                JustificacionImposibilidad = v.justificacion
                            }));
                        }
                    }
                }
                catch (Exception ex)
                {
                    String error = ex.Message;
                    Console.WriteLine("Error = " + error);
                    t.TraceError("Error = " + error);
                }
            }

            return(Enumerable.Empty <ValorVariable>());
        }
コード例 #4
0
        public void ConectividadTest()
        {
            var cliente = new wsResultadosLab.WsgestionresultadoslabWebClient();

            using (ServiceChannel.AsDisposable(cliente))
            {
                var result = cliente.rlbspRecuperaConceptos();

                var categorias = new List <Item>();
                foreach (var item in result.listadoconceptos.Enum())
                {
                    categorias.Add(
                        new Item
                    {
                        Id    = item.idAnalito,
                        Valor = item.descripcionAnalito
                    });
                }

                Assert.IsNotNull(categorias);
            }
        }