예제 #1
0
        private SoundTempArray LoadSoundTemplate(string sSound_template_code)
        {
            SoundTempArray soundTempArray = new SoundTempArray();
            SoundTempArray result;

            try
            {
                DataProvider  dataProvider  = new DataProvider();
                string        sqlString     = "SELECT [sound_template_id],[sound_template_code],[sound_type_id],[sound_id], [nreads] FROM  [dbo].[SOUND_TEMPLATES]WHERE sound_template_code = '" + sSound_template_code + "' Order By [orderby]";
                SqlDataReader sqlDataReader = dataProvider.excuteQuery(sqlString);
                while (sqlDataReader.Read())
                {
                    int           isound_template_id   = int.Parse(sqlDataReader[0].ToString());
                    string        ssound_template_code = sqlDataReader[1].ToString();
                    int           isound_type_id       = int.Parse(sqlDataReader[2].ToString());
                    int           isound_id            = sqlDataReader.IsDBNull(3) ? 0 : int.Parse(sqlDataReader[3].ToString());
                    int           inread = sqlDataReader.IsDBNull(4) ? 0 : int.Parse(sqlDataReader[4].ToString());
                    SoundTempInfo si     = new SoundTempInfo(isound_template_id, ssound_template_code, isound_type_id, isound_id, inread);
                    soundTempArray.Add(si);
                }
                sqlDataReader.Close();
            }
            catch (SqlException ex)
            {
                MyMsgBox.MsgError(ex.Message);
                result = new SoundTempArray();
                return(result);
            }
            result = soundTempArray;
            return(result);
        }
예제 #2
0
 public void Add(SoundTempInfo si)
 {
     base.List.Add(si);
 }