Ejemplo n.º 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);
            }
        }
Ejemplo n.º 2
0
        public static void AddHistory(string objID, imHistEventCommentType imHistEventCommentType)
        {
            IMDocUtility docUtil = new IMDocUtility();

            docUtil.AddHistory(objID, imHistEventCommentType);
        }