private void PrintGrid(TStandardFormPrint.TPrintUsing APrintApplication, bool APreviewMode) { TFormDataKeyDescriptionList recordList = new TFormDataKeyDescriptionList(); DataView FieldOrderView = new DataView(FMainDS.PDataLabelUse); FieldOrderView.RowFilter = String.Format("p_use_c = '{0}'", Context); recordList.Title = "Local Data Field Order For " + Context; String Key = Catalog.GetString("Name"); String Descr = Catalog.GetString("GroupHeading"); String Field3 = Catalog.GetString("Description"); recordList.KeyTitle = Key; recordList.DescriptionTitle = Descr; recordList.Field3Title = Field3; foreach (DataRowView FieldOrderViewRow in FieldOrderView) { TFormDataKeyDescription record = new TFormDataKeyDescription(); record.Key = FieldOrderViewRow[Key].ToString(); record.Description = FieldOrderViewRow[Descr].ToString(); record.Field3 = FieldOrderViewRow[Field3].ToString(); recordList.Add(record); } TStandardFormPrint.PrintRecordList(recordList, 3, APrintApplication, FieldOrderView.Count, FieldOrderView, "", APreviewMode); }
private void PrintGrid(TStandardFormPrint.TPrintUsing APrintApplication, bool APreviewMode) { PPartnerAttributeTypeTable typeTable = (PPartnerAttributeTypeTable)TDataCache.TMPartner. GetCacheablePartnerTable(TCacheablePartnerTablesEnum.ContactTypeList); DataView typeDataView = new DataView(typeTable); typeDataView.Sort = PPartnerAttributeTypeTable.GetCategoryCodeDBName(); TFormDataKeyDescriptionList recordList = new TFormDataKeyDescriptionList(); recordList.Title = "Contact Categories and Types"; recordList.KeyTitle = Catalog.GetString("Contact Category"); recordList.DescriptionTitle = Catalog.GetString("Contact Type"); recordList.Field3Title = Catalog.GetString("Description"); PPartnerAttributeTypeRow typeRow; foreach (DataRowView typeRowView in typeDataView) { TFormDataKeyDescription record = new TFormDataKeyDescription(); typeRow = (PPartnerAttributeTypeRow)typeRowView.Row; record.Key = typeRow.CategoryCode; record.Description = typeRow.AttributeType; record.Field3 = typeRow.Description; recordList.Add(record); } TStandardFormPrint.PrintRecordList(recordList, 3, APrintApplication, typeDataView.Count, typeDataView, "", APreviewMode); }
private void PrintGrid(TStandardFormPrint.TPrintUsing APrintApplication, bool APreviewMode) { DataView EsrDataView = new DataView(TRemote.MFinance.Gift.WebConnectors.GetEsrDefaults()); TFormDataKeyDescriptionList recordList = new TFormDataKeyDescriptionList(); recordList.Title = "ESR Defaults"; recordList.KeyTitle = Catalog.GetString("ESR Key"); recordList.DescriptionTitle = Catalog.GetString("Substitute"); recordList.Field3Title = Catalog.GetString("Motivation Group"); recordList.Field4Title = Catalog.GetString("Motivation Detail"); foreach (DataRowView typeRowView in EsrDataView) { TFormDataKeyDescription record = new TFormDataKeyDescription(); record.Key = typeRowView[0].ToString(); record.Description = typeRowView[1].ToString(); record.Field3 = typeRowView[2].ToString(); record.Field4 = typeRowView[3].ToString(); recordList.Add(record); } TStandardFormPrint.PrintRecordList(recordList, 4, APrintApplication, EsrDataView.Count, EsrDataView, "", APreviewMode); }
private void PrintGrid(TStandardFormPrint.TPrintUsing APrintApplication, bool APreviewMode) { if (MessageBox.Show(this, Catalog.GetString("You are about to print a combined table of regions and ranges. Do you want to proceed?"), Catalog.GetString("Printing"), MessageBoxButtons.OKCancel) == DialogResult.OK) { DataTable RegionsAndRangesTable = TRemote.MPartner.Mailroom.WebConnectors.GetPostCodeRegionsAndRanges(); DataView regionsAndRangesDataView = new DataView(RegionsAndRangesTable); TFormDataKeyDescriptionList recordList = new TFormDataKeyDescriptionList(); recordList.Title = "Regions and Ranges"; recordList.KeyTitle = Catalog.GetString("Region"); recordList.DescriptionTitle = Catalog.GetString("Region Description"); recordList.Field3Title = Catalog.GetString("Range"); recordList.Field4Title = Catalog.GetString("From"); recordList.Field5Title = Catalog.GetString("To"); foreach (DataRowView typeRowView in regionsAndRangesDataView) { TFormDataKeyDescription record = new TFormDataKeyDescription(); record.Key = typeRowView[0].ToString(); record.Description = typeRowView[1].ToString(); record.Field3 = typeRowView[2].ToString(); record.Field4 = typeRowView[3].ToString(); record.Field5 = typeRowView[4].ToString(); recordList.Add(record); } TStandardFormPrint.PrintRecordList(recordList, 5, APrintApplication, regionsAndRangesDataView.Count, regionsAndRangesDataView, "", APreviewMode); } }