Esempio n. 1
0
        private DataTable GetFoundationOwnerListTable(TDBTransaction AReadTransaction, string ATableName)
        {
            // Used in Foundation Details screen.
            SUserTable TmpUserTable = new SUserTable();

            TmpUserTable = (SUserTable)AReadTransaction.DataBaseObj.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);
        }