/// <summary> /// 新增計數器 /// </summary> /// <param name="count"></param> /// <returns></returns> public CountVO CreateCount(CountVO count) { return FTISDao.CreateCount(count); }
/// <summary> /// 更新計數器 /// </summary> /// <param name="count"></param> /// <returns></returns> public CountVO UpdateCount(CountVO count) { return FTISDao.UpdateCount(count); }
public void AddCount(string barId) { IDictionary<string, string> conditions = new Dictionary<string, string>(); conditions.Add("BarId", barId); CountVO count = m_FTISService.GetTodayCount(barId); if (count == null) { count = new CountVO() { BarId = int.Parse(barId), Hits = 1, CountDate = DateTime.Today }; m_FTISService.CreateCount(count); } else { count.Hits += 1; m_FTISService.UpdateCount(count); } }