public List <DM_USER> SelectAllDM_USER() { List <DM_USER> dm_user = new List <DM_USER>(); DbDataReader reader = null; DbConnection conn = _DbHelper.CreateConnection(Common.ConnectionString); conn.Open(); try { reader = _DbHelper.ExecuteReader(conn, Common.DatabaseSchema + "[DM_USER_SelectAll]", (DbParameter[])null); if (reader.HasRows) { DM_USERDataAccess.SetListDM_USERInfo(ref reader, ref dm_user); } return(dm_user); } catch (Exception ex) { throw new Exception(String.Format(" DM_USERDataAccess.SelectAll: {0}", ex.Message)); } finally { if (reader != null) { reader.Close(); } conn.Close(); } }
public List <DM_USER> DM_USER_SelectAll_ByIDMA_DVIQLY(int IDMA_DVIQLY) { List <DM_USER> dm_user = new List <DM_USER>(); DbDataReader reader = null; DbConnection conn = _DbHelper.CreateConnection(Common.ConnectionString); conn.Open(); try { List <DbParameter> para = new List <DbParameter>(); para.Add(_DbHelper.CreateParameter(FIELD_IDMA_DVIQLY, IDMA_DVIQLY, false)); reader = _DbHelper.ExecuteReader(conn, Common.DatabaseSchema + "[DM_USER_SelectAll_ByIDMA_DVIQLY]", para.ToArray()); if (reader.HasRows) { DM_USERDataAccess.SetListDM_USERInfo(ref reader, ref dm_user); } return(dm_user); } catch (Exception ex) { throw new Exception(String.Format(" DM_USERDataAccess.SelectAll: {0}", ex.Message)); } finally { if (reader != null) { reader.Close(); } conn.Close(); } }