internal static QRecordFactoryBase GetInstance()
 {
     if(_instance == null)
     {
         _instance = new QRecordFactory();
     }
     return _instance;
 }
Beispiel #2
0
 internal static QRecordFactoryBase GetInstance()
 {
     if (_instance == null)
     {
         _instance = new QRecordFactory();
     }
     return(_instance);
 }
 private void CommonConstruction(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableId)
 {
     ColumnFactory = columnFactory;
     RecordFactory = recordFactory;
     Application   = application;
     TableId       = tableId;
     Records       = new QRecordCollection(Application, this);
     Columns       = new QColumnCollection(Application, this);
 }
Beispiel #4
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);
 }
Beispiel #5
0
        internal QTable(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableName, string pNoun)
        {
            var createTable = new CreateTable.Builder(application.Client.Ticket, application.Token, application.Client.AccountDomain, application.ApplicationId)
                .SetTName(tableName)
                .SetPNoun(pNoun)
                .Build();
            var xml = createTable.Post().CreateNavigator();
            var tableId = xml.SelectSingleNode("/qdbapi/newdbid").Value;

            TableName = tableName;
            RecordNames = pNoun;
            CommonConstruction(columnFactory, recordFactory, application, tableId);
        }
        internal QTable(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableName, string pNoun)
        {
            var createTable = new CreateTable.Builder(application.Client.Ticket, application.Token, application.Client.AccountDomain, application.ApplicationId)
                              .SetTName(tableName)
                              .SetPNoun(pNoun)
                              .Build();
            var xml     = createTable.Post().CreateNavigator();
            var tableId = xml.SelectSingleNode("/qdbapi/newdbid").Value;

            TableName   = tableName;
            RecordNames = pNoun;
            CommonConstruction(columnFactory, recordFactory, application, tableId);
        }
Beispiel #7
0
        internal QTable(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableName, string pNoun)
        {
            var createTable = new CreateTable.Builder(application.Client.Ticket, application.Token, application.Client.AccountDomain, application.ApplicationId)
                              .SetTName(tableName)
                              .SetPNoun(pNoun)
                              .Build();
            var xml     = createTable.Post();
            var tableId = xml.Element("newdbid").Value;

            TableName   = tableName;
            RecordNames = pNoun;
            CommonConstruction(columnFactory, recordFactory, application, tableId);
            RefreshColumns(); //grab basic columns that QB automatically makes
            IsLoaded = true;
        }
Beispiel #8
0
 // Constructors
 internal QTable(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableId)
 {
     if (columnFactory == null)
     {
         columnFactory = QColumnFactory.GetInstance();
         recordFactory = QRecordFactory.GetInstance();
         CommonConstruction(columnFactory, recordFactory, application, tableId);
         IsLoaded = false;
     }
     else
     {
         CommonConstruction(columnFactory, recordFactory, application, tableId);
         Load();
     }
 }
Beispiel #9
0
 // Constructors
 internal QTable(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableId)
 {
     CommonConstruction(columnFactory, recordFactory, application, tableId);
     Load();
 }
Beispiel #10
0
 // Constructors
 internal QTable(QColumnFactoryBase columnFactory, QRecordFactoryBase recordFactory, IQApplication application, string tableId)
 {
     CommonConstruction(columnFactory, recordFactory, application, tableId);
     Load();
 }