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);
        }
Ejemplo n.º 3
0
 private void AddHistory(IManDocument iMDoc, imHistEventCommentType imHistEventCommentType)
 {
     iMDoc.HistoryList.Add(imHistEventCommentType.ToString().ToEnum<imHistEvent>().Value, 0, 0, IMConstant.CONST_APP_NAME, imHistEventCommentType.ToEnumAttr<imHistEventCommentType, DescriptionAttribute>().Description, IMConstant.CONST_APP_NAME, "", "", null, null, null);
 }
Ejemplo n.º 4
0
        public void AddHistory(string objID, imHistEventCommentType imHistEventCommentType)
        {
            var iMDoc = _iMUtil.GetDocByObjID(objID);

            AddHistory(iMDoc, imHistEventCommentType);
        }
Ejemplo n.º 5
0
        public void AddHistory(double num, imHistEventCommentType imHistEventCommentType)
        {
            var iMDoc = _iMUtil.GetDocByNum(num);

            AddHistory(iMDoc, imHistEventCommentType);
        }
Ejemplo n.º 6
0
 public void AddHistory(double num, imHistEventCommentType imHistEventCommentType, double startTime)
 {
     KDocUtility.AddHistory(num, imHistEventCommentType, startTime.GetJSDateTimeToLocal());
 }