Beispiel #1
0
 partial void Deletefwk_ServiceAudit(fwk_ServiceAudit instance);
Beispiel #2
0
        /// <summary>
        /// Almacena informacion de auditoria.- 
        /// Llama a StaticLogger y carga el log auditando los datos del Request de entrada
        /// </summary>
        /// <param name="pRequest">Request</param>
        /// <param name="wResult">Response</param>
        internal static void LogSuccessfulExecution(IServiceContract pRequest, IServiceContract wResult)
        {
            fwk_ServiceAudit audit = new fwk_ServiceAudit();

            audit.LogTime = System.DateTime.Now;
            audit.ServiceName = pRequest.ServiceName;
            audit.Send_Time = pRequest.ContextInformation.HostTime;
            if(Fwk.HelperFunctions.DateFunctions.IsSqlDateTimeOutOverflow(wResult.ContextInformation.HostTime)==false)
                audit.Resived_Time = wResult.ContextInformation.HostTime;
            else
            {
                audit.Resived_Time = wResult.ContextInformation.HostTime = DateTime.Now;
                
            }
            
            audit.Send_UserId = pRequest.ContextInformation.UserId;
            audit.Send_Machine = pRequest.ContextInformation.HostName;

            audit.Dispatcher_Instance_Name = FacadeHelper.ServiceDispatcherConfig.InstanseName;
            audit.ApplicationId = pRequest.ContextInformation.AppId;

            audit.Requets = TypeFunctions.ConvertStringToByteArray(pRequest.GetXml());
            audit.Response = TypeFunctions.ConvertStringToByteArray(wResult.GetXml());

           

            try
            {
                using (FwkDatacontext context = new FwkDatacontext(System.Configuration.ConfigurationManager.ConnectionStrings[ConfigurationsHelper.ServiceDispatcherConnection].ConnectionString))
                {
                    context.fwk_ServiceAudits.InsertOnSubmit(audit);
                    context.SubmitChanges();
                }
    

            }
            catch(Exception)
            {
                
                LogSuccessfulExecution_Old(pRequest, wResult);
            }
            

        }
Beispiel #3
0
 partial void Updatefwk_ServiceAudit(fwk_ServiceAudit instance);
Beispiel #4
0
 partial void Insertfwk_ServiceAudit(fwk_ServiceAudit instance);
Beispiel #5
0
 partial void Deletefwk_ServiceAudit(fwk_ServiceAudit instance);
Beispiel #6
0
 partial void Updatefwk_ServiceAudit(fwk_ServiceAudit instance);
Beispiel #7
0
 partial void Insertfwk_ServiceAudit(fwk_ServiceAudit instance);