Example #1
0
        public static string ConvertToShortDate(DateTime?date)
        {
            DateTime?ddate   = date;
            string   retdate = null;

            if (date != null)
            {
                ddate = FilterParameter.DateFilter(date.ToString());
            }

            if (ddate != null)
            {
                retdate = String.Format("{0:dd/MM/yyyy}", ddate).Replace(" 00:00:00", "");
            }

            return(retdate);
        }
Example #2
0
        protected static void Save(int errorCode, string errorMessage, string functionCode, _EventDetail eventDetail)
        {
            MyException ex = new MyException();

            ex.FunctionName       = functionCode;
            ex.ErrorCode          = errorCode;
            ex.ExceptionSource    = errorMessage;
            ex.ControllerName     = FilterParameter.ToSafeString(eventDetail.ControllerName);
            ex.MethodName         = FilterParameter.ToSafeString(eventDetail.MethodName);
            ex.OperationIdUserRef = SessionVariable._IdUserRef;
            ex.OperationIP        = SessionVariable._OperationIP;
            ex.OperationIsDeleted = 1;
            ex.MachineName        = SessionVariable._MachineName;
            ex.MachineIp          = SessionVariable._MachineIp;
            ex.ClientBrowser      = SessionVariable._ClientBrowser;

            Derin_Logging.WriteToQueue(Derin_Logging.Type.Exception, SerializeObject(ex));
        }