示例#1
0
        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();
        }
示例#2
0
        /// <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);
        }