Example #1
0
        public static void AddHistory(double num, imHistEventCommentType imHistEventCommentType, DateTime? startTime = null)
        {
            IMDocUtility docUtil = new IMDocUtility();

            docUtil.AddHistory(num, imHistEventCommentType);

            if(imHistEventCommentType == IMModel.imHistEventCommentType.imHistoryExport)
            {
                startTime = startTime ?? DateTime.Now;

                var engNum = docUtil.GetAttribute(num, imProfileAttributeIDType.imProfileCustom2);
                var wsFile = GetDoc(num);

                KWSLogDownloadFile kWSLogDownloadFile = new KWSLogDownloadFile
                {
                    FileName = wsFile.Name,
                    Size = wsFile.Size,
                    TimeInSec = startTime.Value.ToTimeElapsedInSec()
                };

                KWSLog kWSLog = new KWSLog
                {
                    EngNum = engNum.Item2,
                    KWSLogType = KWSLogType.DownloadFile,
                    FileNum = num,
                    Info = KSerDSer.JSerialize<KWSLogDownloadFile>(kWSLogDownloadFile),
                };

                KRepKWSLog.KWSLog(kWSLog);
            }
        }
Example #2
0
 internal IMFldrUtility(IMUtility iMUtility)
 {
     _iMUtil = iMUtility;
     _iMDocUtil = new IMDocUtility(_iMUtil);
 }
Example #3
0
        public static bool IsAValidUser(double num)
        {
            IMDocUtility iMDocUtility = new IMDocUtility();
            var engNum = iMDocUtility.GetAttribute(num, imProfileAttributeIDType.imProfileCustom2);

            return KWSUtility.IsAValidUser(engNum.Item2);
        }
Example #4
0
        public static List<WsFileHistory> GetHistory(string objID)
        {
            IMDocUtility docUtil = new IMDocUtility();

            return docUtil.GetHistory(objID);
        }
Example #5
0
        public static List<WsFileHistory> GetHistory(double num)
        {
            IMDocUtility docUtil = new IMDocUtility();

            return docUtil.GetHistory(num);
        }
Example #6
0
        public static WsFile GetDoc(double num, bool detail = false, bool isAdmin = false)
        {
            IMDocUtility docUtil = new IMDocUtility(isAdmin);

            return docUtil.GetDoc(num, detail);
        }
Example #7
0
        public static WsFile GetDoc(string objID)
        {
            IMDocUtility docUtil = new IMDocUtility();

            return docUtil.GetDoc(objID);
        }
Example #8
0
        public static Tuple<string, string> GetAttribute(string objID, imProfileAttributeIDType imProfileAttributeIDType)
        {
            IMDocUtility docUtil = new IMDocUtility();

            return docUtil.GetAttribute(objID, imProfileAttributeIDType);
        }
Example #9
0
        public static void AddHistory(string objID, imHistEventCommentType imHistEventCommentType)
        {
            IMDocUtility docUtil = new IMDocUtility();

            docUtil.AddHistory(objID, imHistEventCommentType);
        }