コード例 #1
0
        public BindingList <DM_USER> SelectBindingAllDM_USER()
        {
            BindingList <DM_USER> dm_user = new BindingList <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.SetBindingListDM_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();
            }
        }