private void OnTableNewRecord(Record newRecord)
 {
     EventHandler<TableNewRecordEventArgs> handler = (EventHandler<TableNewRecordEventArgs>)this.events[RecordTable.TableNewRecordEvent];
     if (handler != null)
     {
         handler(this, new TableNewRecordEventArgs(newRecord));
     }
 }
示例#2
0
        private void EnsureRecord(Record record)
        {
            if (null == record)
                throw new ArgumentNullException("Records.Add -> record");
            if (record.Table == null)
                throw new ArgumentException("Record does not belong to any table");
            if (record.Table != this.table)
                throw new InvalidOperationException("Record does not belong to this table");

            if (record.RecordID == Record.InvalidID)
            {
                throw new InvalidOperationException("Record has not been indexed");
            }
            //Çok Önemli... Her Türlü Dictionary ye bir değer verilecek Table.NewrRecord da.

            //Buraya Tip Kontrolüde Yapılabilir. (Hep Aynı Tipde nesneler Eklensin Diye).
            //Record.GetType() ile.
        }
示例#3
0
 internal TableNewRecordEventArgs(Record newRecord)
 {
     this.newRecord = newRecord;
 }
 internal bool TryGetValue(int recordID, out Record record)
 {
     return this.dic.TryGetValue(recordID, out record);
 }
 internal void Add(Record record)
 {
     this.dic.Add(record.RecordID, record);
 }
示例#6
0
 private void RowSelection(Record record)
 {
     this.OnValueSelected(new SelectedValueEventArgs(record[0]));
     base.Close();
 }