/// <summary> /// 获取周报收件人列表 /// Created:2017.04.11(ChengMengjia) /// </summary> /// <returns></returns> public IList <dynamic> GetMemberList(string ProjectID, string IDs) { string sql = "select * from Stakeholders where PID=:PID and ID in (" + IDs + ")"; ISQLQuery query = NHHelper.GetCurrentSession().CreateSQLQuery(sql.ToString()); query.SetString("PID", ProjectID); return(query.DynamicList()); }
public static List <dynamic> GetDynamicList(string sql, Dictionary <string, string> args) { ISession session = GetCurrentSession(); try { ISQLQuery query = session.CreateSQLQuery(sql); foreach (var item in args) { query.SetString(item.Key, item.Value); } return(query.DynamicList().ToList()); } catch (Exception ex) { LogHelper.WriteException(ex, LogType.DataAccessDLL); return(null); } }