Beispiel #1
0
        public void WriteLog(string filePath, string NameMethod, int ContactId)
        {
            CheckPointInfo info = new CheckPointInfo();

            info.Time            = DateTime.Now;
            info.ContactId       = ContactId;
            info.ParentCheckName = NameMethod;
            info.UserId          = UserContext.GetCurrentUser().UserID;
            //info.RunTime = RunTime;
            WriteFileLogCheckPoint(info, filePath);
        }
Beispiel #2
0
 public void WriteFileLogCheckPoint(CheckPointInfo dtData, string filePath)
 {
     try
     {
         StreamWriter swExtLogFile = new StreamWriter(filePath, true);
         //swExtLogFile.Write(Environment.NewLine);
         swExtLogFile.WriteLine(dtData.Time.ToString("dd/MM/yyyy HH:mm:ss:fff") + "  " + dtData.ContactId.ToString() + " " + dtData.ParentCheckName.ToString() + " " + dtData.UserId);
         swExtLogFile.Flush();
         swExtLogFile.Close();
     }
     catch (Exception ex)
     {
     }
 }