public Recent(Jid jid, RecentType type) { _jid = jid; _recentType = type; _dateTime = System.DateTime.Now; Build(); }
public Recent(IDataRecord reader) { _dateTime = DateTime.FromBinary((Int64) reader["DateTime"]); _recentType = (RecentType) Enum.Parse(typeof (RecentType), (string) reader["Type"]); _jid = new Jid((string) reader["Jid"]); Build(); }
/// <summary> /// 清空历史记录 /// </summary> /// <param name="customerId"></param> /// <param name="recent">全部,诊所,医生</param> /// <returns></returns> public async Task DeleteRecentListAsync(int customerId, RecentType recent) { var data = await GetDataAsync <FollowListDataModel>(_getUrl + customerId.ToString()); if (recent == RecentType.All) { data.RecentDoctorIds = null; data.RecentStationIds = null; } if (recent == RecentType.Doctor) { data.RecentDoctorIds = null; } if (recent == RecentType.Station) { data.RecentStationIds = null; } await PostDataAsync(_postUrl, data); }
public static void AddItem(int userId, string text, int record, RecentType type, RecentMode mode) { DatabaseConnection.DoCommand(string.Format("INSERT INTO RECENT (USERID, RECID, TYPE, TEXT) VALUES({0}, {1}, {2}, N'{3}')", userId, record, (byte)type, text)); ClearOldItems(userId, 10); }