/// <summary>
 /// This procedure creates the colums of the DataGrid displayed
 ///
 /// </summary>
 /// <returns>void</returns>
 public void CreateColumns(TSgrdDataGrid AGrid, System.Data.DataTable ASourceTable)
 {
     this.DataGrid = AGrid;
     this.FDataGrid.AddTextColumn("Short Name",
                                  ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetPartnerShortNameDBName()], 240);
     this.FDataGrid.AddTextColumn("Partner Key",
                                  ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetPartnerKeyDBName()], 77);
     this.FDataGrid.AddTextColumn("Partner Class",
                                  ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetPartnerClassDBName()], 83);
     this.FDataGrid.AddTextColumn("Telephone",
                                  ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetTelephoneNumberDBName()], 110);
     this.FDataGrid.AddTextColumn("Location Type",
                                  ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetLocationTypeDBName()], 88);
 }
예제 #2
0
        /// <summary>
        /// This procedure creates the colums of the Persons' Locations DataGrid
        ///
        /// </summary>
        /// <returns>void</returns>
        public void CreateColumnsPersonsLocations(TSgrdDataGrid AGrid, System.Data.DataTable ASourceTable)
        {
            SourceGrid.Cells.Editors.TextBoxUITypeEditor DateEditor;
            Ict.Common.TypeConverter.TDateConverter      DateTypeConverter;
            this.DataGridPersonsLocations = AGrid;
            DateEditor = new SourceGrid.Cells.Editors.TextBoxUITypeEditor(typeof(DateTime));
            DateEditor.EditableMode  = EditableMode.None;
            DateTypeConverter        = new Ict.Common.TypeConverter.TDateConverter();
            DateEditor.TypeConverter = DateTypeConverter;
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerTable.TableId, PPartnerTable.ColumnPartnerShortNameId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetPartnerShortNameDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnPartnerKeyId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetPartnerKeyDBName()], 77);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnTelephoneNumberId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetTelephoneNumberDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnExtensionId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetExtensionDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnFaxNumberId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetFaxNumberDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnFaxExtensionId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetFaxExtensionDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnMobileNumberId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetMobileNumberDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnAlternateTelephoneId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetAlternateTelephoneDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnEmailAddressId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetEmailAddressDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnUrlId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetUrlDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnLocationTypeId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetLocationTypeDBName()], 88);
            this.FDataGridPersonsLocations.AddCheckBoxColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnSendMailId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetSendMailDBName()]);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnDateEffectiveId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetDateEffectiveDBName()], -1, null, DateEditor, null,
                null);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnDateGoodUntilId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetDateGoodUntilDBName()], -1, null, DateEditor, null,
                null);

            // this.FDataGridPersonsLocations.AddTextColumn(PartnerAddressAggregateTDSChangePromotionParametersTable.GetSiteKeyLabel(),
            // ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetSiteKeyDBName()], 77);
            this.FDataGridPersonsLocations.AddTextColumn(
                TTypedDataTable.GetLabel(PPartnerLocationTable.TableId, PPartnerLocationTable.ColumnLocationKeyId),
                ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetLocationKeyDBName()]);

            // Following Columns are for debugging only!
            // this.FDataGridPersonsLocations.AddTextColumn('Site Key Of Edited Record', ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetSiteKeyOfEditedRecordDBName()], 77);
            // this.FDataGridPersonsLocations.AddTextColumn('Location Key Of Edited Record', ASourceTable.Columns[PartnerAddressAggregateTDSChangePromotionParametersTable.GetLocationKeyOfEditedRecordDBName()]);
        }