/// <summary> /// Opens a Modal instance of the SelectAddresses Dialog /// </summary> /// <param name="AFromPartnerKey">Pass in the From Partner's Key.</param> /// <param name="AToPartnerKey">Pass in the To Partner's Key.</param> /// <param name="ADataType">Determines the type of data the dialog will display.</param> /// <param name="AParentForm"></param> /// <returns>True if Addresses were found and accepted by the user, otherwise false.</returns> public static bool OpenModalForm(long AFromPartnerKey, long AToPartnerKey, string ADataType, Form AParentForm) { DialogResult dlgResult; TFrmGetMergeDataDialog SelectDialog = new TFrmGetMergeDataDialog(AParentForm); if (ADataType == "ADDRESS") { SelectDialog.InitializeAddressGrid(AFromPartnerKey); } else if (ADataType == "BANKACCOUNT") { SelectDialog.InitializeBankAccountGrid(AFromPartnerKey, AToPartnerKey); } dlgResult = SelectDialog.ShowDialog(); if (dlgResult == DialogResult.OK) { if (ADataType == "ADDRESS") { TFrmMergePartnersDialog.LocationKeys = SelectDialog.GetSelectedLocationKeys(); TFrmMergePartnersDialog.SiteKeys = SelectDialog.GetSelectedSiteKeys(); } else if (ADataType == "BANKACCOUNT") { TFrmMergePartnersDialog.MainBankingDetailsKey = SelectDialog.GetSelectedBankAccount(); } return(true); } return(false); }
/// <summary> /// Opens a Modal instance of the SelectAddresses Dialog /// </summary> /// <param name="AFromPartnerKey">Pass in the From Partner's Key.</param> /// <param name="AToPartnerKey">Pass in the To Partner's Key.</param> /// <param name="AMergeAction">Determines the type of data the dialog will display.</param> /// <param name="AParentForm"></param> /// <returns>True if Addresses were found and accepted by the user, otherwise false.</returns> public static bool OpenModalForm(long AFromPartnerKey, long AToPartnerKey, TMergeActionEnum AMergeAction, Form AParentForm) { DialogResult dlgResult; TFrmGetMergeDataDialog SelectDialog = new TFrmGetMergeDataDialog(AParentForm); bool RecordsExist = true; if (AMergeAction == TMergeActionEnum.ADDRESS) { RecordsExist = SelectDialog.InitializeAddressGrid(AFromPartnerKey); } else if (AMergeAction == TMergeActionEnum.CONTACTDETAIL) { RecordsExist = SelectDialog.InitializeContactDetailGrid(AFromPartnerKey, AToPartnerKey); } else if (AMergeAction == TMergeActionEnum.BANKACCOUNT) { SelectDialog.InitializeBankAccountGrid(AFromPartnerKey, AToPartnerKey); } if (!RecordsExist) { return(true); } dlgResult = SelectDialog.ShowDialog(); if (dlgResult == DialogResult.OK) { if (AMergeAction == TMergeActionEnum.ADDRESS) { TFrmMergePartnersDialog.LocationKeys = SelectDialog.GetSelectedLocationKeys(); TFrmMergePartnersDialog.SiteKeys = SelectDialog.GetSelectedSiteKeys(); } if (AMergeAction == TMergeActionEnum.CONTACTDETAIL) { TFrmMergePartnersDialog.ContactDetails = SelectDialog.GetContactDetails(); } else if (AMergeAction == TMergeActionEnum.BANKACCOUNT) { TFrmMergePartnersDialog.MainBankingDetailsKey = SelectDialog.GetSelectedBankAccount(); } return(true); } return(false); }
/// <summary> /// Opens a Modal instance of the SelectAddresses Dialog /// </summary> /// <param name="AFromPartnerKey">Pass in the From Partner's Key.</param> /// <param name="AToPartnerKey">Pass in the To Partner's Key.</param> /// <param name="ADataType">Determines the type of data the dialog will display.</param> /// <param name="AParentForm"></param> /// <returns>True if Addresses were found and accepted by the user, otherwise false.</returns> public static bool OpenModalForm(long AFromPartnerKey, long AToPartnerKey, string ADataType, Form AParentForm) { DialogResult dlgResult; TFrmGetMergeDataDialog SelectDialog = new TFrmGetMergeDataDialog(AParentForm); if (ADataType == "ADDRESS") { SelectDialog.InitializeAddressGrid(AFromPartnerKey); } else if (ADataType == "BANKACCOUNT") { SelectDialog.InitializeBankAccountGrid(AFromPartnerKey, AToPartnerKey); } dlgResult = SelectDialog.ShowDialog(); if (dlgResult == DialogResult.OK) { if (ADataType == "ADDRESS") { TFrmMergePartnersDialog.LocationKeys = SelectDialog.GetSelectedLocationKeys(); TFrmMergePartnersDialog.SiteKeys = SelectDialog.GetSelectedSiteKeys(); } else if (ADataType == "BANKACCOUNT") { TFrmMergePartnersDialog.MainBankingDetailsKey = SelectDialog.GetSelectedBankAccount(); } return true; } return false; }
/// <summary> /// Opens a Modal instance of the SelectAddresses Dialog /// </summary> /// <param name="AFromPartnerKey">Pass in the From Partner's Key.</param> /// <param name="AToPartnerKey">Pass in the To Partner's Key.</param> /// <param name="AMergeAction">Determines the type of data the dialog will display.</param> /// <param name="AParentForm"></param> /// <returns>True if Addresses were found and accepted by the user, otherwise false.</returns> public static bool OpenModalForm(long AFromPartnerKey, long AToPartnerKey, TMergeActionEnum AMergeAction, Form AParentForm) { DialogResult dlgResult; TFrmGetMergeDataDialog SelectDialog = new TFrmGetMergeDataDialog(AParentForm); if (AMergeAction == TMergeActionEnum.ADDRESS) { SelectDialog.InitializeAddressGrid(AFromPartnerKey); } else if (AMergeAction == TMergeActionEnum.CONTACTDETAIL) { SelectDialog.InitializeContactDetailGrid(AFromPartnerKey, AToPartnerKey); } else if (AMergeAction == TMergeActionEnum.BANKACCOUNT) { SelectDialog.InitializeBankAccountGrid(AFromPartnerKey, AToPartnerKey); } dlgResult = SelectDialog.ShowDialog(); if (dlgResult == DialogResult.OK) { if (AMergeAction == TMergeActionEnum.ADDRESS) { TFrmMergePartnersDialog.LocationKeys = SelectDialog.GetSelectedLocationKeys(); TFrmMergePartnersDialog.SiteKeys = SelectDialog.GetSelectedSiteKeys(); } if (AMergeAction == TMergeActionEnum.CONTACTDETAIL) { TFrmMergePartnersDialog.ContactDetails = SelectDialog.GetContactDetails(); } else if (AMergeAction == TMergeActionEnum.BANKACCOUNT) { TFrmMergePartnersDialog.MainBankingDetailsKey = SelectDialog.GetSelectedBankAccount(); } return true; } return false; }