Exemplo n.º 1
0
        public static ConferenceSetupTDS LoadConferenceSettings(long AConferenceKey, out string AConferenceName)
        {
            Boolean NewTransaction;

            ConferenceSetupTDS MainDS = new ConferenceSetupTDS();

            TDBTransaction Transaction = DBAccess.GDBAccessObj.GetNewOrExistingTransaction(IsolationLevel.ReadCommitted,
                                                                                           TEnforceIsolationLevel.eilMinimum,
                                                                                           out NewTransaction);

            PPartnerLocationAccess.LoadViaPPartner(MainDS, AConferenceKey, Transaction);
            PcConferenceAccess.LoadByPrimaryKey(MainDS, AConferenceKey, Transaction);
            PcConferenceOptionAccess.LoadViaPcConference(MainDS, AConferenceKey, Transaction);
            PcDiscountAccess.LoadViaPcConference(MainDS, AConferenceKey, Transaction);
            PcConferenceVenueAccess.LoadViaPcConference(MainDS, AConferenceKey, Transaction);
            PUnitAccess.LoadByPrimaryKey(MainDS, AConferenceKey, Transaction);
            AConferenceName = PPartnerAccess.LoadByPrimaryKey(MainDS, AConferenceKey, Transaction).PartnerShortName;

            foreach (ConferenceSetupTDSPcConferenceVenueRow VenueRow in MainDS.PcConferenceVenue.Rows)
            {
                string        VenueName;
                TPartnerClass PartnerClass;
                MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetPartnerShortName(VenueRow.VenueKey,
                                                                                                       out VenueName,
                                                                                                       out PartnerClass);
                VenueRow.VenueName = VenueName;
            }

            // Accept row changes here so that the Client gets 'unmodified' rows
            MainDS.AcceptChanges();

            // Remove all Tables that were not filled with data before remoting them.
            MainDS.RemoveEmptyTables();

            if (NewTransaction)
            {
                DBAccess.GDBAccessObj.RollbackTransaction();
            }

            return(MainDS);
        }
Exemplo n.º 2
0
        public static ConferenceSetupTDS LoadConferenceSettings(long AConferenceKey, out string AConferenceName)
        {
            ConferenceSetupTDS MainDS         = new ConferenceSetupTDS();
            string             ConferenceName = null;

            TDBTransaction Transaction = new TDBTransaction();

            DBAccess.ReadTransaction(
                ref Transaction,
                delegate
            {
                PPartnerLocationAccess.LoadViaPPartner(MainDS, AConferenceKey, Transaction);
                PcConferenceAccess.LoadByPrimaryKey(MainDS, AConferenceKey, Transaction);
                PcConferenceOptionAccess.LoadViaPcConference(MainDS, AConferenceKey, Transaction);
                PcDiscountAccess.LoadViaPcConference(MainDS, AConferenceKey, Transaction);
                PcConferenceVenueAccess.LoadViaPcConference(MainDS, AConferenceKey, Transaction);
                PUnitAccess.LoadByPrimaryKey(MainDS, AConferenceKey, Transaction);
                ConferenceName = PPartnerAccess.LoadByPrimaryKey(MainDS, AConferenceKey, Transaction).PartnerShortName;
            });

            foreach (ConferenceSetupTDSPcConferenceVenueRow VenueRow in MainDS.PcConferenceVenue.Rows)
            {
                string        VenueName;
                TPartnerClass PartnerClass;
                MPartner.Partner.ServerLookups.WebConnectors.TPartnerServerLookups.GetPartnerShortName(VenueRow.VenueKey,
                                                                                                       out VenueName,
                                                                                                       out PartnerClass);
                VenueRow.VenueName = VenueName;
            }

            // Accept row changes here so that the Client gets 'unmodified' rows
            MainDS.AcceptChanges();

            // Remove all Tables that were not filled with data before remoting them.
            MainDS.RemoveEmptyTables();

            AConferenceName = ConferenceName;

            return(MainDS);
        }