protected void Page_Load(object sender, EventArgs e) { DataSet1TableAdapters.OrdersTableAdapter ta = new DataSet1TableAdapters.OrdersTableAdapter(); ta.Fill(ds.Orders); GridView1.DataSource = ds.Orders; GridView1.DataBind(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { string resourceFileName = "XtraReport1.resx"; this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand(); this.dataSet11 = new DataSet1(); this.ordersTableAdapter1 = new DataSet1TableAdapters.OrdersTableAdapter(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel1, this.xrLabel2, this.xrLabel3, this.xrLabel4 }); this.Detail.Height = 25; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // PageHeader // this.PageHeader.Height = 30; this.PageHeader.Name = "PageHeader"; this.PageHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.PageHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // PageFooter // this.PageFooter.Height = 30; this.PageFooter.Name = "PageFooter"; this.PageFooter.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.PageFooter.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // dataSet11 // this.dataSet11.DataSetName = "DataSet1"; this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // ordersTableAdapter1 // this.ordersTableAdapter1.ClearBeforeFill = true; // // xrLabel1 // this.xrLabel1.BackColor = System.Drawing.Color.LightBlue; this.xrLabel1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.OrderID") }); this.xrLabel1.Location = new System.Drawing.Point(33, 0); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel1.Size = new System.Drawing.Size(100, 25); this.xrLabel1.StylePriority.UseBackColor = false; this.xrLabel1.Text = "xrLabel1"; // // xrLabel2 // this.xrLabel2.BackColor = System.Drawing.Color.LightBlue; this.xrLabel2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.OrderDate") }); this.xrLabel2.Location = new System.Drawing.Point(150, 0); this.xrLabel2.Name = "xrLabel2"; this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel2.Size = new System.Drawing.Size(242, 25); this.xrLabel2.StylePriority.UseBackColor = false; this.xrLabel2.Text = "xrLabel2"; // // xrLabel3 // this.xrLabel3.BackColor = System.Drawing.Color.LightBlue; this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.CustomerID") }); this.xrLabel3.Location = new System.Drawing.Point(417, 0); this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel3.Size = new System.Drawing.Size(100, 25); this.xrLabel3.StylePriority.UseBackColor = false; this.xrLabel3.Text = "xrLabel3"; // // xrLabel4 // this.xrLabel4.BackColor = System.Drawing.Color.LightBlue; this.xrLabel4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.Freight") }); this.xrLabel4.Location = new System.Drawing.Point(542, 0); this.xrLabel4.Name = "xrLabel4"; this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel4.Size = new System.Drawing.Size(100, 25); this.xrLabel4.StylePriority.UseBackColor = false; this.xrLabel4.Text = "xrLabel4"; // // XtraReport1 // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.PageHeader, this.PageFooter }); this.DataAdapter = this.ordersTableAdapter1; this.DataMember = "Orders"; this.DataSource = this.dataSet11; this.Version = "9.2"; ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { string resourceFileName = "XtraReport1.resx"; this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand(); this.dataSet11 = new DataSet1(); this.ordersTableAdapter1 = new DataSet1TableAdapters.OrdersTableAdapter(); this.CustomerID = new DevExpress.XtraReports.Parameters.Parameter(); this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel(); this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand(); ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // // Detail // this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel6, this.xrLabel5, this.xrLabel4, this.xrLabel3 }); this.Detail.Height = 25; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // PageHeader // this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel1 }); this.PageHeader.Height = 42; this.PageHeader.Name = "PageHeader"; this.PageHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.PageHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // // dataSet11 // this.dataSet11.DataSetName = "DataSet1"; this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // ordersTableAdapter1 // this.ordersTableAdapter1.ClearBeforeFill = true; // // CustomerID // this.CustomerID.Name = "CustomerID"; this.CustomerID.Value = ""; // // xrLabel1 // this.xrLabel1.Font = new System.Drawing.Font("Times New Roman", 15.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.xrLabel1.Location = new System.Drawing.Point(33, 0); this.xrLabel1.Name = "xrLabel1"; this.xrLabel1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel1.Size = new System.Drawing.Size(183, 42); this.xrLabel1.StylePriority.UseFont = false; this.xrLabel1.Text = "Orders List"; // // xrLabel3 // this.xrLabel3.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.OrderID", "") }); this.xrLabel3.Location = new System.Drawing.Point(117, 0); this.xrLabel3.Name = "xrLabel3"; this.xrLabel3.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel3.Size = new System.Drawing.Size(100, 25); this.xrLabel3.Text = "xrLabel3"; // // xrLabel4 // this.xrLabel4.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.OrderDate", "") }); this.xrLabel4.Location = new System.Drawing.Point(233, 0); this.xrLabel4.Name = "xrLabel4"; this.xrLabel4.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel4.Size = new System.Drawing.Size(200, 25); this.xrLabel4.Text = "xrLabel4"; // // xrLabel5 // this.xrLabel5.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.Freight", "") }); this.xrLabel5.Location = new System.Drawing.Point(450, 0); this.xrLabel5.Name = "xrLabel5"; this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel5.Size = new System.Drawing.Size(100, 25); this.xrLabel5.Text = "xrLabel5"; // // xrLabel6 // this.xrLabel6.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "Orders.ShipRegion", "") }); this.xrLabel6.Location = new System.Drawing.Point(550, 0); this.xrLabel6.Name = "xrLabel6"; this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel6.Size = new System.Drawing.Size(100, 25); this.xrLabel6.Text = "xrLabel6"; // // xrLabel2 // this.xrLabel2.Font = new System.Drawing.Font("Times New Roman", 15.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.xrLabel2.Location = new System.Drawing.Point(33, 0); this.xrLabel2.Name = "xrLabel2"; this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel2.Size = new System.Drawing.Size(183, 42); this.xrLabel2.StylePriority.UseFont = false; this.xrLabel2.Text = "Orders List"; // // GroupFooter1 // this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel2 }); this.GroupFooter1.Height = 42; this.GroupFooter1.Name = "GroupFooter1"; // // XtraReport1 // this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.Detail, this.PageHeader, this.GroupFooter1 }); this.DataAdapter = this.ordersTableAdapter1; this.DataMember = "Orders"; this.DataSource = this.dataSet11; this.FilterString = "[CustomerID] = [Parameters.CustomerID]"; this.Parameters.AddRange(new DevExpress.XtraReports.Parameters.Parameter[] { this.CustomerID }); this.Version = "8.2"; ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); }