コード例 #1
0
        private void LoadResultCodes()
        {
            string        query = CreateResultCodeQuery();
            SqlConnection conn  = new SqlConnection(campaign.ConnString);

            conn.Open();
            SqlCommand    cmd = new SqlCommand(query, conn);
            SqlDataReader sdr = cmd.ExecuteReader();

            while (sdr.Read())
            {
                long       resultCodeID = (long)sdr[0];
                string     Description  = (string)sdr[1];
                ResultCode resultCode   = new ResultCode(campaign, resultCodeID, Description);
                ResultCodes.Add(resultCode);
            }
            sdr.Close();
            conn.Close();
        }