/// <summary>
        /// get the datatable from the database
        /// </summary>
        /// <param name="ATableName">name of table to retrieve</param>
        /// <returns></returns>
        public DataTable GetData(string ATableName)
        {
            DataTable      table           = new DataTable();
            TDBTransaction ReadTransaction = DBAccess.GDBAccessObj.BeginTransaction(IsolationLevel.RepeatableRead, 5);

            if (ATableName == SUserTable.GetTableDBName())
            {
                table = SUserAccess.LoadAll(ReadTransaction);
            }

            return(table);
        }
Example #2
0
        private DataTable GetFoundationOwnerListTable(TDBTransaction AReadTransaction, string ATableName)
        {
            // Used in Foundation Details screen.
            SUserTable TmpUserTable = new SUserTable();

            TmpUserTable = (SUserTable)DBAccess.GDBAccessObj.SelectDT(TmpUserTable, "SELECT " + SUserTable.GetPartnerKeyDBName() + ',' +
                                                                      SUserTable.GetUserIdDBName() + ',' +
                                                                      SUserTable.GetFirstNameDBName() + ',' +
                                                                      SUserTable.GetLastNameDBName() + ' ' +
                                                                      "FROM PUB_" + SUserTable.GetTableDBName() + ' ' +
                                                                      "WHERE " + SUserTable.GetPartnerKeyDBName() + " <> 0 " +
                                                                      "AND " + SUserTable.GetUserIdDBName() +
                                                                      " IN (SELECT " + SUserModuleAccessPermissionTable.GetUserIdDBName() + ' ' +
                                                                      "FROM PUB_" + SUserModuleAccessPermissionTable.GetTableDBName() + ' ' +
                                                                      "WHERE " + SUserModuleAccessPermissionTable.GetModuleIdDBName() +
                                                                      " = 'DEVUSER')" + "AND " + SUserTable.GetRetiredDBName() +
                                                                      " = FALSE", AReadTransaction, null, -1, -1);
            SUserRow EmptyDR = TmpUserTable.NewRowTyped(false);

            EmptyDR.PartnerKey = 0;
            EmptyDR.UserId     = "";
            TmpUserTable.Rows.InsertAt(EmptyDR, 0);
            return(TmpUserTable);
        }