Click here to Skip to main content
15,893,486 members
Articles / Programming Languages / C#

DLINQ Introduction Part 2 Of 3

Rate me:
Please Sign up or sign in to vote.
4.75/5 (69 votes)
16 Apr 2007CPOL26 min read 223.8K   1.3K   194  
An introduction to LINQ
namespace Linq_2
{
    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.menuStrip1 = new System.Windows.Forms.MenuStrip();
            this.mnuSelect = new System.Windows.Forms.ToolStripMenuItem();
            this.menuCustomer = new System.Windows.Forms.ToolStripMenuItem();
            this.menuCustomerUSA = new System.Windows.Forms.ToolStripMenuItem();
            this.menuCustomerA = new System.Windows.Forms.ToolStripMenuItem();
            this.menuSelectAcrossTables = new System.Windows.Forms.ToolStripMenuItem();
            this.menuCustomerIsNameUSA = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
            this.menuSelectAllOrders = new System.Windows.Forms.ToolStripMenuItem();
            this.menuSelectOrdersTakeSkip = new System.Windows.Forms.ToolStripMenuItem();
            this.mnuCommands = new System.Windows.Forms.ToolStripMenuItem();
            this.menuInsertNewCust = new System.Windows.Forms.ToolStripMenuItem();
            this.menuInsertNewCustAndOrder = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.menuDeleteCust = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this.menuUpdateCust = new System.Windows.Forms.ToolStripMenuItem();
            this.menuDyn = new System.Windows.Forms.ToolStripMenuItem();
            this.menuDynVars = new System.Windows.Forms.ToolStripMenuItem();
            this.menuDynIquer = new System.Windows.Forms.ToolStripMenuItem();
            this.menuDynIquerCity = new System.Windows.Forms.ToolStripMenuItem();
            this.dataGridView1 = new System.Windows.Forms.DataGridView();
            this.menuDynIquerCountry = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
            this.SuspendLayout();
            // 
            // menuStrip1
            // 
            this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.mnuSelect,
            this.mnuCommands,
            this.menuDyn});
            this.menuStrip1.Location = new System.Drawing.Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new System.Drawing.Size(792, 24);
            this.menuStrip1.TabIndex = 0;
            this.menuStrip1.Text = "menuStrip1";
            // 
            // mnuSelect
            // 
            this.mnuSelect.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.menuCustomer,
            this.menuCustomerUSA,
            this.menuCustomerA,
            this.menuSelectAcrossTables,
            this.menuCustomerIsNameUSA,
            this.toolStripSeparator3,
            this.menuSelectAllOrders,
            this.menuSelectOrdersTakeSkip});
            this.mnuSelect.Name = "mnuSelect";
            this.mnuSelect.Size = new System.Drawing.Size(95, 20);
            this.mnuSelect.Text = "SELECT Queries";
            // 
            // menuCustomer
            // 
            this.menuCustomer.Name = "menuCustomer";
            this.menuCustomer.Size = new System.Drawing.Size(299, 22);
            this.menuCustomer.Text = "SELECT All Customers";
            this.menuCustomer.Click += new System.EventHandler(this.menuCustomer_Click);
            // 
            // menuCustomerUSA
            // 
            this.menuCustomerUSA.Name = "menuCustomerUSA";
            this.menuCustomerUSA.Size = new System.Drawing.Size(299, 22);
            this.menuCustomerUSA.Text = "SELECT All Customers in USA";
            this.menuCustomerUSA.Click += new System.EventHandler(this.menuCustomerUSA_Click);
            // 
            // menuCustomerA
            // 
            this.menuCustomerA.Name = "menuCustomerA";
            this.menuCustomerA.Size = new System.Drawing.Size(299, 22);
            this.menuCustomerA.Text = "SELECT All Customes Starting with Letter \"A\"";
            this.menuCustomerA.Click += new System.EventHandler(this.menuCustomerA_Click);
            // 
            // menuSelectAcrossTables
            // 
            this.menuSelectAcrossTables.Name = "menuSelectAcrossTables";
            this.menuSelectAcrossTables.Size = new System.Drawing.Size(299, 22);
            this.menuSelectAcrossTables.Text = "SELECT All Customer \"ALFKI\" Orders";
            this.menuSelectAcrossTables.Click += new System.EventHandler(this.menuSelectAcrossTables_Click);
            // 
            // menuCustomerIsNameUSA
            // 
            this.menuCustomerIsNameUSA.Name = "menuCustomerIsNameUSA";
            this.menuCustomerIsNameUSA.Size = new System.Drawing.Size(299, 22);
            this.menuCustomerIsNameUSA.Text = "SELECT Customer ID / Name in USA";
            this.menuCustomerIsNameUSA.Click += new System.EventHandler(this.menuCustomerIdNameUSA_Click);
            // 
            // toolStripSeparator3
            // 
            this.toolStripSeparator3.Name = "toolStripSeparator3";
            this.toolStripSeparator3.Size = new System.Drawing.Size(296, 6);
            // 
            // menuSelectAllOrders
            // 
            this.menuSelectAllOrders.Name = "menuSelectAllOrders";
            this.menuSelectAllOrders.Size = new System.Drawing.Size(299, 22);
            this.menuSelectAllOrders.Text = "SELECT All Orders";
            this.menuSelectAllOrders.Click += new System.EventHandler(this.menuSelectAllOrders_Click);
            // 
            // menuSelectOrdersTakeSkip
            // 
            this.menuSelectOrdersTakeSkip.Name = "menuSelectOrdersTakeSkip";
            this.menuSelectOrdersTakeSkip.Size = new System.Drawing.Size(299, 22);
            this.menuSelectOrdersTakeSkip.Text = "SELECT Orders Since 1998 Take top 50";
            this.menuSelectOrdersTakeSkip.Click += new System.EventHandler(this.menuSelectOrdersTake50_Click);
            // 
            // mnuCommands
            // 
            this.mnuCommands.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.menuInsertNewCust,
            this.menuInsertNewCustAndOrder,
            this.toolStripSeparator1,
            this.menuDeleteCust,
            this.toolStripSeparator2,
            this.menuUpdateCust});
            this.mnuCommands.Name = "mnuCommands";
            this.mnuCommands.Size = new System.Drawing.Size(71, 20);
            this.mnuCommands.Text = "Commands";
            // 
            // menuInsertNewCust
            // 
            this.menuInsertNewCust.Name = "menuInsertNewCust";
            this.menuInsertNewCust.Size = new System.Drawing.Size(235, 22);
            this.menuInsertNewCust.Text = "INSERT New Customer";
            this.menuInsertNewCust.Click += new System.EventHandler(this.menuInsertNewCust_Click);
            // 
            // menuInsertNewCustAndOrder
            // 
            this.menuInsertNewCustAndOrder.Name = "menuInsertNewCustAndOrder";
            this.menuInsertNewCustAndOrder.Size = new System.Drawing.Size(235, 22);
            this.menuInsertNewCustAndOrder.Text = "INSERT New Customer && Order";
            this.menuInsertNewCustAndOrder.Click += new System.EventHandler(this.menuInsertNewCustAndOrder_Click);
            // 
            // toolStripSeparator1
            // 
            this.toolStripSeparator1.Name = "toolStripSeparator1";
            this.toolStripSeparator1.Size = new System.Drawing.Size(232, 6);
            // 
            // menuDeleteCust
            // 
            this.menuDeleteCust.Name = "menuDeleteCust";
            this.menuDeleteCust.Size = new System.Drawing.Size(235, 22);
            this.menuDeleteCust.Text = "DELETE Existing Customer";
            this.menuDeleteCust.Click += new System.EventHandler(this.menuDeleteCust_Click);
            // 
            // toolStripSeparator2
            // 
            this.toolStripSeparator2.Name = "toolStripSeparator2";
            this.toolStripSeparator2.Size = new System.Drawing.Size(232, 6);
            // 
            // menuUpdateCust
            // 
            this.menuUpdateCust.Name = "menuUpdateCust";
            this.menuUpdateCust.Size = new System.Drawing.Size(235, 22);
            this.menuUpdateCust.Text = "UPDATE Existing Customer";
            this.menuUpdateCust.Click += new System.EventHandler(this.menuUpdateCust_Click);
            // 
            // menuDyn
            // 
            this.menuDyn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.menuDynVars,
            this.menuDynIquer});
            this.menuDyn.Name = "menuDyn";
            this.menuDyn.Size = new System.Drawing.Size(99, 20);
            this.menuDyn.Text = "Dynamic Queries";
            // 
            // menuDynVars
            // 
            this.menuDynVars.Name = "menuDynVars";
            this.menuDynVars.Size = new System.Drawing.Size(274, 22);
            this.menuDynVars.Text = "Using simple variables to restrict results";
            this.menuDynVars.Click += new System.EventHandler(this.menuDynVars_Click);
            // 
            // menuDynIquer
            // 
            this.menuDynIquer.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.menuDynIquerCity,
            this.menuDynIquerCountry});
            this.menuDynIquer.Name = "menuDynIquer";
            this.menuDynIquer.Size = new System.Drawing.Size(274, 22);
            this.menuDynIquer.Text = "Using IQueryable";
            // 
            // menuDynIquerCity
            // 
            this.menuDynIquerCity.Name = "menuDynIquerCity";
            this.menuDynIquerCity.Size = new System.Drawing.Size(165, 22);
            this.menuDynIquerCity.Text = "City=\"Redmond\"";
            this.menuDynIquerCity.Click += new System.EventHandler(this.menuDynIquerCity_Click);
            // 
            // dataGridView1
            // 
            this.dataGridView1.AllowUserToAddRows = false;
            this.dataGridView1.AllowUserToDeleteRows = false;
            this.dataGridView1.AllowUserToOrderColumns = true;
            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dataGridView1.Location = new System.Drawing.Point(0, 24);
            this.dataGridView1.Name = "dataGridView1";
            this.dataGridView1.Size = new System.Drawing.Size(792, 542);
            this.dataGridView1.TabIndex = 1;
            // 
            // menuDynIquerCountry
            // 
            this.menuDynIquerCountry.Name = "menuDynIquerCountry";
            this.menuDynIquerCountry.Size = new System.Drawing.Size(165, 22);
            this.menuDynIquerCountry.Text = "Country=\"UK\"";
            this.menuDynIquerCountry.Click += new System.EventHandler(this.menuDynIquerCountry_Click);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(792, 566);
            this.Controls.Add(this.dataGridView1);
            this.Controls.Add(this.menuStrip1);
            this.MainMenuStrip = this.menuStrip1;
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "DLINQ Playground";
            this.Load += new System.EventHandler(this.Form1_Load);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.MenuStrip menuStrip1;
        private System.Windows.Forms.ToolStripMenuItem mnuSelect;
        private System.Windows.Forms.ToolStripMenuItem menuCustomer;
        private System.Windows.Forms.DataGridView dataGridView1;
        private System.Windows.Forms.ToolStripMenuItem menuCustomerUSA;
        private System.Windows.Forms.ToolStripMenuItem menuCustomerIsNameUSA;
        private System.Windows.Forms.ToolStripMenuItem menuCustomerA;
        private System.Windows.Forms.ToolStripMenuItem menuSelectOrdersTakeSkip;
        private System.Windows.Forms.ToolStripMenuItem menuSelectAcrossTables;
        private System.Windows.Forms.ToolStripMenuItem mnuCommands;
        private System.Windows.Forms.ToolStripMenuItem menuInsertNewCust;
        private System.Windows.Forms.ToolStripMenuItem menuInsertNewCustAndOrder;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
        private System.Windows.Forms.ToolStripMenuItem menuDeleteCust;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
        private System.Windows.Forms.ToolStripMenuItem menuUpdateCust;
        private System.Windows.Forms.ToolStripMenuItem menuSelectAllOrders;
        private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
        private System.Windows.Forms.ToolStripMenuItem menuDyn;
        private System.Windows.Forms.ToolStripMenuItem menuDynVars;
        private System.Windows.Forms.ToolStripMenuItem menuDynIquer;
        private System.Windows.Forms.ToolStripMenuItem menuDynIquerCity;
        private System.Windows.Forms.ToolStripMenuItem menuDynIquerCountry;
    }
}

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
Software Developer (Senior)
United Kingdom United Kingdom
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)

- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence

Both of these at Sussex University UK.

Award(s)

I am lucky enough to have won a few awards for Zany Crazy code articles over the years

  • Microsoft C# MVP 2016
  • Codeproject MVP 2016
  • Microsoft C# MVP 2015
  • Codeproject MVP 2015
  • Microsoft C# MVP 2014
  • Codeproject MVP 2014
  • Microsoft C# MVP 2013
  • Codeproject MVP 2013
  • Microsoft C# MVP 2012
  • Codeproject MVP 2012
  • Microsoft C# MVP 2011
  • Codeproject MVP 2011
  • Microsoft C# MVP 2010
  • Codeproject MVP 2010
  • Microsoft C# MVP 2009
  • Codeproject MVP 2009
  • Microsoft C# MVP 2008
  • Codeproject MVP 2008
  • And numerous codeproject awards which you can see over at my blog

Comments and Discussions