Beispiel #1
0
 public bool SetMarkData(DateTime dt, MarkData mkDa)
 {
     try
     {
         var dtMonth = new DateTime(dt.Year, dt.Month, 1);
         var mkf     = new MarkFile(dtMonth);
         if (BFindMarkFile(dtMonth, ref mkf)) //need add to mkf list
         {
             mkf.SetMarkData(dt, mkDa);
             return(true);
         }
     }
     catch (Exception)
     {
         // ignored
     }
     return(false);
 }
Beispiel #2
0
 public bool AddMarkData(DateTime dt, MarkData mkDa, string mkFileRootDir)
 {
     try
     {
         var dtMonth = new DateTime(dt.Year, dt.Month, 1);
         var mkf     = new MarkFile(dtMonth);
         if (!BFindMarkFile(dtMonth, ref mkf)) //need add to mkf list
         {
             var mkFilePath = Path.Combine(mkFileRootDir, SkewkyMark + mkf.GetMarkFileName());
             mkf.FilePath = mkFilePath;
             mkf.SetMarkData(dt, mkDa);
             MarkFiles.Add(mkf);
             return(true);
         }
     }
     catch (Exception)
     {
         // ignored
     }
     return(false);
 }