public RevelationHistoryFrame(Guid managerId) { var history = RevelationMyhistoryMgr.GetById(managerId); if (history == null) { history = new RevelationMyhistoryEntity(managerId, new byte[0], DateTime.Now, DateTime.Now); RevelationMyhistoryMgr.Insert(history); } _historyEntity = history; AnalyseFightMap(); }
/// <summary> /// 保存 /// </summary> /// <returns></returns> public bool Save(DbTransaction trans = null) { if (!isUpdate) { return(true); } var historyString = GenerateFightMapString(); _historyEntity.GoalsString = historyString; _historyEntity.UpdateTime = DateTime.Now; if (!RevelationMyhistoryMgr.Update(_historyEntity, trans)) { return(false); } return(true); }