private void InitializeManualCode()
        {
            string        CurrencyCode;
            string        CurrencyName;
            string        ConferenceName;
            TPartnerClass PartnerClass;

            FPartnerKey = TUserDefaults.GetInt64Default("LASTCONFERENCEWORKEDWITH");

            // display the conference name in the title bar and in a text box at the top of the screen
            TRemote.MPartner.Partner.ServerLookups.WebConnectors.GetPartnerShortName(FPartnerKey, out ConferenceName, out PartnerClass);
            this.Text = this.Text + " [" + ConferenceName + "]";
            txtConferenceName.Text = ConferenceName;

            // display the conference dates in a text box at the top of the screen
            txtConferenceDates.Text = FStartDate.ToShortDateString() + " to " + FEndDate.ToShortDateString();

            // display the conference currency in a text box at the top of the screen and in pnlDetails
            TRemote.MConference.Conference.WebConnectors.GetCurrency(FPartnerKey, out CurrencyCode, out CurrencyName);
            txtDetailAmount.CurrencyCode = CurrencyCode;
        }
        private DateTime GetLatestAvailableEarlyDate(PcEarlyLateRow ARow)
        {
            DateTime ApplicableDate = FStartDate.AddDays(-1);

            if (FMainDS.PcEarlyLate.Count >= 1)
            {
                DateTime          EarliestDate = ApplicableDate;
                DataRowCollection AllRecords   = FMainDS.PcEarlyLate.Rows;
                int i = 0;

                // find the earliest late registration date for conference
                while (i < AllRecords.Count)
                {
                    if ((((PcEarlyLateRow)AllRecords[i]).RowState != DataRowState.Deleted) &&
                        (((PcEarlyLateRow)AllRecords[i]).Type == false) && (((PcEarlyLateRow)AllRecords[i]).Applicable < EarliestDate))
                    {
                        EarliestDate = ((PcEarlyLateRow)AllRecords[i]).Applicable;
                    }

                    i++;
                }

                // if the earliest late registration date is already the row's current date then nothing needs changed
                if (EarliestDate == ARow.Applicable)
                {
                    return(ApplicableDate);
                }

                // find the first free date before the earliest late registration date
                while (FMainDS.PcEarlyLate.Rows.Find(new object[] { FPartnerKey, EarliestDate }) != null)
                {
                    EarliestDate = EarliestDate.AddDays(-1);
                }

                ApplicableDate = EarliestDate;
            }

            return(ApplicableDate);
        }