示例#1
0
        public List <History> GetHistoryWithNoStatus(List <int> eventTypes, HistoryStatusTypeEnum historyStatusType)
        {
            string sql    = "select H.* from History H Left Outer join (select key from historystatus where historystatustype={1} )  HS on H.Key = HS.Key WHERE H.EventType IN ({0})  AND HS.Key is null";
            string sqlExe = string.Format(sql, string.Join(",", eventTypes), (int)historyStatusType);

            return(_uow.Connection.Query <History>(sqlExe).ToList());
        }
        internal void AddKeys(List <string> list, HistoryStatusTypeEnum historyStatusType, int status)
        {
            List <HistoryStatus> statusList = new List <HistoryStatus>();

            list.ForEach(e => statusList.Add(new HistoryStatus()
            {
                Key = e, HistoryStatusType = (int)historyStatusType, Status = status
            }));
            this.AddRange(statusList);
        }