private void ReadControlsVerify(TRptCalculator ACalc, TReportActionEnum AReportAction) { // make sure that for each group one radio button is selected TFrmPetraReportingUtils.VerifyRadioButtonSelection(rgrPartnerSelection, FPetraUtilsObject); TFrmPetraReportingUtils.VerifyRadioButtonSelection(rgrSorting, FPetraUtilsObject); TFrmPetraReportingUtils.VerifyRadioButtonSelection(rgrFormatCurrency, FPetraUtilsObject); if (!dtpEndDate.ValidDate(false) || !dtpStartDate.ValidDate(false)) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("Date format problem"), Catalog.GetString("Please check the date entry."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } else { if (dtpStartDate.Date > dtpEndDate.Date) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("From date is later than to date."), Catalog.GetString("Please change from date or to date."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } } }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FUpdatingRelationColumns = false; FPetraUtilsObject = APetraUtilsObject; FColumnParameters = new TParameterList(); FColumnParameters.Add("MaxDisplayColumns", 0); FPetraUtilsObject.FMaxDisplayColumns = 0; FDuringApplyOrCancel = false; FSelectedColumn = -1; grdColumns.SortableHeaders = false; grdColumns.SelectionMode = SourceGrid.GridSelectionMode.Column; grdColumns.AutoStretchColumnsToFitWidth = false; /* Hook up event that fires when a different row is selected */ grdColumns.Selection.FocusColumnEntered += new ColumnEventHandler(this.GrdColumns_FocusColumnEntered); grdColumns.Selection.CellLostFocus += new ChangeActivePositionEventHandler(this.GrdColumns_CellLostFocus); grdColumns.Selection.CellGotFocus += new ChangeActivePositionEventHandler(this.GrdColumns_CellGotFocus); btnApply.Enabled = false; btnCancel.Enabled = false; rbtFromGL.Checked = true; rbtFromGL.Enabled = false; rbtCalculateExisting.Enabled = false; cmbYearSelection.Enabled = false; chkYTD.Enabled = false; clbLedger.Enabled = false; }
private void InitManualCode() { FCurrentUser = UserInfo.GUserInfo.UserID; FPetraUtilsObject = new TFrmPetraReportingUtils(this, this, null); this.KeyPreview = true; this.KeyDown += new System.Windows.Forms.KeyEventHandler(Form_KeyDown); }
/// <summary> /// Instance this object and it changes the behaviour of the ReportForm UI to use FastReports if the DLL is installed. /// </summary> /// <param name="PetraUtilsObject"></param> public FastReportsWrapper(TFrmPetraReportingUtils PetraUtilsObject) { try { LoadedOK = false; FDataGetter = null; FPetraUtilsObject = PetraUtilsObject; if (!LoadDll()) { return; } FReportName = FPetraUtilsObject.FReportName; if (!LoadDefaultTemplate()) { return; } FPetraUtilsObject.DelegateGenerateReportOverride = GenerateReport; FPetraUtilsObject.DelegateViewReportOverride = DesignReport; FPetraUtilsObject.DelegateCancelReportOverride = CancelReportGeneration; FPetraUtilsObject.EnableDisableSettings(false); FInitState = TInitState.LoadedOK; LoadedOK = true; } catch (Exception) // If there's no FastReports DLL, this object will do nothing. { // TLogging.Log("FastReports Wrapper Not loaded: " + e.Message); } }
/// <summary> /// Add verification error if no radio button is selected in the group box /// </summary> /// <param name="AUtilsObject"></param> public void VerifyRadioButtonSelection(TFrmPetraReportingUtils AUtilsObject) { if (grpPeriodRange.Visible) { TFrmPetraReportingUtils.VerifyRadioButtonSelection(grpPeriodRange, AUtilsObject); } }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FUpdatingRelationColumns = false; FPetraUtilsObject = APetraUtilsObject; FColumnParameters = new TParameterList(); FColumnParameters.Add("MaxDisplayColumns", 0); FPetraUtilsObject.FMaxDisplayColumns = 0; FDuringApplyOrCancel = false; FSelectedColumn = -1; grdColumns.SortableHeaders = false; grdColumns.SelectionMode = SourceGrid.GridSelectionMode.Column; grdColumns.AutoStretchColumnsToFitWidth = false; /* Hook up event that fires when a different row is selected */ grdColumns.Selection.FocusColumnEntered += new ColumnEventHandler(this.GrdColumns_FocusColumnEntered); grdColumns.Selection.CellLostFocus += new ChangeActivePositionEventHandler(this.GrdColumns_CellLostFocus); grdColumns.Selection.CellGotFocus += new ChangeActivePositionEventHandler(this.GrdColumns_CellGotFocus); btnApply.Enabled = false; btnCancel.Enabled = false; rbtFromGL.Checked = true; rbtFromGL.Enabled = false; rbtCalculateExisting.Enabled = false; cmbYearSelection.Enabled = false; chkYTD.Enabled = false; clbLedger.Enabled = false; }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; rbtPartner.Checked = true; txtExtract.Enabled = false; }
private void grdCommitmentStatusChoices_InitialiseData(TFrmPetraReportingUtils FPetraUtilsObject) { #region Copied from csharp/ICT/Petra/Client/MReporting/Gui/MPersonnel/StartOfCommitmentReport.ManualCode.cs // TODO // The following block of code should be generalized // along with the similar code from // StartOfCommitmentReport.ManualCode.cs. FCommitmentStatusTable = TDataCache.TMPersonnel.GetCacheablePersonnelTable( TCacheablePersonTablesEnum.CommitmentStatusList); FCommitmentStatusTable.Columns.Add("Selection", System.Type.GetType("System.Boolean")); grdCommitmentStatusChoices.Columns.Clear(); grdCommitmentStatusChoices.AddCheckBoxColumn("", FCommitmentStatusTable.Columns["Selection"], false); grdCommitmentStatusChoices.AddTextColumn("Type", FCommitmentStatusTable.Columns[PmCommitmentStatusTable.GetCodeDBName()]); grdCommitmentStatusChoices.AddTextColumn("Description", FCommitmentStatusTable.Columns[PmCommitmentStatusTable.GetDescDBName()]); FCommitmentStatusTable.DefaultView.AllowNew = false; FCommitmentStatusTable.DefaultView.AllowDelete = false; grdCommitmentStatusChoices.DataSource = new DevAge.ComponentModel.BoundDataView(FCommitmentStatusTable.DefaultView); grdCommitmentStatusChoices.AutoResizeGrid(); #endregion }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FCostCenterCodesDuringLoad = ""; // otherwise rbtSelectedCostCentres slightly obscures clbCostCentres rbtSelectedCostCentres.SendToBack(); clbCostCentres.MouseDown += clbCostCentres_MouseDown; }
/// <summary> /// initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; // set the delegate that is needed before and after LoadSettings has been run FPetraUtilsObject.DelegateLoadSettingsStarting = @LoadSettingsStarting; FPetraUtilsObject.DelegateLoadSettingsFinished = @LoadSettingsFinished; }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FCostCenterCodesDuringLoad = ""; // otherwise rbtSelectedCostCentres slightly obscures clbCostCentres rbtSelectedCostCentres.SendToBack(); clbCostCentres.MouseDown += clbCostCentres_MouseDown; }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { rbtPeriod.Checked = true; dtpStartDate.Enabled = false; dtpEndDate.Enabled = false; rbtDate.Enabled = false; txtQuarter.Enabled = false; cmbQuarterYear.Enabled = false; cmbBreakdownYear.Enabled = false; EnableBreakdownByPeriod(false); }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { rbtPeriod.Checked = true; dtpStartDate.Enabled = false; dtpEndDate.Enabled = false; rbtDate.Enabled = false; txtQuarter.Enabled = false; cmbQuarterYear.Enabled = false; cmbBreakdownYear.Enabled = false; EnableBreakdownByPeriod(false); }
private void ReadControlsVerify(TRptCalculator ACalc, TReportActionEnum AReportAction) { // make sure that for each group one radio button is selected TFrmPetraReportingUtils.VerifyRadioButtonSelection(grpLevel, FPetraUtilsObject); TFrmPetraReportingUtils.VerifyRadioButtonSelection(rgrRecipientSelection, FPetraUtilsObject); TFrmPetraReportingUtils.VerifyRadioButtonSelection(rgrDonorSelection, FPetraUtilsObject); if (!dtpEndDate.ValidDate(false) || !dtpStartDate.ValidDate(false)) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("Date format problem"), Catalog.GetString("Please check the date entry."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } else { if (dtpStartDate.Date > dtpEndDate.Date) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("From date is later than to date."), Catalog.GetString("Please change from date or to date."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } } if (rbtMiddleDonor.Checked) { int From = Convert.ToInt32(txtPercentage.Text); int To = Convert.ToInt32(txtToPercentage.Text); if (To > From) { // From must be bigger than to int TmpNumber = Convert.ToInt32(txtPercentage.Text); txtPercentage.NumberValueInt = Convert.ToInt32(txtToPercentage.Text); txtToPercentage.NumberValueInt = TmpNumber; } } if (!ucoMotivationCriteria.IsAnyMotivationDetailSelected()) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("No Motivation Detail selected"), Catalog.GetString("Please select at least one Motivation Detail."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } }
private void grdDetail_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FContactAttributesTable = (PContactAttributeDetailTable) TDataCache.TMPartner.GetCacheableMailingTable(TCacheableMailingTablesEnum.ContactAttributeDetailList); grdDetail.Columns.Clear(); grdDetail.AddTextColumn("Attribute", FContactAttributesTable.ColumnContactAttributeCode); grdDetail.AddTextColumn("Detail", FContactAttributesTable.ColumnContactAttrDetailCode); grdDetail.AddTextColumn("Description", FContactAttributesTable.ColumnContactAttrDetailDescr); grdDetail.Columns[0].Visible = false; grdDetail.AutoSizeCells(); grdDetail.Selection.EnableMultiSelection = true; }
private void grdDetail_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FContactAttributesTable = (PContactAttributeDetailTable) TDataCache.TMPartner.GetCacheableMailingTable(TCacheableMailingTablesEnum.ContactAttributeDetailList); grdDetail.Columns.Clear(); grdDetail.AddTextColumn("Attribute", FContactAttributesTable.ColumnContactAttributeCode); grdDetail.AddTextColumn("Detail", FContactAttributesTable.ColumnContactAttrDetailCode); grdDetail.AddTextColumn("Description", FContactAttributesTable.ColumnContactAttrDetailDescr); grdDetail.Columns[0].Visible = false; grdDetail.AutoSizeCells(); grdDetail.Selection.EnableMultiSelection = true; }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; FSelectedUnitKey = 0; // TODO // In some cases we might want to set the values for the user control right here. // For example if a report is opened from an existing conference, we want to show the // data of this conference. FSetControlsWithConstructorValues = false; txtEventCode.ReadOnly = true; rbtThisEventOnly.Checked = true; rbtAllParticipants.Checked = true; }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; FSelectedUnitKey = 0; // TODO // In some cases we might want to set the values for the user control right here. // For example if a report is opened from an existing conference, we want to show the // data of this conference. FSetControlsWithConstructorValues = false; txtEventCode.ReadOnly = true; rbtThisEventOnly.Checked = true; rbtAllParticipants.Checked = true; }
/// <summary> /// Instance this object and it changes the behaviour of the ReportForm UI to use FastReports if the DLL is installed. /// </summary> /// <param name="PetraUtilsObject"></param> public FastReportsWrapper(TFrmPetraReportingUtils PetraUtilsObject) { try { LoadedOK = false; FDataGetter = null; FPetraUtilsObject = PetraUtilsObject; // we do not support FastReports in the Open Source fork of OpenPetra return; } catch (Exception e) { TLogging.Log("FastReports Wrapper (" + FReportName + ") Not loaded: " + e.Message); } }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; rbtAllAttendees.Checked = true; txtExtract.Enabled = false; FShowSelectOutreachOptionsDialog = true; // Get selected conference key long SelectedConferenceKey = TUserDefaults.GetInt64Default("LASTCONFERENCEWORKEDWITH"); if (SelectedConferenceKey != 0) { txtConference.Text = SelectedConferenceKey.ToString(); } }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; rbtAllAttendees.Checked = true; txtExtract.Enabled = false; FShowSelectOutreachOptionsDialog = true; // Get selected conference key long SelectedConferenceKey = TUserDefaults.GetInt64Default("LASTCONFERENCEWORKEDWITH"); if (SelectedConferenceKey != 0) { txtConference.Text = SelectedConferenceKey.ToString(); } }
private void grdSelection_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FSelectionTable = new PContactAttributeDetailTable(); FSelectionTable.DefaultView.AllowNew = false; FSelectionTable.DefaultView.AllowDelete = true; FSelectionTable.DefaultView.AllowEdit = false; grdSelection.Columns.Clear(); grdSelection.AddTextColumn("Attribute", FSelectionTable.ColumnContactAttributeCode); grdSelection.AddTextColumn("Detail", FSelectionTable.ColumnContactAttrDetailCode); grdSelection.AddTextColumn("Description", FSelectionTable.ColumnContactAttrDetailDescr); grdSelection.DataSource = new DevAge.ComponentModel.BoundDataView(FSelectionTable.DefaultView); grdSelection.AutoSizeCells(); grdSelection.Selection.EnableMultiSelection = true; }
private void ReadControlsVerify(TRptCalculator ACalc, TReportActionEnum AReportAction) { // make sure that for each group one radio button is selected TFrmPetraReportingUtils.VerifyRadioButtonSelection(grpSelection, FPetraUtilsObject); TFrmPetraReportingUtils.VerifyRadioButtonSelection(rgrFormatCurrency, FPetraUtilsObject); if ((ucoGiftsInRange.RangeTable == null) || (ucoGiftsInRange.RangeTable.Rows.Count == 0)) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("'Gifts In Range' Needed."), Catalog.GetString("Please enter a value for 'Gifts In Range'."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } if ((ucoNoGiftsInRange.RangeTable == null) || (ucoNoGiftsInRange.RangeTable.Rows.Count == 0)) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("'No Gifts In Range' Needed."), Catalog.GetString("Please enter a value for 'No Gifts In Range'."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } // check for overlapping in the ranges foreach (DataRow Row in ucoGiftsInRange.RangeTable.Rows) { foreach (DataRow NoRow in ucoNoGiftsInRange.RangeTable.Rows) { if ((((Convert.ToDateTime(NoRow["From"]) >= Convert.ToDateTime(Row["From"])) && (Convert.ToDateTime(NoRow["From"]) <= Convert.ToDateTime(Row["To"]))) || ((Convert.ToDateTime(NoRow["To"]) >= Convert.ToDateTime(Row["From"])) && (Convert.ToDateTime(NoRow["To"]) <= Convert.ToDateTime(Row["To"])))) || (((Convert.ToDateTime(Row["From"]) >= Convert.ToDateTime(NoRow["From"])) && (Convert.ToDateTime(Row["From"]) <= Convert.ToDateTime(NoRow["To"]))) || ((Convert.ToDateTime(Row["To"]) >= Convert.ToDateTime(NoRow["From"])) && (Convert.ToDateTime(Row["To"]) <= Convert.ToDateTime(NoRow["To"]))))) { TVerificationResult VerificationResult = new TVerificationResult( Catalog.GetString("Overlapping Ranges"), Catalog.GetString("'Gifts In Range' and 'No Gifts In Range' overlap. This is not allowed."), TResultSeverity.Resv_Critical); FPetraUtilsObject.AddVerificationResult(VerificationResult); } } } }
/// <summary> /// initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; // hide those fields by default ShowCountyStateField(false); ShowAddressDateFields(false); // make sure date fields are not initialized with today's date but later on with default settings dtpAddressStartFrom.Text = ""; dtpAddressStartTo.Text = ""; dtpAddressEndFrom.Text = ""; dtpAddressEndTo.Text = ""; txtPostCodeFrom.Validating += new CancelEventHandler(PostCode_Validating); txtPostCodeTo.Validating += new CancelEventHandler(PostCode_Validating); }
private void grdAttribute_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { // Load Contact Attributes PContactAttributeTable ContactAttributeTable = (PContactAttributeTable)TDataCache.TMPartner.GetCacheableMailingTable( TCacheableMailingTablesEnum.ContactAttributeList); grdAttribute.Columns.Clear(); grdAttribute.AddTextColumn("Attribute", ContactAttributeTable.ColumnContactAttributeCode); DataView myDataView = ContactAttributeTable.DefaultView; myDataView.AllowNew = false; grdAttribute.DataSource = new DevAge.ComponentModel.BoundDataView(myDataView); grdAttribute.AutoSizeCells(); // Do some other initialisation InitializeOtherControls(); }
private void grdFields_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FUnitType = TUnitTypeEnum.utUnknown; this.ucoConferenceSelection.AddConfernceKeyChangedEventHandler(this.ConferenceKeyChanged); this.ucoConferenceSelection.AddConferenceSelectionChangedEventHandler(this.ConferenceSelectionChanged); rbtFull.Checked = true; cmbSignOffLines.SelectedIndex = 0; cmbChargedFields.SelectedIndex = 0; FCurrentConferenceKey = Convert.ToInt64(this.ucoConferenceSelection.ConferenceKey); ucoConferenceSelection.DisableRadioButtonAllConferences(true); ucoConferenceSelection.FShowSelectOutreachOptionsDialog = false; grdFields.DoubleClickCell += new TDoubleClickCellEventHandler(grdFieldDoubleClick); }
private void grdFields_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FUnitType = TUnitTypeEnum.utUnknown; this.ucoConferenceSelection.AddConfernceKeyChangedEventHandler(this.ConferenceKeyChanged); this.ucoConferenceSelection.AddConferenceSelectionChangedEventHandler(this.ConferenceSelectionChanged); rbtFull.Checked = true; cmbSignOffLines.SelectedIndex = 0; cmbChargedFields.SelectedIndex = 0; FCurrentConferenceKey = Convert.ToInt64(this.ucoConferenceSelection.ConferenceKey); ucoConferenceSelection.DisableRadioButtonAllConferences(true); ucoConferenceSelection.FShowSelectOutreachOptionsDialog = false; grdFields.DoubleClickCell += new TDoubleClickCellEventHandler(grdFieldDoubleClick); }
private void grdAttribute_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { // Load Contact Attributes PContactAttributeTable ContactAttributeTable = (PContactAttributeTable)TDataCache.TMPartner.GetCacheableMailingTable( TCacheableMailingTablesEnum.ContactAttributeList); grdAttribute.Columns.Clear(); grdAttribute.AddTextColumn("Attribute", ContactAttributeTable.ColumnContactAttributeCode); DataView myDataView = ContactAttributeTable.DefaultView; myDataView.AllowNew = false; grdAttribute.DataSource = new DevAge.ComponentModel.BoundDataView(myDataView); grdAttribute.AutoSizeCells(); // Do some other initialisation InitializeOtherControls(); }
private void grdTypes_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { // Get list of commitment statuses FTypesTable = (PTypeTable)TDataCache.TMPartner.GetCacheablePartnerTable( TCacheablePartnerTablesEnum.PartnerTypeList); grdTypes.Columns.Clear(); grdTypes.AddTextColumn("Type", FTypesTable.Columns[PTypeTable.GetTypeCodeDBName()]); FTypesTable.DefaultView.AllowNew = false; FTypesTable.DefaultView.AllowDelete = false; for (int Counter = FTypesTable.Rows.Count - 1; Counter >= 0; --Counter) { String TypeCode = (String)FTypesTable.Rows[Counter][PTypeTable.GetTypeCodeDBName()]; // allow ORGANIZATION SPECIFIC TypeCode String[] DefaultWorkerTypes = TAppSettingsManager.GetValue("DEFAULTWORKERTYPES_STARTINGWITH", "WORKER;EX-WORKER;ASSOC", false).Split(new char[] { ';' }); bool typeInList = false; foreach (string allowedType in DefaultWorkerTypes) { if (TypeCode.StartsWith(allowedType)) { typeInList = true; } } if (!typeInList) { FTypesTable.Rows.RemoveAt(Counter); } } grdTypes.DataSource = new DevAge.ComponentModel.BoundDataView(FTypesTable.DefaultView); grdTypes.AutoSizeCells(); grdTypes.Selection.EnableMultiSelection = true; SelectTypesChanged(null, null); chkAnniversariesCheckedChanged(null, null); }
private void grdTypes_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { // Get list of commitment statuses FTypesTable = (PTypeTable)TDataCache.TMPartner.GetCacheablePartnerTable( TCacheablePartnerTablesEnum.PartnerTypeList); grdTypes.Columns.Clear(); grdTypes.AddTextColumn("Type", FTypesTable.Columns[PTypeTable.GetTypeCodeDBName()]); FTypesTable.DefaultView.AllowNew = false; FTypesTable.DefaultView.AllowDelete = false; for (int Counter = FTypesTable.Rows.Count - 1; Counter >= 0; --Counter) { String TypeCode = (String)FTypesTable.Rows[Counter][PTypeTable.GetTypeCodeDBName()]; // allow ORGANIZATION SPECIFIC TypeCode String[] DefaultWorkerTypes = TAppSettingsManager.GetValue("DEFAULTWORKERTYPES_STARTINGWITH", "WORKER;EX-WORKER;ASSOC", false).Split(new char[] { ';' }); bool typeInList = false; foreach (string allowedType in DefaultWorkerTypes) { if (TypeCode.StartsWith(allowedType)) { typeInList = true; } } if (!typeInList) { FTypesTable.Rows.RemoveAt(Counter); } } grdTypes.DataSource = new DevAge.ComponentModel.BoundDataView(FTypesTable.DefaultView); grdTypes.AutoSizeCells(); grdTypes.Selection.EnableMultiSelection = true; SelectTypesChanged(null, null); chkAnniversariesCheckedChanged(null, null); }
private void grdDocuments_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { // Get list of documents FDocumentTypeTable = (PmDocumentTypeTable)TDataCache.TMPersonnel.GetCacheablePersonnelTable( TCacheablePersonTablesEnum.DocumentTypeList); grdDocuments.Columns.Clear(); grdDocuments.AddTextColumn("Document Type", FDocumentTypeTable.Columns[PmDocumentTypeTable.GetDocCodeDBName()]); grdDocuments.AddTextColumn("Description", FDocumentTypeTable.Columns[PmDocumentTypeTable.GetDescriptionDBName()]); FDocumentTypeTable.DefaultView.AllowNew = false; FDocumentTypeTable.DefaultView.AllowDelete = false; grdDocuments.DataSource = new DevAge.ComponentModel.BoundDataView(FDocumentTypeTable.DefaultView); grdDocuments.AutoSizeCells(); grdDocuments.Selection.EnableMultiSelection = true; UseDatesChanged(null, null); }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FLedgerNumber = -1; FReportWithBalance = true; this.rbtAllAccounts.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtAccountRange.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtAccountFromList.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtAllCostCentres.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtCostCentreRange.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtCostCentreFromList.CheckedChanged += new System.EventHandler(this.LateInitialise); rbtAllAccounts.Checked = true; rbtAllCostCentres.Checked = true; /* * rbtAccountRange.Checked = true; * rbtAccountFromListCheckedChanged(null, null); * rbtCostCentreRange.Checked = true; * rbtCostCentreFromListCheckedChanged(null, null); */ }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FLedgerNumber = -1; FReportWithBalance = true; this.rbtAllAccounts.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtAccountRange.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtAccountFromList.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtAllCostCentres.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtCostCentreRange.CheckedChanged += new System.EventHandler(this.LateInitialise); this.rbtCostCentreFromList.CheckedChanged += new System.EventHandler(this.LateInitialise); rbtAllAccounts.Checked = true; rbtAllCostCentres.Checked = true; /* * rbtAccountRange.Checked = true; * rbtAccountFromListCheckedChanged(null, null); * rbtCostCentreRange.Checked = true; * rbtCostCentreFromListCheckedChanged(null, null); */ }
private void grdStatuses_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { // Get list of commitment statuses FCommitmentStatusTable = TDataCache.TMPersonnel.GetCacheablePersonnelTable( TCacheablePersonTablesEnum.CommitmentStatusList); FCommitmentStatusTable.Columns.Add("Selection", System.Type.GetType("System.Boolean")); grdStatuses.Columns.Clear(); grdStatuses.AddCheckBoxColumn("", FCommitmentStatusTable.Columns["Selection"]); grdStatuses.AddTextColumn("Status", FCommitmentStatusTable.Columns[PmCommitmentStatusTable.GetCodeDBName()]); grdStatuses.AddTextColumn("Description", FCommitmentStatusTable.Columns[PmCommitmentStatusTable.GetDescDBName()]); FCommitmentStatusTable.DefaultView.AllowNew = false; FCommitmentStatusTable.DefaultView.AllowDelete = false; grdStatuses.DataSource = new DevAge.ComponentModel.BoundDataView(FCommitmentStatusTable.DefaultView); grdStatuses.AutoSizeCells(); chkSelectedStatusChanged(null, null); }
private void grdStatuses_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { // Get list of commitment statuses FCommitmentStatusTable = TDataCache.TMPersonnel.GetCacheablePersonnelTable( TCacheablePersonTablesEnum.CommitmentStatusList); FCommitmentStatusTable.Columns.Add("Selection", System.Type.GetType("System.Boolean")); grdStatuses.Columns.Clear(); grdStatuses.AddCheckBoxColumn("", FCommitmentStatusTable.Columns["Selection"]); grdStatuses.AddTextColumn("Status", FCommitmentStatusTable.Columns[PmCommitmentStatusTable.GetCodeDBName()]); grdStatuses.AddTextColumn("Description", FCommitmentStatusTable.Columns[PmCommitmentStatusTable.GetDescDBName()]); FCommitmentStatusTable.DefaultView.AllowNew = false; FCommitmentStatusTable.DefaultView.AllowDelete = false; grdStatuses.DataSource = new DevAge.ComponentModel.BoundDataView(FCommitmentStatusTable.DefaultView); grdStatuses.AutoSizeCells(); chkSelectedStatusChanged(null, null); }
/// <summary> /// initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; txtFromMonth.NumberValueInt = 1; txtToMonth.NumberValueInt = 12; txtFromYear.NumberValueInt = DateTime.Now.Year; txtToYear.NumberValueInt = DateTime.Now.Year; FRangeTable.Columns.Add("From"); FRangeTable.Columns.Add("To"); grdRange.Columns.Clear(); grdRange.AddTextColumn(Catalog.GetString("From"), FRangeTable.Columns["From"]); grdRange.AddTextColumn(Catalog.GetString("To"), FRangeTable.Columns["To"]); grdRange.AutoResizeGrid(); DataView myDataView = FRangeTable.DefaultView; myDataView.AllowNew = false; grdRange.DataSource = new DevAge.ComponentModel.BoundDataView(myDataView); }
/// <summary> /// Call this to generate a payment report without showing the UI to the user. /// </summary> /// <param name="ALedgerNumber"></param> /// <param name="AMinPaymentNumber"></param> /// <param name="AMaxPaymentNumber"></param> /// <param name="Owner"></param> public static void CreateReportNoGui(Int32 ALedgerNumber, Int32 AMinPaymentNumber, Int32 AMaxPaymentNumber, Form Owner) { TRptCalculator Calculator = new TRptCalculator(); TFrmPetraReportingUtils.InitialiseCalculator( Calculator, "Finance/AccountsPayable/AP_PaymentReport.xml,Finance/finance.xml,common.xml", "", "APPaymentReport"); Calculator.AddParameter("param_payment_num_from_i", AMinPaymentNumber); Calculator.AddParameter("param_payment_num_to_i", AMaxPaymentNumber); /* * Calculator.AddParameter("param_payment_date_from_i", DateTime.Now); * Calculator.AddParameter("param_payment_date_to_i", DateTime.Now); */ Calculator.AddParameter("param_filter_by_date", 0); Calculator.AddParameter("param_filter_by_payment_num", 1); Calculator.AddParameter("param_ledger_number_i", ALedgerNumber); DefineReportColumns(Calculator); TFrmPetraReportingUtils.GenerateReport(Calculator, Owner, "APPaymentReport", true); }
private void grdSelection_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FSelectionTable = new PContactAttributeDetailTable(); FSelectionTable.DefaultView.AllowNew = false; FSelectionTable.DefaultView.AllowDelete = true; FSelectionTable.DefaultView.AllowEdit = false; grdSelection.Columns.Clear(); grdSelection.AddTextColumn("Attribute", FSelectionTable.ColumnContactAttributeCode); grdSelection.AddTextColumn("Detail", FSelectionTable.ColumnContactAttrDetailCode); grdSelection.AddTextColumn("Description", FSelectionTable.ColumnContactAttrDetailDescr); grdSelection.DataSource = new DevAge.ComponentModel.BoundDataView(FSelectionTable.DefaultView); grdSelection.AutoSizeCells(); grdSelection.Selection.EnableMultiSelection = true; }
private void grdChargedFields_InitialiseData(TFrmPetraReportingUtils FPetraUtilsObject) { FLastConferenceKey = long.MinValue; ucoConferenceSelection.AddConfernceKeyChangedEventHandler(this.ConferenceKeyChanged); ucoConferenceSelection.AddConferenceSelectionChangedEventHandler(this.ConferenceSelectionChanged); }
/// <summary> /// Initialisation /// </summary> public void InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { FPetraUtilsObject = APetraUtilsObject; }
private void grdDirectRelationship_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { }
private void grdDirectRelationship_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { }
private void InitManualCode() { FCurrentUser = UserInfo.GUserInfo.UserID; FPetraUtilsObject = new TFrmPetraReportingUtils(this, this, null); }
private void grdReciprocalRelationship_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { }
private void grdReciprocalRelationship_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { }
private void grdChargedFields_InitialiseData(TFrmPetraReportingUtils FPetraUtilsObject) { FLastConferenceKey = long.MinValue; ucoConferenceSelection.AddConfernceKeyChangedEventHandler(this.ConferenceKeyChanged); ucoConferenceSelection.AddConferenceSelectionChangedEventHandler(this.ConferenceSelectionChanged); }
private void grdSelectedAttributes_InitialiseData(TFrmPetraReportingUtils APetraUtilsObject) { }