/// <summary> /// static method for opening the window from partner module /// </summary> /// <param name="ADonor">True if Donor, false if Recipient</param> /// <param name="APartnerKey"></param> /// <param name="AParentForm"></param> public static void OpenWindowDonorRecipientHistory(bool ADonor, Int64 APartnerKey, Form AParentForm) { if (APartnerKey == -1) { MessageBox.Show(Catalog.GetString("No current partner selected")); return; } Ict.Petra.Client.MFinance.Gui.Gift.TFrmDonorRecipientHistory frmDRH = new Ict.Petra.Client.MFinance.Gui.Gift.TFrmDonorRecipientHistory( AParentForm); // if the user does not have permission to access any Ledgers if (((DataView)frmDRH.cmbLedger.cmbCombobox.DataSource).Count == 0) { TLstFolderNavigation.ShowMessageNoAccessToFinanceModuleDueToNoLedgerEnabled(Catalog.GetString("Finance")); return; } try { frmDRH.Cursor = Cursors.WaitCursor; if (ADonor) { frmDRH.Donor = APartnerKey; } else { frmDRH.Recipient = APartnerKey; } frmDRH.EnableLedgerDropdown(); frmDRH.Search(); frmDRH.Show(); } finally { frmDRH.Cursor = Cursors.Default; } }
/// <summary> /// static method for opening the window from partner module /// </summary> /// <param name="ADonor">True if Donor, false if Recipient</param> /// <param name="APartnerKey"></param> /// <param name="AParentForm"></param> public static void OpenWindowDonorRecipientHistory(bool ADonor, Int64 APartnerKey, Form AParentForm) { if (APartnerKey == -1) { MessageBox.Show(Catalog.GetString("No current partner selected")); return; } Ict.Petra.Client.MFinance.Gui.Gift.TFrmDonorRecipientHistory frmDRH = new Ict.Petra.Client.MFinance.Gui.Gift.TFrmDonorRecipientHistory( AParentForm); // if the user does not have permission to access any Ledgers if (((DataView)frmDRH.cmbLedger.cmbCombobox.DataSource).Count == 0) { MessageBox.Show(Catalog.GetString("Cannot view History as you do not have access rights to any Ledgers.")); return; } try { frmDRH.Cursor = Cursors.WaitCursor; if (ADonor) { frmDRH.Donor = APartnerKey; } else { frmDRH.Recipient = APartnerKey; } frmDRH.EnableLedgerDropdown(); frmDRH.Search(); frmDRH.Show(); } finally { frmDRH.Cursor = Cursors.Default; } }