コード例 #1
0
 private void OpenGiftDestination(System.Object sender, EventArgs e)
 {
     if (txtDetailRecipientKey.CurrentPartnerClass == TPartnerClass.FAMILY)
     {
         TFrmGiftDestination GiftDestinationForm = new TFrmGiftDestination(
             FPetraUtilsObject.GetForm(), FPreviouslySelectedDetailRow.RecipientKey);
         GiftDestinationForm.Show();
     }
 }
コード例 #2
0
        void HandleMaintainMenuItemOrToolBarButton(ToolStripItem AToolStripItem)
        {
            string ClickedMenuItemName = AToolStripItem.Name;

            if (ClickedMenuItemName == "mniMaintainAddresses")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpAddresses);
            }
            else if (ClickedMenuItemName == "mniMaintainContactDetails")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpContactDetails);
            }
            else if (ClickedMenuItemName == "mniMaintainPartnerDetails")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpDetails);
            }
            else if (ClickedMenuItemName == "mniMaintainFoundationDetails")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpFoundationDetails);
            }
            else if (ClickedMenuItemName == "mniMaintainSubscriptions")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpSubscriptions);
            }
            else if (ClickedMenuItemName == "mniMaintainSpecialTypes")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpPartnerTypes);
            }
            else if (ClickedMenuItemName == "mniMaintainContacts")
            {
                throw new NotImplementedException();
            }
            else if (ClickedMenuItemName == "mniMaintainFamilyMembers")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpFamilyMembers);
            }
            else if (ClickedMenuItemName == "mniMaintainRelationships")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpPartnerRelationships);
            }
            else if (ClickedMenuItemName == "mniMaintainInterests")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpInterests);
            }
            else if (ClickedMenuItemName == "mniMaintainReminders")
            {
                throw new NotImplementedException();
            }
            else if (ClickedMenuItemName == "mniMaintainNotes")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpNotes);
            }
            else if (ClickedMenuItemName == "mniMaintainLocalPartnerData")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpOfficeSpecific);
            }
            else if (ClickedMenuItemName == "mniMaintainGiftDestination")
            {
                if (FLogic.DetermineCurrentPartnerClass() == TPartnerClass.FAMILY.ToString())
                {
                    TFrmGiftDestination GiftDestinationForm = new TFrmGiftDestination(FPetraUtilsObject.GetForm(), PartnerKey);

                    GiftDestinationForm.Show();
                }
                else if (FLogic.DetermineCurrentPartnerClass() == TPartnerClass.PERSON.ToString())
                {
                    // open the Gift Destination screen for the person's family
                    TFrmGiftDestination GiftDestinationForm = new TFrmGiftDestination(
                        FPetraUtilsObject.GetForm(), Convert.ToInt64(FLogic.CurrentDataRow[PPersonTable.GetFamilyKeyDBName()]));

                    GiftDestinationForm.Show();
                }
            }
            else if (ClickedMenuItemName == "mniMaintainPersonnelData")
            {
                if (FLogic.DetermineCurrentPartnerClass() == SharedTypes.PartnerClassEnumToString(TPartnerClass.PERSON))
                {
                    OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpPersonnelIndividualData);
                }
                else
                {
                    throw new NotImplementedException();
                }
            }
            else if (ClickedMenuItemName == "mniMaintainDonorHistory")
            {
//              TMenuFunctions.OpenDonorGiftHistory(this);
                TCommonScreensForwarding.OpenDonorRecipientHistoryScreen(true,
                    PartnerKey,
                    FPetraUtilsObject.GetForm());
            }
            else if (ClickedMenuItemName == "mniMaintainRecipientHistory")
            {
//              TMenuFunctions.OpenRecipientGiftHistory(this);
                TCommonScreensForwarding.OpenDonorRecipientHistoryScreen(false,
                    PartnerKey,
                    FPetraUtilsObject.GetForm());
            }
            else if (ClickedMenuItemName == "mniMaintainFinanceReports")
            {
                throw new NotImplementedException();
            }
            else if (ClickedMenuItemName == "mniMaintainGiftReceipting")
            {
                throw new NotImplementedException();
            }
            else if (ClickedMenuItemName == "mniMaintainFinanceDetails")
            {
                OpenPartnerEditScreen(TPartnerEditTabPageEnum.petpFinanceDetails);
            }
        }
コード例 #3
0
        private void MaintainGiftDestination(System.Object sender, System.EventArgs e)
        {
            if (FPartnerClass == TPartnerClass.FAMILY.ToString())
            {
                // this will be 0 for a new and unsaved family partner
                // (new person partners can have gift destination added straight away as they are added to the person's family partner)
                if (FPartnerKey == 0)
                {
                    MessageBox.Show(Catalog.GetString("This new partner must be saved before a Gift Destination can be added."),
                        Catalog.GetString("Gift Destination"),
                        MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                TFrmGiftDestination GiftDestinationForm = new TFrmGiftDestination(FPetraUtilsObject.GetForm(), FPartnerKey);

                GiftDestinationForm.Show();
            }
            else if (FPartnerClass == TPartnerClass.PERSON.ToString())
            {
                // open the Gift Destination screen for the person's family
                TFrmGiftDestination GiftDestinationForm = new TFrmGiftDestination(
                    FPetraUtilsObject.GetForm(), ((PPersonRow)FMainDS.PPerson.Rows[0]).FamilyKey);

                MessageBox.Show(string.Format(Catalog.GetString("Gift Destination records are held for Family partners only.{0}" +
                            "This screen will display all Gift Destination records for the Family of {1}."),
                        "\n\n", ((PPartnerRow)FMainDS.PPartner.Rows[0]).PartnerShortName),
                    Catalog.GetString("Gift Destination"),
                    MessageBoxButtons.OK, MessageBoxIcon.Information);

                GiftDestinationForm.Show();
            }
        }