Example #1
0
 public ArrangedVouchCodeList(UserContext context, ParameterMonitoring PM)
     : base(context)
 {
     InitializeComponent();
     Page        = new Paging();
     this.PMonit = PM;
 }
            /// <summary>
            /// Constructor
            /// </summary>
            public GetMonitoringsResponse(TipoParametroMedico tipo)
            {
                IdParameterType = tipo.Id;
                Name            = tipo.Nombre;
                Parameters      = new List <ParameterMonitoring>();

                foreach (var param in tipo.ParametroMedico)
                {
                    ParameterMonitoring newParameterMonitoring = new ParameterMonitoring()
                    {
                        IdParameter = param.Id,
                        Name        = param.Nombre
                    };

                    Parameters.Add(newParameterMonitoring);
                }
            }
Example #3
0
        /// <summary>
        /// Make a call to Monitoring Service with the information of exception
        /// </summary>
        /// <param name="exception">Catched exception</param>
        /// <returns>ticketNumber</returns>
        public static void CatchExceptionInMonitoringService(Exception exception)
        {
            //instance the client
            MonitoringServiceClient monitoringClient = new MonitoringServiceClient();
            try
            {
                //Set the parameters for monitoring service
                ParameterMonitoring parameters = new ParameterMonitoring
                                                     {
                                                         Application = "VestalisV3",
                                                         Category = EnumCategory.Server,
                                                         MessageException =
                                                             exception.InnerException == null
                                                                 ? exception.Message
                                                                 : String.Format(
                                                                     "Exception message :{0} " + Environment.NewLine +
                                                                     " InnerException message:{1}", exception.Message,
                                                                     exception.InnerException.Message),
                                                         StackTrace =
                                                             exception.InnerException == null
                                                                 ? exception.StackTrace
                                                                 : String.Format(
                                                                     "StackTrace exception: {0} " + Environment.NewLine +
                                                                     " StackTrace inner exception: {1}",
                                                                     exception.StackTrace,
                                                                     exception.InnerException.StackTrace),
                                                         Type = EnumTicketType.Bug,
                                                         UserModule = "VestalisV3",
                                                         UserName = "******"
                                                     };

                //save the exception information and get the ticket number
                monitoringClient.SaveSupportTicket(parameters);
            }
            finally
            {
                if (monitoringClient != null)
                {

                    ((IDisposable)monitoringClient).Dispose();

                }

            }
        }