Exemple #1
0
        private void InitializeOtherControls()
        {
            // Load MethodOfContact List
            PMethodOfContactTable MethodOfContactTable = (PMethodOfContactTable)TDataCache.TMPartner.GetCacheableMailingTable(
                TCacheableMailingTablesEnum.MethodOfContactList);

            cmbContact.Items.Add("*");

            foreach (PMethodOfContactRow Row in MethodOfContactTable.Rows)
            {
                cmbContact.Items.Add(Row.MethodOfContactCode);
            }

            cmbContact.SelectedIndex = 0;

            // Load User List
            SUserTable UserTable = (SUserTable)TDataCache.TMSysMan.GetCacheableSysManTable(TCacheableSysManTablesEnum.UserList);
            DataView   dvActive  = new DataView(UserTable);

            dvActive.RowFilter = string.Format("{0}=0 AND {1}=0", SUserTable.GetRetiredDBName(), SUserTable.GetAccountLockedDBName());
            dvActive.Sort      = string.Format("{0}", SUserTable.GetUserIdDBName());

            cmbContactor.Items.Add("*");

            foreach (DataRowView drv in dvActive)
            {
                SUserRow row = (SUserRow)drv.Row;
                cmbContactor.Items.Add(row.UserId);
            }

            cmbContactor.SelectedIndex = 0;
        }
Exemple #2
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);
        }