//private ICollection<TablaTest> registros; public MainWindow() { InitializeComponent(); TestDS ds = new TestDS(); TablaTestTableAdapter adapter = new TablaTestTableAdapter(); adapter.Fill(ds.TablaTest); TablaTestGrid.ItemsSource = ds.TablaTest.DefaultView; }
public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // hobBindingComponent1.DocumentID = new Guid("b7852efc-e7ac-431b-8b42-d9d3032a55b6"); myDataSet = new TestDS(); myDataSet.MultiControl_ListView.Columns["uiRowID"].DefaultValue = Guid.Empty; myDataSet.ListView.Columns["uiRowID"].DefaultValue = Guid.Empty; myDataSet.Paging.Columns["uiRowID"].DefaultValue = Guid.Empty; myDataSet.PagingListView.Columns["uiRowID"].DefaultValue = Guid.Empty; myDataSet.PagingMulti_ListView.Columns["uiRowID"].DefaultValue = Guid.Empty; }
private void InitializeComponent() { string resourceFileName = "TestReport.resx"; this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand(); this.detailBand1 = new DevExpress.XtraReports.UI.DetailBand(); this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand(); this.testDS1 = new TestDS(); this.testTableAdapter1 = new TestDSTableAdapters.TestTableAdapter(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); this.xrTable1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTable2 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); ((System.ComponentModel.ISupportInitialize)(this.testDS1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // topMarginBand1 // this.topMarginBand1.HeightF = 100F; this.topMarginBand1.Name = "topMarginBand1"; // // detailBand1 // this.detailBand1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable2 }); this.detailBand1.HeightF = 26.38889F; this.detailBand1.Name = "detailBand1"; // // bottomMarginBand1 // this.bottomMarginBand1.HeightF = 100F; this.bottomMarginBand1.Name = "bottomMarginBand1"; // // testDS1 // this.testDS1.DataSetName = "TestDS"; this.testDS1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // testTableAdapter1 // this.testTableAdapter1.ClearBeforeFill = true; // // ReportHeader // this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel1 }); this.ReportHeader.HeightF = 100F; this.ReportHeader.Name = "ReportHeader"; // // xrLabel1 // this.xrLabel1.Font = new System.Drawing.Font("Times New Roman", 20F); this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(268.0555F, 63.80556F); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 144F); this.xrLabel1.SizeF = new System.Drawing.SizeF(157.6389F, 36.19445F); this.xrLabel1.StylePriority.UseFont = false; this.xrLabel1.StylePriority.UseTextAlignment = false; this.xrLabel1.Text = "表头"; this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter; // // PageHeader // this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable1 }); this.PageHeader.HeightF = 35.41667F; this.PageHeader.Name = "PageHeader"; // // xrTable1 // this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(185.4167F, 10F); this.xrTable1.Name = "xrTable1"; this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow1 }); this.xrTable1.SizeF = new System.Drawing.SizeF(300F, 25F); // // xrTableRow1 // this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { this.xrTableCell1, this.xrTableCell2, this.xrTableCell3 }); this.xrTableRow1.Name = "xrTableRow1"; this.xrTableRow1.Weight = 1D; // // xrTableCell1 // this.xrTableCell1.Name = "xrTableCell1"; this.xrTableCell1.Text = "姓名"; this.xrTableCell1.Weight = 1D; // // xrTableCell2 // this.xrTableCell2.Name = "xrTableCell2"; this.xrTableCell2.Text = "专业"; this.xrTableCell2.Weight = 1D; // // xrTableCell3 // this.xrTableCell3.Name = "xrTableCell3"; this.xrTableCell3.Text = "密码"; this.xrTableCell3.Weight = 1D; // // xrTable2 // this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(185.4167F, 0F); this.xrTable2.Name = "xrTable2"; this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow2 }); this.xrTable2.SizeF = new System.Drawing.SizeF(300F, 25F); // // xrTableRow2 // this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { this.xrTableCell4, this.xrTableCell5, this.xrTableCell6 }); this.xrTableRow2.Name = "xrTableRow2"; this.xrTableRow2.Weight = 1D; // // xrTableCell4 // this.xrTableCell4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Test.Name") }); this.xrTableCell4.Name = "xrTableCell4"; this.xrTableCell4.Text = "123"; this.xrTableCell4.Weight = 1D; // // xrTableCell5 // this.xrTableCell5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Test.Profession") }); this.xrTableCell5.Name = "xrTableCell5"; this.xrTableCell5.Weight = 1D; // // xrTableCell6 // this.xrTableCell6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Test.Password") }); this.xrTableCell6.Name = "xrTableCell6"; this.xrTableCell6.Weight = 1D; // // TestReport // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.topMarginBand1, this.detailBand1, this.bottomMarginBand1, this.ReportHeader, this.PageHeader }); this.DataAdapter = this.testTableAdapter1; this.DataMember = "Test"; this.DataSource = this.testDS1; this.Version = "14.1"; ((System.ComponentModel.ISupportInitialize)(this.testDS1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }