Click here to Skip to main content
15,881,898 members
Articles / Programming Languages / C#

Modifying LINQ Expressions with Rewrite Rules

Rate me:
Please Sign up or sign in to vote.
4.98/5 (29 votes)
18 Mar 2008CPOL24 min read 75.5K   825   64  
Rewriting query expressions is a simple and yet safe and powerful technique to modify queries dynamically at runtime.
namespace RewriteDemo {
    partial class Form1 {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose( bool disposing ) {
            if( disposing && ( components != null ) ) {
                components.Dispose();
            }
            base.Dispose( disposing );
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent() {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.cboSortYear = new System.Windows.Forms.ComboBox();
            this.label8 = new System.Windows.Forms.Label();
            this.chkSortDir2 = new System.Windows.Forms.CheckBox();
            this.label6 = new System.Windows.Forms.Label();
            this.cboSort2 = new System.Windows.Forms.ComboBox();
            this.chkSortDir1 = new System.Windows.Forms.CheckBox();
            this.label5 = new System.Windows.Forms.Label();
            this.btnSortRead = new System.Windows.Forms.Button();
            this.cboSort1 = new System.Windows.Forms.ComboBox();
            this.panelWhere = new System.Windows.Forms.Panel();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.chkNot = new System.Windows.Forms.CheckBox();
            this.rbOr = new System.Windows.Forms.RadioButton();
            this.rbAnd = new System.Windows.Forms.RadioButton();
            this.cboWhereProp1 = new System.Windows.Forms.ComboBox();
            this.cboWhereProp2 = new System.Windows.Forms.ComboBox();
            this.txtWhereValue2 = new System.Windows.Forms.TextBox();
            this.cboWhereCompareOp2 = new System.Windows.Forms.ComboBox();
            this.txtWhereValue1 = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.label12 = new System.Windows.Forms.Label();
            this.label11 = new System.Windows.Forms.Label();
            this.cboWhereCompareOp1 = new System.Windows.Forms.ComboBox();
            this.label13 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label10 = new System.Windows.Forms.Label();
            this.txtWhereOrderNo = new System.Windows.Forms.TextBox();
            this.label9 = new System.Windows.Forms.Label();
            this.cboYears = new System.Windows.Forms.ComboBox();
            this.label4 = new System.Windows.Forms.Label();
            this.txtWhereCity = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.customerDataGridView = new System.Windows.Forms.DataGridView();
            this.ordersNoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.customerIDDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.companyNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.addressDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.cityDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.regionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.countryDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.customerBindingSource = new System.Windows.Forms.BindingSource(this.components);
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.txtWhereQuery = new System.Windows.Forms.TextBox();
            this.panelOrderBy = new System.Windows.Forms.Panel();
            this.customerBindingNavigator = new System.Windows.Forms.BindingNavigator(this.components);
            this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
            this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
            this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
            this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this.customerBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton();
            this.panelWhere.SuspendLayout();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.customerDataGridView)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.customerBindingSource)).BeginInit();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            this.panelOrderBy.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.customerBindingNavigator)).BeginInit();
            this.customerBindingNavigator.SuspendLayout();
            this.SuspendLayout();
            // 
            // cboSortYear
            // 
            this.cboSortYear.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboSortYear.FormattingEnabled = true;
            this.cboSortYear.Items.AddRange(new object[] {
            "",
            "1996",
            "1997",
            "1998"});
            this.cboSortYear.Location = new System.Drawing.Point(173, 66);
            this.cboSortYear.Name = "cboSortYear";
            this.cboSortYear.Size = new System.Drawing.Size(87, 21);
            this.cboSortYear.TabIndex = 11;
            // 
            // label8
            // 
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(8, 70);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(163, 13);
            this.label8.TabIndex = 10;
            this.label8.Text = "Sort by Order.Count in Year";
            // 
            // chkSortDir2
            // 
            this.chkSortDir2.AutoSize = true;
            this.chkSortDir2.Checked = true;
            this.chkSortDir2.CheckState = System.Windows.Forms.CheckState.Checked;
            this.chkSortDir2.Location = new System.Drawing.Point(280, 41);
            this.chkSortDir2.Name = "chkSortDir2";
            this.chkSortDir2.Size = new System.Drawing.Size(85, 17);
            this.chkSortDir2.TabIndex = 6;
            this.chkSortDir2.Text = "Ascending";
            this.chkSortDir2.UseVisualStyleBackColor = true;
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(8, 42);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(62, 13);
            this.label6.TabIndex = 5;
            this.label6.Text = "SortKey 2";
            // 
            // cboSort2
            // 
            this.cboSort2.DisplayMember = "Name";
            this.cboSort2.FormattingEnabled = true;
            this.cboSort2.Location = new System.Drawing.Point(79, 39);
            this.cboSort2.Name = "cboSort2";
            this.cboSort2.Size = new System.Drawing.Size(181, 21);
            this.cboSort2.TabIndex = 4;
            // 
            // chkSortDir1
            // 
            this.chkSortDir1.AutoSize = true;
            this.chkSortDir1.Checked = true;
            this.chkSortDir1.CheckState = System.Windows.Forms.CheckState.Checked;
            this.chkSortDir1.Location = new System.Drawing.Point(280, 14);
            this.chkSortDir1.Name = "chkSortDir1";
            this.chkSortDir1.Size = new System.Drawing.Size(85, 17);
            this.chkSortDir1.TabIndex = 3;
            this.chkSortDir1.Text = "Ascending";
            this.chkSortDir1.UseVisualStyleBackColor = true;
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(8, 15);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(62, 13);
            this.label5.TabIndex = 2;
            this.label5.Text = "SortKey 1";
            // 
            // btnSortRead
            // 
            this.btnSortRead.Location = new System.Drawing.Point(467, 64);
            this.btnSortRead.Name = "btnSortRead";
            this.btnSortRead.Size = new System.Drawing.Size(75, 23);
            this.btnSortRead.TabIndex = 1;
            this.btnSortRead.Text = "Read";
            this.btnSortRead.UseVisualStyleBackColor = true;
            this.btnSortRead.Click += new System.EventHandler(this.btnSortRead_Click);
            // 
            // cboSort1
            // 
            this.cboSort1.DisplayMember = "Name";
            this.cboSort1.FormattingEnabled = true;
            this.cboSort1.Location = new System.Drawing.Point(79, 12);
            this.cboSort1.Name = "cboSort1";
            this.cboSort1.Size = new System.Drawing.Size(181, 21);
            this.cboSort1.TabIndex = 0;
            // 
            // panelWhere
            // 
            this.panelWhere.BackColor = System.Drawing.SystemColors.ControlLight;
            this.panelWhere.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panelWhere.Controls.Add(this.groupBox1);
            this.panelWhere.Controls.Add(this.label10);
            this.panelWhere.Controls.Add(this.txtWhereOrderNo);
            this.panelWhere.Controls.Add(this.label9);
            this.panelWhere.Controls.Add(this.cboYears);
            this.panelWhere.Controls.Add(this.label4);
            this.panelWhere.Controls.Add(this.txtWhereCity);
            this.panelWhere.Controls.Add(this.label1);
            this.panelWhere.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelWhere.Location = new System.Drawing.Point(0, 0);
            this.panelWhere.Name = "panelWhere";
            this.panelWhere.Size = new System.Drawing.Size(592, 122);
            this.panelWhere.TabIndex = 0;
            // 
            // groupBox1
            // 
            this.groupBox1.BackColor = System.Drawing.SystemColors.ControlLight;
            this.groupBox1.Controls.Add(this.chkNot);
            this.groupBox1.Controls.Add(this.rbOr);
            this.groupBox1.Controls.Add(this.rbAnd);
            this.groupBox1.Controls.Add(this.cboWhereProp1);
            this.groupBox1.Controls.Add(this.cboWhereProp2);
            this.groupBox1.Controls.Add(this.txtWhereValue2);
            this.groupBox1.Controls.Add(this.cboWhereCompareOp2);
            this.groupBox1.Controls.Add(this.txtWhereValue1);
            this.groupBox1.Controls.Add(this.label3);
            this.groupBox1.Controls.Add(this.label12);
            this.groupBox1.Controls.Add(this.label11);
            this.groupBox1.Controls.Add(this.cboWhereCompareOp1);
            this.groupBox1.Controls.Add(this.label13);
            this.groupBox1.Controls.Add(this.label2);
            this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.groupBox1.Location = new System.Drawing.Point(0, 37);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(590, 83);
            this.groupBox1.TabIndex = 17;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Generic Filters";
            // 
            // chkNot
            // 
            this.chkNot.AutoSize = true;
            this.chkNot.Location = new System.Drawing.Point(520, 47);
            this.chkNot.Name = "chkNot";
            this.chkNot.Size = new System.Drawing.Size(46, 17);
            this.chkNot.TabIndex = 26;
            this.chkNot.Text = "Not";
            this.chkNot.UseVisualStyleBackColor = true;
            // 
            // rbOr
            // 
            this.rbOr.AutoSize = true;
            this.rbOr.Location = new System.Drawing.Point(451, 58);
            this.rbOr.Name = "rbOr";
            this.rbOr.Size = new System.Drawing.Size(38, 17);
            this.rbOr.TabIndex = 25;
            this.rbOr.Text = "Or";
            this.rbOr.UseVisualStyleBackColor = true;
            // 
            // rbAnd
            // 
            this.rbAnd.AutoSize = true;
            this.rbAnd.Checked = true;
            this.rbAnd.Location = new System.Drawing.Point(451, 35);
            this.rbAnd.Name = "rbAnd";
            this.rbAnd.Size = new System.Drawing.Size(47, 17);
            this.rbAnd.TabIndex = 25;
            this.rbAnd.TabStop = true;
            this.rbAnd.Text = "And";
            this.rbAnd.UseVisualStyleBackColor = true;
            // 
            // cboWhereProp1
            // 
            this.cboWhereProp1.DisplayMember = "Name";
            this.cboWhereProp1.FormattingEnabled = true;
            this.cboWhereProp1.Location = new System.Drawing.Point(8, 34);
            this.cboWhereProp1.Name = "cboWhereProp1";
            this.cboWhereProp1.Size = new System.Drawing.Size(112, 21);
            this.cboWhereProp1.TabIndex = 23;
            this.cboWhereProp1.SelectedIndexChanged += new System.EventHandler(this.cboWhereProp1_SelectedIndexChanged);
            // 
            // cboWhereProp2
            // 
            this.cboWhereProp2.DisplayMember = "Name";
            this.cboWhereProp2.FormattingEnabled = true;
            this.cboWhereProp2.Location = new System.Drawing.Point(8, 59);
            this.cboWhereProp2.Name = "cboWhereProp2";
            this.cboWhereProp2.Size = new System.Drawing.Size(111, 21);
            this.cboWhereProp2.TabIndex = 22;
            this.cboWhereProp2.SelectedIndexChanged += new System.EventHandler(this.cboWhereProp2_SelectedIndexChanged);
            // 
            // txtWhereValue2
            // 
            this.txtWhereValue2.Location = new System.Drawing.Point(292, 57);
            this.txtWhereValue2.Name = "txtWhereValue2";
            this.txtWhereValue2.Size = new System.Drawing.Size(136, 20);
            this.txtWhereValue2.TabIndex = 21;
            // 
            // cboWhereCompareOp2
            // 
            this.cboWhereCompareOp2.FormattingEnabled = true;
            this.cboWhereCompareOp2.Location = new System.Drawing.Point(125, 57);
            this.cboWhereCompareOp2.Name = "cboWhereCompareOp2";
            this.cboWhereCompareOp2.Size = new System.Drawing.Size(161, 21);
            this.cboWhereCompareOp2.TabIndex = 20;
            // 
            // txtWhereValue1
            // 
            this.txtWhereValue1.Location = new System.Drawing.Point(293, 33);
            this.txtWhereValue1.Name = "txtWhereValue1";
            this.txtWhereValue1.Size = new System.Drawing.Size(135, 20);
            this.txtWhereValue1.TabIndex = 18;
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(8, 17);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(54, 13);
            this.label3.TabIndex = 14;
            this.label3.Text = "Property";
            // 
            // label12
            // 
            this.label12.AutoSize = true;
            this.label12.Location = new System.Drawing.Point(292, 17);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(39, 13);
            this.label12.TabIndex = 16;
            this.label12.Text = "Value";
            // 
            // label11
            // 
            this.label11.AutoSize = true;
            this.label11.Location = new System.Drawing.Point(125, 17);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(76, 13);
            this.label11.TabIndex = 15;
            this.label11.Text = "Compare Op";
            // 
            // cboWhereCompareOp1
            // 
            this.cboWhereCompareOp1.FormattingEnabled = true;
            this.cboWhereCompareOp1.Items.AddRange(new object[] {
            "",
            "=",
            "!=",
            ">",
            ">=",
            "<",
            "<="});
            this.cboWhereCompareOp1.Location = new System.Drawing.Point(126, 33);
            this.cboWhereCompareOp1.Name = "cboWhereCompareOp1";
            this.cboWhereCompareOp1.Size = new System.Drawing.Size(160, 21);
            this.cboWhereCompareOp1.TabIndex = 8;
            // 
            // label13
            // 
            this.label13.AutoSize = true;
            this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 32F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label13.Location = new System.Drawing.Point(493, 25);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(35, 51);
            this.label13.TabIndex = 24;
            this.label13.Text = "]";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 32F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.Location = new System.Drawing.Point(425, 25);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(35, 51);
            this.label2.TabIndex = 24;
            this.label2.Text = "]";
            // 
            // label10
            // 
            this.label10.AutoSize = true;
            this.label10.Location = new System.Drawing.Point(525, 12);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(42, 13);
            this.label10.TabIndex = 13;
            this.label10.Text = "orders";
            // 
            // txtWhereOrderNo
            // 
            this.txtWhereOrderNo.Location = new System.Drawing.Point(479, 9);
            this.txtWhereOrderNo.Name = "txtWhereOrderNo";
            this.txtWhereOrderNo.Size = new System.Drawing.Size(42, 20);
            this.txtWhereOrderNo.TabIndex = 12;
            // 
            // label9
            // 
            this.label9.AutoSize = true;
            this.label9.Location = new System.Drawing.Point(427, 12);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(53, 13);
            this.label9.TabIndex = 11;
            this.label9.Text = "at least ";
            // 
            // cboYears
            // 
            this.cboYears.FormattingEnabled = true;
            this.cboYears.Location = new System.Drawing.Point(338, 9);
            this.cboYears.Name = "cboYears";
            this.cboYears.Size = new System.Drawing.Size(83, 21);
            this.cboYears.TabIndex = 10;
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(291, 12);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(43, 13);
            this.label4.TabIndex = 9;
            this.label4.Text = "Has in";
            // 
            // txtWhereCity
            // 
            this.txtWhereCity.Location = new System.Drawing.Point(149, 9);
            this.txtWhereCity.Name = "txtWhereCity";
            this.txtWhereCity.Size = new System.Drawing.Size(76, 20);
            this.txtWhereCity.TabIndex = 3;
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(15, 12);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(130, 13);
            this.label1.TabIndex = 2;
            this.label1.Text = "City (ignore case like)";
            // 
            // customerDataGridView
            // 
            this.customerDataGridView.AutoGenerateColumns = false;
            this.customerDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.customerDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.ordersNoDataGridViewTextBoxColumn,
            this.customerIDDataGridViewTextBoxColumn,
            this.companyNameDataGridViewTextBoxColumn,
            this.addressDataGridViewTextBoxColumn,
            this.cityDataGridViewTextBoxColumn,
            this.regionDataGridViewTextBoxColumn,
            this.countryDataGridViewTextBoxColumn});
            this.customerDataGridView.DataSource = this.customerBindingSource;
            this.customerDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.customerDataGridView.Location = new System.Drawing.Point(0, 0);
            this.customerDataGridView.Name = "customerDataGridView";
            this.customerDataGridView.Size = new System.Drawing.Size(592, 145);
            this.customerDataGridView.TabIndex = 1;
            // 
            // ordersNoDataGridViewTextBoxColumn
            // 
            this.ordersNoDataGridViewTextBoxColumn.DataPropertyName = "OrdersNo";
            this.ordersNoDataGridViewTextBoxColumn.HeaderText = "OrdersNo";
            this.ordersNoDataGridViewTextBoxColumn.Name = "ordersNoDataGridViewTextBoxColumn";
            // 
            // customerIDDataGridViewTextBoxColumn
            // 
            this.customerIDDataGridViewTextBoxColumn.DataPropertyName = "CustomerID";
            this.customerIDDataGridViewTextBoxColumn.HeaderText = "CustomerID";
            this.customerIDDataGridViewTextBoxColumn.Name = "customerIDDataGridViewTextBoxColumn";
            // 
            // companyNameDataGridViewTextBoxColumn
            // 
            this.companyNameDataGridViewTextBoxColumn.DataPropertyName = "CompanyName";
            this.companyNameDataGridViewTextBoxColumn.HeaderText = "CompanyName";
            this.companyNameDataGridViewTextBoxColumn.Name = "companyNameDataGridViewTextBoxColumn";
            // 
            // addressDataGridViewTextBoxColumn
            // 
            this.addressDataGridViewTextBoxColumn.DataPropertyName = "Address";
            this.addressDataGridViewTextBoxColumn.HeaderText = "Address";
            this.addressDataGridViewTextBoxColumn.Name = "addressDataGridViewTextBoxColumn";
            // 
            // cityDataGridViewTextBoxColumn
            // 
            this.cityDataGridViewTextBoxColumn.DataPropertyName = "City";
            this.cityDataGridViewTextBoxColumn.HeaderText = "City";
            this.cityDataGridViewTextBoxColumn.Name = "cityDataGridViewTextBoxColumn";
            // 
            // regionDataGridViewTextBoxColumn
            // 
            this.regionDataGridViewTextBoxColumn.DataPropertyName = "Region";
            this.regionDataGridViewTextBoxColumn.HeaderText = "Region";
            this.regionDataGridViewTextBoxColumn.Name = "regionDataGridViewTextBoxColumn";
            // 
            // countryDataGridViewTextBoxColumn
            // 
            this.countryDataGridViewTextBoxColumn.DataPropertyName = "Country";
            this.countryDataGridViewTextBoxColumn.HeaderText = "Country";
            this.countryDataGridViewTextBoxColumn.Name = "countryDataGridViewTextBoxColumn";
            // 
            // customerBindingSource
            // 
            this.customerBindingSource.DataSource = typeof(RewriteDemo.CustomerExt);
            // 
            // splitContainer1
            // 
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer1.Location = new System.Drawing.Point(0, 0);
            this.splitContainer1.Name = "splitContainer1";
            this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
            // 
            // splitContainer1.Panel1
            // 
            this.splitContainer1.Panel1.Controls.Add(this.txtWhereQuery);
            this.splitContainer1.Panel1.Controls.Add(this.panelOrderBy);
            this.splitContainer1.Panel1.Controls.Add(this.panelWhere);
            this.splitContainer1.Panel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            // 
            // splitContainer1.Panel2
            // 
            this.splitContainer1.Panel2.Controls.Add(this.customerDataGridView);
            this.splitContainer1.Panel2.Controls.Add(this.customerBindingNavigator);
            this.splitContainer1.Size = new System.Drawing.Size(592, 465);
            this.splitContainer1.SplitterDistance = 291;
            this.splitContainer1.TabIndex = 2;
            // 
            // txtWhereQuery
            // 
            this.txtWhereQuery.Dock = System.Windows.Forms.DockStyle.Fill;
            this.txtWhereQuery.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtWhereQuery.Location = new System.Drawing.Point(0, 215);
            this.txtWhereQuery.Multiline = true;
            this.txtWhereQuery.Name = "txtWhereQuery";
            this.txtWhereQuery.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.txtWhereQuery.Size = new System.Drawing.Size(592, 76);
            this.txtWhereQuery.TabIndex = 0;
            // 
            // panelOrderBy
            // 
            this.panelOrderBy.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panelOrderBy.Controls.Add(this.cboSort1);
            this.panelOrderBy.Controls.Add(this.cboSortYear);
            this.panelOrderBy.Controls.Add(this.chkSortDir1);
            this.panelOrderBy.Controls.Add(this.btnSortRead);
            this.panelOrderBy.Controls.Add(this.label8);
            this.panelOrderBy.Controls.Add(this.cboSort2);
            this.panelOrderBy.Controls.Add(this.label5);
            this.panelOrderBy.Controls.Add(this.chkSortDir2);
            this.panelOrderBy.Controls.Add(this.label6);
            this.panelOrderBy.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelOrderBy.Location = new System.Drawing.Point(0, 122);
            this.panelOrderBy.Name = "panelOrderBy";
            this.panelOrderBy.Size = new System.Drawing.Size(592, 93);
            this.panelOrderBy.TabIndex = 12;
            // 
            // customerBindingNavigator
            // 
            this.customerBindingNavigator.AddNewItem = this.bindingNavigatorAddNewItem;
            this.customerBindingNavigator.CountItem = this.bindingNavigatorCountItem;
            this.customerBindingNavigator.DeleteItem = this.bindingNavigatorDeleteItem;
            this.customerBindingNavigator.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.customerBindingNavigator.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.bindingNavigatorMoveFirstItem,
            this.bindingNavigatorMovePreviousItem,
            this.bindingNavigatorSeparator,
            this.bindingNavigatorPositionItem,
            this.bindingNavigatorCountItem,
            this.bindingNavigatorSeparator1,
            this.bindingNavigatorMoveNextItem,
            this.bindingNavigatorMoveLastItem,
            this.bindingNavigatorSeparator2,
            this.bindingNavigatorAddNewItem,
            this.bindingNavigatorDeleteItem,
            this.customerBindingNavigatorSaveItem});
            this.customerBindingNavigator.Location = new System.Drawing.Point(0, 145);
            this.customerBindingNavigator.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
            this.customerBindingNavigator.MoveLastItem = this.bindingNavigatorMoveLastItem;
            this.customerBindingNavigator.MoveNextItem = this.bindingNavigatorMoveNextItem;
            this.customerBindingNavigator.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
            this.customerBindingNavigator.Name = "customerBindingNavigator";
            this.customerBindingNavigator.PositionItem = this.bindingNavigatorPositionItem;
            this.customerBindingNavigator.Size = new System.Drawing.Size(592, 25);
            this.customerBindingNavigator.TabIndex = 1;
            this.customerBindingNavigator.Text = "bindingNavigator1";
            // 
            // bindingNavigatorAddNewItem
            // 
            this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
            this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
            this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorAddNewItem.Text = "Add new";
            // 
            // bindingNavigatorCountItem
            // 
            this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
            this.bindingNavigatorCountItem.Size = new System.Drawing.Size(36, 22);
            this.bindingNavigatorCountItem.Text = "of {0}";
            this.bindingNavigatorCountItem.ToolTipText = "Total number of items";
            // 
            // bindingNavigatorDeleteItem
            // 
            this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
            this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
            this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorDeleteItem.Text = "Delete";
            // 
            // bindingNavigatorMoveFirstItem
            // 
            this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
            this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
            this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMoveFirstItem.Text = "Move first";
            // 
            // bindingNavigatorMovePreviousItem
            // 
            this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
            this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
            this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMovePreviousItem.Text = "Move previous";
            // 
            // bindingNavigatorSeparator
            // 
            this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
            this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
            // 
            // bindingNavigatorPositionItem
            // 
            this.bindingNavigatorPositionItem.AccessibleName = "Position";
            this.bindingNavigatorPositionItem.AutoSize = false;
            this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
            this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 21);
            this.bindingNavigatorPositionItem.Text = "0";
            this.bindingNavigatorPositionItem.ToolTipText = "Current position";
            // 
            // bindingNavigatorSeparator1
            // 
            this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
            this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
            // 
            // bindingNavigatorMoveNextItem
            // 
            this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
            this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
            this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMoveNextItem.Text = "Move next";
            // 
            // bindingNavigatorMoveLastItem
            // 
            this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
            this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
            this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMoveLastItem.Text = "Move last";
            // 
            // bindingNavigatorSeparator2
            // 
            this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
            this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
            // 
            // customerBindingNavigatorSaveItem
            // 
            this.customerBindingNavigatorSaveItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.customerBindingNavigatorSaveItem.Enabled = false;
            this.customerBindingNavigatorSaveItem.Image = ((System.Drawing.Image)(resources.GetObject("customerBindingNavigatorSaveItem.Image")));
            this.customerBindingNavigatorSaveItem.Name = "customerBindingNavigatorSaveItem";
            this.customerBindingNavigatorSaveItem.Size = new System.Drawing.Size(23, 22);
            this.customerBindingNavigatorSaveItem.Text = "Save Data";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(592, 465);
            this.Controls.Add(this.splitContainer1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.panelWhere.ResumeLayout(false);
            this.panelWhere.PerformLayout();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.customerDataGridView)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.customerBindingSource)).EndInit();
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel1.PerformLayout();
            this.splitContainer1.Panel2.ResumeLayout(false);
            this.splitContainer1.Panel2.PerformLayout();
            this.splitContainer1.ResumeLayout(false);
            this.panelOrderBy.ResumeLayout(false);
            this.panelOrderBy.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.customerBindingNavigator)).EndInit();
            this.customerBindingNavigator.ResumeLayout(false);
            this.customerBindingNavigator.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Panel panelWhere;
        private System.Windows.Forms.DataGridView customerDataGridView;
        private System.Windows.Forms.BindingSource customerBindingSource;
        private System.Windows.Forms.TextBox txtWhereCity;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.SplitContainer splitContainer1;
        private System.Windows.Forms.TextBox txtWhereQuery;
        private System.Windows.Forms.ComboBox cboWhereCompareOp1;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
        private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
        private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
        private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
        private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
        private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
        private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
        private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
        private System.Windows.Forms.ToolStripButton customerBindingNavigatorSaveItem;
        private System.Windows.Forms.BindingNavigator customerBindingNavigator;
        private System.Windows.Forms.Button btnSortRead;
        private System.Windows.Forms.ComboBox cboSort1;
        private System.Windows.Forms.CheckBox chkSortDir2;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.ComboBox cboSort2;
        private System.Windows.Forms.CheckBox chkSortDir1;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.ComboBox cboSortYear;
        private System.Windows.Forms.Label label8;
        private System.Windows.Forms.ComboBox cboYears;
        private System.Windows.Forms.Label label10;
        private System.Windows.Forms.TextBox txtWhereOrderNo;
        private System.Windows.Forms.Label label9;
        private System.Windows.Forms.Label label12;
        private System.Windows.Forms.Label label11;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.TextBox txtWhereValue1;
        private System.Windows.Forms.TextBox txtWhereValue2;
        private System.Windows.Forms.ComboBox cboWhereCompareOp2;
        private System.Windows.Forms.ComboBox cboWhereProp2;
        private System.Windows.Forms.ComboBox cboWhereProp1;
        private System.Windows.Forms.DataGridViewTextBoxColumn ordersNoDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn customerIDDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn companyNameDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn addressDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn cityDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn regionDataGridViewTextBoxColumn;
        private System.Windows.Forms.DataGridViewTextBoxColumn countryDataGridViewTextBoxColumn;
        private System.Windows.Forms.RadioButton rbOr;
        private System.Windows.Forms.RadioButton rbAnd;
        private System.Windows.Forms.Label label13;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.CheckBox chkNot;
        private System.Windows.Forms.Panel panelOrderBy;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions