public IList<Affair> SelectAll(String hostCode, List<Int32> affairTags) { var returns = new List<Affair>(); var dt = SqlDbAccess.GetInstance().GetTable("select * from " + hostCode + "_TPointAlarm where TagID in (" + String.Join(",", affairTags) + ")"); foreach (DataRow dr in dt.Rows) { var g = new Affair(); g.FromDataRow(dr, hostCode); returns.Add(g); } return returns; }
public IList<Affair> SelectAll(String hostCode) { var returns = new List<Affair>(); var dt = SqlDbAccess.GetInstance().GetTable("select * from " + hostCode + "_TPointAlarm "); foreach (DataRow dr in dt.Rows) { var g = new Affair(); g.FromDataRow(dr, hostCode); returns.Add(g); } return returns; }