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); }
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); }