コード例 #1
0
        /// <summary>
        /// opens Early Late Registration screen for pre selected conference
        /// </summary>
        public static void EarlyLateRegistrationsForSelectedConference(Form AParentForm)
        {
            DateTime StartDate = TRemote.MConference.Conference.WebConnectors.GetStartDate(FPartnerKey);
            DateTime EndDate   = TRemote.MConference.Conference.WebConnectors.GetEndDate(FPartnerKey);

            // if one or both dates are missing for the selected conference then this screen will not open
            if ((StartDate == DateTime.MinValue) || (EndDate == DateTime.MinValue))
            {
                MessageBox.Show("The selected conference is missing a start and/or an end date. " +
                                "Go to the Conference Master Settings screen to assign a date before accessing this setup screen",
                                String.Format("Early and Late Registrations"),
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);

                return;
            }

            if (FPartnerKey > 0)
            {
                TSearchCriteria[] Search = new TSearchCriteria[1];
                Search[0] = new TSearchCriteria(PcEarlyLateTable.GetConferenceKeyDBName(), FPartnerKey);

                TFrmEarlyLateRegistrationSetup.FPartnerKey = FPartnerKey;
                TFrmEarlyLateRegistrationSetup.FStartDate  = StartDate;
                TFrmEarlyLateRegistrationSetup.FEndDate    = EndDate;
                TFrmEarlyLateRegistrationSetup frm = new TFrmEarlyLateRegistrationSetup(AParentForm, Search);

                frm.Show();
            }
            else
            {
                MessageBox.Show(ERRORMESSAGE, String.Format("Early and Late Registrations"),
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #2
0
        /// constructor (use this one!)
        public TFrmGiftDestination(Form AParentForm, long APartnerKey) : base()
        {
            FPartnerKey = APartnerKey;

            TSearchCriteria[] Search = new TSearchCriteria[1];
            Search[0] = new TSearchCriteria(PPartnerGiftDestinationTable.GetPartnerKeyDBName(), FPartnerKey);

            Initialize(AParentForm, Search);
        }
コード例 #3
0
        /// create an odbc parameter for the given column
        public static OdbcParameter CreateOdbcParameter(short ATableNumber, TSearchCriteria ASearchCriteria)
        {
            TTypedColumnInfo columnInfo = GetColumn(ATableNumber, ASearchCriteria.fieldname);

            if (columnInfo.odbctype == OdbcType.VarChar)
            {
                return(new System.Data.Odbc.OdbcParameter("", columnInfo.odbctype, columnInfo.length));
            }

            return(new System.Data.Odbc.OdbcParameter("", columnInfo.odbctype));
        }
コード例 #4
0
        /// <summary>
        /// opens Standard Cost screen for pre selected conference
        /// </summary>
        public static void StandardCostsForSelectedConference(Form AParentForm)
        {
            if (FPartnerKey > 0)
            {
                TSearchCriteria[] Search = new TSearchCriteria[1];
                Search[0] = new TSearchCriteria(PcConferenceCostTable.GetConferenceKeyDBName(), FPartnerKey);

                TFrmConferenceStandardCostSetup.FPartnerKey = FPartnerKey;
                TFrmConferenceStandardCostSetup frm = new TFrmConferenceStandardCostSetup(AParentForm, Search);

                frm.Show();
            }
            else
            {
                MessageBox.Show(ERRORMESSAGE, String.Format("Conference Standard Costs"),
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #5
0
        /// <summary>
        /// opens Child Discount screen for pre selected conference
        /// </summary>
        public static void ChildDiscountsForSelectedConference(Form AParentForm)
        {
            if (FPartnerKey > 0)
            {
                TSearchCriteria[] Search = new TSearchCriteria[2];
                Search[0] = new TSearchCriteria(PcDiscountTable.GetConferenceKeyDBName(), FPartnerKey);
                Search[1] = new TSearchCriteria(PcDiscountTable.GetDiscountCriteriaCodeDBName(), "CHILD");

                TFrmChildDiscountSetup.FPartnerKey = FPartnerKey;
                TFrmChildDiscountSetup frm = new TFrmChildDiscountSetup(AParentForm, Search);

                frm.Show();
            }
            else
            {
                MessageBox.Show(ERRORMESSAGE, String.Format("Child Discounts"),
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
コード例 #6
0
        /// <summary>
        /// Will be called by TFormsList to inform any Form that is registered in TFormsList
        /// about any 'Forms Messages' that are broadcasted.
        /// </summary>
        /// <remarks>Theis screen 'listens' to such 'Forms Message' broadcasts by
        /// implementing this virtual Method. This Method will be called each time a
        /// 'Forms Message' broadcast occurs.
        /// </remarks>
        /// <param name="AFormsMessage">An instance of a 'Forms Message'. This can be
        /// inspected for parameters in the Method Body and the Form can use those to choose
        /// to react on the Message, or not.</param>
        /// <returns>Returns True if the Form reacted on the specific Forms Message,
        /// otherwise false.</returns>
        public bool ProcessFormsMessage(TFormsMessage AFormsMessage)
        {
            bool MessageProcessed = false;

            if ((AFormsMessage.MessageClass == TFormsMessageClassEnum.mcPersonnelCommitmentChanged) &&
                (((IFormsMessagePartnerInterface)AFormsMessage.MessageObject).PartnerKey == FPartnerKey))
            {
                TSearchCriteria[] Search = new TSearchCriteria[1];
                Search[0] = new TSearchCriteria(PPartnerGiftDestinationTable.GetPartnerKeyDBName(), FPartnerKey);

                FMainDS = new TLocalMainTDS();
                Ict.Common.Data.TTypedDataTable TypedTable;
                TRemote.MCommon.DataReader.WebConnectors.GetData(PPartnerGiftDestinationTable.GetTableDBName(), Search, out TypedTable);
                FMainDS.PPartnerGiftDestination.Merge(TypedTable);

                SetupGrid();
                UpdateRecordNumberDisplay();
                SelectRowInGrid(1);

                MessageProcessed = true;
            }

            return(MessageProcessed);
        }
コード例 #7
0
ファイル: TypedDataTable.cs プロジェクト: Davincier/openpetra
        /// create an odbc parameter for the given column
        public static OdbcParameter CreateOdbcParameter(short ATableNumber, TSearchCriteria ASearchCriteria)
        {
            TTypedColumnInfo columnInfo = GetColumn(ATableNumber, ASearchCriteria.fieldname);

            if (columnInfo.odbctype == OdbcType.VarChar)
            {
                return new System.Data.Odbc.OdbcParameter("", columnInfo.odbctype, columnInfo.length);
            }

            return new System.Data.Odbc.OdbcParameter("", columnInfo.odbctype);
        }