Esempio n. 1
0
 private void CommonConstruction(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableId)
 {
     ColumnFactory = columnFactory;
     RecordFactory = recordFactory;
     Application = application;
     TableId = tableId;
     KeyFID = -1;
     Records = new QRecordCollection(Application, this);
     Columns = new QColumnCollection(Application, this);
 }
Esempio n. 2
0
        public List <Pitch> GrabPitches()
        {
            List <Pitch> pitches = new List <Pitch>();

            table = application.GetTable(GetTableID("Pitches"));
            table.Query();
            QRecordCollection pitchesCollection = table.Records;

            for (int j = 0; j < pitchesCollection.Count; j++)
            {
                int id;
                if (Int32.TryParse(pitchesCollection.ElementAt(j)[0], out id))
                {
                    pitches.Add(new Pitch(id, pitchesCollection.ElementAt(j)[1], pitchesCollection.ElementAt(j)[2]));
                }
            }
            return(pitches.OrderBy(x => x.PitchID).ToList());
        }
Esempio n. 3
0
        public List <Recording> GrabRecordings(int userID)
        {
            List <Recording> recordings = new List <Recording>();

            table = application.GetTable(GetTableID("Recordings"));
            table.Query();
            QRecordCollection records = table.Records;

            for (int j = 0; j < records.Count; j++)
            {
                if (records.ElementAt(j)[1] == userID.ToString())
                {
                    int id;
                    if (Int32.TryParse(records.ElementAt(j)[1], out id))
                    {
                        recordings.Add(new Recording(id, records.ElementAt(j)[2]));
                    }
                }
            }
            return(recordings);
        }