Пример #1
0
 public MessageObj copyTo(MessageObj _destination)
 {
     if (_destination != null)
     {
         _destination.Code          = Code;
         _destination.Language      = Language;
         _destination.Message       = Message;
         _destination.Description   = Description;
         _destination.ExtData       = ExtData;
         _destination.IsView        = IsView;
         _destination.IsAdd         = IsAdd;
         _destination.IsEdit        = IsEdit;
         _destination.IsApproval    = IsApproval;
         _destination.IsDelete      = IsDelete;
         _destination.IsPromotion   = IsPromotion;
         _destination.IsViewCoc     = IsViewCoc;
         _destination.IsViewGiaLe   = IsViewGiaLe;
         _destination.IsViewGiaBuon = IsViewGiaBuon;
         _destination.IsViewLaiLe   = IsViewLaiLe;
         _destination.IsViewLaiBuon = IsViewLaiLe;
         _destination.IsAdvance     = IsAdvance;
     }
     else
     {
         _destination = clone();
     }
     return(_destination);
 }
Пример #2
0
        public MessageObj clone()
        {
            var result = new MessageObj
            {
                Code          = Code,
                Language      = Language,
                Message       = Message,
                Description   = Description,
                ExtData       = ExtData,
                IsView        = IsView,
                IsAdd         = IsAdd,
                IsEdit        = IsEdit,
                IsDelete      = IsDelete,
                IsApproval    = IsApproval,
                IsPromotion   = IsPromotion,
                IsViewCoc     = IsViewCoc,
                IsViewGiaBuon = IsViewGiaBuon,
                IsViewGiaLe   = IsViewGiaLe,
                IsViewLaiBuon = IsViewLaiBuon,
                IsViewLaiLe   = IsViewLaiLe,
                IsAdvance     = IsAdvance,
            };

            return(result);
        }
Пример #3
0
        public LogObj()
        {
            Message = new MessageObj();
            LogTime = DateTime.Now;
            State   = LogState.Default;

            var stackTrace = new StackTrace(true);

            CallStack = stackTrace.ToString();

            var stackFrame    = stackTrace.GetFrame(1);
            var currentMethod = stackFrame.GetMethod();

            Location = String.Format("{0}.{1}", currentMethod.ReflectedType.FullName, currentMethod.Name);
        }