public static void FillFormDataFromAttendee(Int64 AEventPartnerKey, Int64 APartnerKey,
                                                    TFormDataAttendee AFormDataAttendee,
                                                    TFormLetterInfo AFormLetterInfo,
                                                    TDBTransaction AReadTransaction,
                                                    Int64 ASiteKey     = 0,
                                                    Int32 ALocationKey = 0)
        {
            TPartnerClass         PartnerClass;
            String                ShortName;
            TStdPartnerStatusCode PartnerStatusCode;

            if (MCommonMain.RetrievePartnerShortName(APartnerKey, out ShortName, out PartnerClass, out PartnerStatusCode, AReadTransaction))
            {
                // first retrieve all applicant information

                TFormLettersPersonnelWebConnector.FillFormDataFromApplicant(AEventPartnerKey,
                                                                            APartnerKey,
                                                                            AFormDataAttendee,
                                                                            AFormLetterInfo,
                                                                            AReadTransaction,
                                                                            ASiteKey,
                                                                            ALocationKey);

                PcAttendeeTable AttTable;
                PcAttendeeRow   AttRow;

                AttTable = PcAttendeeAccess.LoadByPrimaryKey(AEventPartnerKey, APartnerKey, AReadTransaction);

                if (AttTable.Count > 0)
                {
                    AttRow = (PcAttendeeRow)AttTable.Rows[0];
                    AFormDataAttendee.DiscoveryGroup = AttRow.DiscoveryGroup;
                    AFormDataAttendee.WorkGroup      = AttRow.WorkGroup;

                    PcConferenceVenueTable VenueTable;
                    PcConferenceVenueRow   VenueRow;

                    VenueTable = PcConferenceVenueAccess.LoadViaPcConference(AEventPartnerKey, AReadTransaction);

                    if (VenueTable.Count > 0)
                    {
                        VenueRow = (PcConferenceVenueRow)VenueTable.Rows[0];
                        AFormDataAttendee.Venue = VenueRow.VenueKey.ToString("0000000000");
                        //TODO Buidling, Room, RoomIn, RoomOut, RoomDatesMatchTravelDates, VenueName instead of VenueKey
                    }
                }
            }
        }
Example #2
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);
        }
Example #3
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);
        }