示例#1
0
        /// <summary>
        /// Guarda el error y los parametros de este.
        /// </summary>
        /// <param name="p_messageError"></param>
        /// <param name="p_Exception"></param>
        private void SaveErrorInTrace(string p_messageError, Exception p_Exception)
        {
            var buffer = DateFormat.buffer;

            new DateFormat().GetCompleteDate(DateTime.UtcNow, out buffer);

            #region Get Stack Error

            MethodBase site       = p_Exception.TargetSite;
            string     methodName = site == null ? null : site.Name;
            var        trace      = new StackTrace(p_Exception, true);

            #endregion

            var m_trace = new dx_trace()
            {
                dx_messageexception = p_messageError,
                dx_name             = buffer.ToString(),
                dx_tracetext        = trace.ToString(),
                dx_traceparameter   = Diagnostic.ExceptionParameter(),
                dx_traceconfigid    = new EntityReference(s_TraceConfig, this.g_TraceConfigId),
                dx_messageinfo      = sb_info.ToString(),
            };

            OrgContext.AddObject(m_trace);
            OrgContext.SaveChanges();
        }
示例#2
0
        private void SaveErrorInTrace(string p_messageError)
        {
            var buffer = DateFormat.buffer;

            new DateFormat().GetCompleteDate(DateTime.UtcNow, out buffer);

            var m_trace = new dx_trace()
            {
                dx_name             = buffer.ToString(),
                dx_messageexception = p_messageError,
                dx_traceconfigid    = new EntityReference(s_TraceConfig, this.g_TraceConfigId),
            };

            OrgContext.AddObject(m_trace);
            OrgContext.SaveChanges();
        }
示例#3
0
        private void SaveInfoInTrace(string p_messageInfo, string p_completeError)
        {
            var buffer = DateFormat.buffer;

            new DateFormat().GetCompleteDate(DateTime.UtcNow, out buffer);


            var m_trace = new dx_trace()
            {
                dx_messageinfo    = p_messageInfo,
                dx_name           = buffer.ToString(),
                dx_tracetext      = p_completeError,
                dx_traceparameter = Diagnostic.ExceptionParameter(),
                dx_traceconfigid  = new EntityReference(s_TraceConfig, this.g_TraceConfigId)
            };


            OrgContext.AddObject(m_trace);
            OrgContext.SaveChanges();
        }
示例#4
0
 public OrgController(OrgContext context)
 {
     this.context = context;
 }
示例#5
0
 public MemberStateLogController(OrgContext context)
 {
     _context = context;
 }
示例#6
0
 public OrderRepository(OrgContext context)
 {
     this.context = context;
 }
示例#7
0
 public BranchRanksController(OrgContext context)
 {
     _context = context;
 }
示例#8
0
 public EntityUnitOfWork(string name)
 {
     context = new OrgContext(name);
 }
示例#9
0
 public CommitteeController(OrgContext context)
 {
     _context = context;
 }
示例#10
0
 public MemberItemLogController(OrgContext context)
 {
     _context = context;
 }
示例#11
0
 public PageInvalidatedEventArgs(OrgContext db)
 {
     _db = db;
 }
示例#12
0
 public EmployeeService()
 {
     context = new OrgContext("MyService");
 }
示例#13
0
        public static List <ProxyEmployee> ConvertToProxyEmployee(List <new_employee> emps, OrgContext context)
        {
            List <ProxyEmployee> list = new List <ProxyEmployee>();

            foreach (var emp in emps)
            {
                ProxyEmployee p = new ProxyEmployee();
                p.BirthDate = emp.new_birthdate;
                p.Name      = emp.new_name;
                p.ID        = emp.Id;
                list.Add(p);
            }
            return(list);
        }
示例#14
0
 public ClientRepository(OrgContext context)
 {
     this.context = context;
 }
示例#15
0
 public EmplController()
 {
     db = new OrgContext();
 }
示例#16
0
 public PaymentRepository(OrgContext context)
 {
     this.context = context;
 }