Standalone JPA Project Using Java SE: A Maven Way

In this post, I will show how to create a simple JPA application by using maven and Java SE JDK. All the other libraries will be taken care of by the remote repository in maven, which includes eclipselink and embedded derby db.

I will be focusing on how to use maven to generate, what project structure and programs created, how to execute the application, how to verify the database objects, and what targets can be deployed.

I hope this will help you get started, especially without using any IDEs like Eclipse, Netbean etc.

I won’t go to explain what JPA is. There are many resources and books available.

1. Generate JPA App in Seconds

Make sure to enter ’46’ as artifactID (46 is for com.github.lalyos:standalone-jpa-eclipselink-archetype) when asked in the following:

mvn archetype:generate -DgroupId=henry416 -DartifactId=test1

.................

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 354: 46
Choose com.github.lalyos:standalone-jpa-eclipselink-archetype version: 
1: 0.0.1
2: 0.0.2
Choose a number: 2: 2
[INFO] Using property: groupId = henry416
[INFO] Using property: artifactId = test1
Define value for property 'version':  1.0-SNAPSHOT: : 
[INFO] Using property: package = henry416
Confirm properties configuration:
groupId: henry416
artifactId: test1
version: 1.0-SNAPSHOT
package: henry416
 Y: : 
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: standalone-jpa-eclipselink-archetype:0.0.2
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: henry416
[INFO] Parameter: artifactId, Value: test1
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: henry416
[INFO] Parameter: packageInPathFormat, Value: henry416
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: henry416
[INFO] Parameter: groupId, Value: henry416
[INFO] Parameter: artifactId, Value: test1
[INFO] project created from Archetype in dir: /home/henry/Test/jpatest/test1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:42.092s
[INFO] Finished at: Thu Mar 06 21:10:38 EST 2014
[INFO] Final Memory: 10M/25M
[INFO] ------------------------------------------------------------------------

2. Project Structures Generated

henry@brimley:~/Test/jpatest/test1$ ls -ld $(find .)
drwxr-xr-x 3 henry henry 4096 2014-03-06 22:37 .
-rw-r--r-- 1 henry henry   70 2014-03-06 21:10 ./ij.properties
-rw-r--r-- 1 henry henry 1185 2014-03-06 21:10 ./pom.xml
-rwx------ 1 henry henry   60 2014-03-06 21:10 ./run.sh
-rwx------ 1 henry henry  107 2014-03-06 21:10 ./show-derby.sh
drwxr-xr-x 3 henry henry 4096 2014-03-06 21:10 ./src
drwxr-xr-x 4 henry henry 4096 2014-03-06 21:10 ./src/main
drwxr-xr-x 3 henry henry 4096 2014-03-06 21:10 ./src/main/java
drwxr-xr-x 4 henry henry 4096 2014-03-06 21:10 ./src/main/java/henry416
drwxr-xr-x 2 henry henry 4096 2014-03-06 21:10 ./src/main/java/henry416/domain
-rw-r--r-- 1 henry henry  928 2014-03-06 21:10 ./src/main/java/henry416/domain/Department.java
-rw-r--r-- 1 henry henry  992 2014-03-06 21:10 ./src/main/java/henry416/domain/Employee.java
drwxr-xr-x 2 henry henry 4096 2014-03-06 21:10 ./src/main/java/henry416/jpa
-rw-r--r-- 1 henry henry 1597 2014-03-06 21:10 ./src/main/java/henry416/jpa/JpaTest.java
drwxr-xr-x 3 henry henry 4096 2014-03-06 21:10 ./src/main/resources
drwxr-xr-x 2 henry henry 4096 2014-03-06 21:10 ./src/main/resources/META-INF
-rw-r--r-- 1 henry henry 1205 2014-03-06 21:10 ./src/main/resources/META-INF/persistence.xml

The source codes you may be interested in the following separate links:
./pom.xml
./src/main/resources/META-INF/persistence.xml
./src/main/java/henry416/domain/Department.java
./src/main/java/henry416/domain/Employee.java
./src/main/java/henry416/jpa/JpaTest.java

3. Test Run

henry@brimley:~/Test/jpatest/test1$ cat run.sh
mvn compile exec:java -Dexec.mainClass=henry416.jpa.JpaTest

henry@brimley:~/Test/jpatest/test1$ chmod 700 *.sh

henry@brimley:~/Test/jpatest/test1$ ./run.sh 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building test1 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ test1 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ test1 ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 3 source files to /home/henry/Test/jpatest/test1/target/classes
[INFO] 
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ test1 >>>
[INFO] 
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ test1 <<<
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ test1 ---
num of employess:2
next employee: Employee [id=3, name=Captain Nemo, department=java]
next employee: Employee [id=2, name=Jakab Gipsz, department=java]
.. done
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.590s
[INFO] Finished at: Thu Mar 06 21:15:27 EST 2014
[INFO] Final Memory: 24M/61M
[INFO] ------------------------------------------------------------------------

4. Result

henry@brimley:~/Test/jpatest/test1$ cat show-derby.sh 
mvn dependency:copy-dependencies
java -cp 'target/dependency/*' org.apache.derby.tools.ij -p ij.properties

henry@brimley:~/Test/jpatest/test1$ ./show-derby.sh 
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building test1 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default-cli) @ test1 ---
[INFO] Copying eclipselink-2.2.1.jar to /home/henry/Test/jpatest/test1/target/dependency/eclipselink-2.2.1.jar
[INFO] Copying derbytools-10.8.2.2.jar to /home/henry/Test/jpatest/test1/target/dependency/derbytools-10.8.2.2.jar
[INFO] Copying derby-10.8.2.2.jar to /home/henry/Test/jpatest/test1/target/dependency/derby-10.8.2.2.jar
[INFO] Copying javax.persistence-2.0.3.jar to /home/henry/Test/jpatest/test1/target/dependency/javax.persistence-2.0.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.026s
[INFO] Finished at: Thu Mar 06 21:17:51 EST 2014
[INFO] Final Memory: 8M/21M
[INFO] ------------------------------------------------------------------------
ij version 10.8
CONNECTION0* - 	jdbc:derby:simpleDb
* = current connection
ij> show schemas;
TABLE_SCHEM                   
------------------------------
APP                           
NULLID                        
SQLJ                          
SYS                           
SYSCAT                        
SYSCS_DIAG                    
SYSCS_UTIL                    
SYSFUN                        
SYSIBM                        
SYSPROC                       
SYSSTAT                       
TEST1                         

12 rows selected
ij> select * from TEST1.DEPARTMENT;
ID                  |NAME                
-----------------------------------------
1                   |java                

1 row selected
ij> select * from TEST1.EMPLOYEE;
ID                  |NAME                |DEPARTMENT_ID       
--------------------------------------------------------------
3                   |Captain Nemo        |1                   
2                   |Jakab Gipsz         |1                   

2 rows selected
ij> exit;

5. Deployment Target

henry@brimley:~/Test/jpatest/test1/target$ ls -ld $(find .)
drwxr-xr-x 4 henry henry    4096 2014-03-06 21:17 .
drwxr-xr-x 4 henry henry    4096 2014-03-06 21:15 ./classes
drwxr-xr-x 4 henry henry    4096 2014-03-06 21:15 ./classes/henry416
drwxr-xr-x 2 henry henry    4096 2014-03-06 21:15 ./classes/henry416/domain
-rw-r--r-- 1 henry henry    1691 2014-03-06 21:15 ./classes/henry416/domain/Department.class
-rw-r--r-- 1 henry henry    1888 2014-03-06 21:15 ./classes/henry416/domain/Employee.class
drwxr-xr-x 2 henry henry    4096 2014-03-06 21:15 ./classes/henry416/jpa
-rw-r--r-- 1 henry henry    3080 2014-03-06 21:15 ./classes/henry416/jpa/JpaTest.class
drwxr-xr-x 2 henry henry    4096 2014-03-06 21:15 ./classes/META-INF
-rw-r--r-- 1 henry henry    1205 2014-03-06 21:15 ./classes/META-INF/persistence.xml
drwxr-xr-x 2 henry henry    4096 2014-03-06 21:17 ./dependency
-rw-r--r-- 1 henry henry 2671577 2014-03-06 21:17 ./dependency/derby-10.8.2.2.jar
-rw-r--r-- 1 henry henry  174969 2014-03-06 21:17 ./dependency/derbytools-10.8.2.2.jar
-rw-r--r-- 1 henry henry 6412045 2014-03-06 21:17 ./dependency/eclipselink-2.2.1.jar
-rw-r--r-- 1 henry henry  126856 2014-03-06 21:17 ./dependency/javax.persistence-2.0.3.jar

6. Run As Java Application

henry@brimley:~/Test/jpatest/test1$ cd target/classes
henry@brimley:~/Test/jpatest/test1/target/classes$ java -cp '../dependency/*' henry416.jpa.JpaTest
num of employess:2
next employee: Employee [id=3, name=Captain Nemo, department=java]
next employee: Employee [id=2, name=Jakab Gipsz, department=java]
.. done

7. Summary

By using maven, it’s pretty easy to create a project structure for a JPA application (Kudos to you Lajos Papp). By replacing those POJO entity classes with your own classes, modifying persistence.xml to your local database and pom.xml to the latest maven repository, you can code a real world java application in JPA. I hope this will make JPA programming more interesting.

Undocumented SQL Server 2012 Express LocalDB

As a developer of Microsoft Visual Studio, SQL Server 2012 Express LocalDB probably has gotten onto your machine without your notice. I will document some of my exploration on LocalDB in this post.

Installation and Location

There are three ways to get LocalDB onto your machines:

  1. Install together when installing Microsoft Visual Studio 2013 (this is my case);
  2. Install by using SqlLocalDB.msi found in SQL Server 2012 Express
  3. Install by downloading from Microsoft Download Centre directly (here).

The installation location is default to C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn where sqlserv.exe is the main application.

The tools (utilities) to operate the LocalDB are SqlLocalDB, SQLCMD and bcp which are located at C:\Program Files\Microsoft SQL Server\110\Tools\Binn. Make sure to include it into your PATH.

SqlLocalDB

This is the utility to administrate the localdb instances.

  • to get help: sqllocaldb -?
  • to print the version: sqllocaldb versions
  • to create an instance: sqllocaldb create “YourInstanceName”
  • to delete an instance: sqllocaldb delete “YourInstanceName”
  • to start an instance: sqllocaldb start “YourInstanceName”
  • to stop an instance: sqllocaldb stop “YourInstanceName”
  • to share an instance: sqllocaldb share “YourInstanceName”
  • to unshared an instance: sqllocadbl unshare “YourInstanceName”
  • to list all your instances: sqllocaldb info
  • to list the status of an instance: sqllocaldb info “YourInstanceName”
  • to set the trace on and off: sqllocaldb trace on|off

If you’ve used VS 2013 to connect to LocalDB, VS 2013 would have created an instance for you (in my case is v11.0).

Even your instance is stopped, it will be auto-started when you try to connect to it first time either via VS 2013 or SQLCMD.

SQLCMD, BCP, process ‘sqlservr’

Both SQLCMD and BCP are well documented. The only difference between LocalDB and SQL server is that we need to put a bracket ‘()’ to indicate it is a LocalDB instead of hostname for the named instance like:

sqlcmd -S ‘(LocalDB)\v11.0’

This is also applied to SSMS and VS 2013 connections. There is only one process “sqlservr” related to LocalDB. It is very lightweighted by using about 12MB RAM on my machine.

Some Examples

The following is executed in powershell:

Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.

PS C:\Users\henry> sqllocaldb info
Projects
v11.0
PS C:\Users\henry> sqllocaldb info "v11.0"
Name:               v11.0
Version:            11.0.3000.0
Shared name:
Owner:              PolarBear\henry
Auto-create:        Yes
State:              Stopped
Last start time:    12/31/2013 2:37:39 PM
Instance pipe name:
PS C:\Users\henry> sqllocaldb start "v11.0"
LocalDB instance "v11.0" started.
PS C:\Users\henry>  ps | where-object {$_.ProcessName -match 'sqlservr'}

Handles  NPM(K)    PM(K)      WS(K) VM(M)   CPU(s)     Id ProcessName
-------  ------    -----      ----- -----   ------     -- -----------
    492      20    67780      17140   311     3.83   2248 sqlservr


PS C:\Users\henry> sqllocaldb stop "v11.0"
LocalDB instance "v11.0" stopped.
PS C:\Users\henry> sqlcmd -S "(LocalDB)\v11.0"
1> use test
2> go
Changed database context to 'test'.
1> select count(*) from HR.Employees
2> go

-----------
          9

(1 rows affected)
1> shutdown
2> go
Server shut down by request from login PolarBear\henry.
1> exit
PS C:\Users\henry>

Sharing or Not

From A TechNet Article
When sharing a SqlLocalDB instance with a non-owner, you must re-start the instance for the other users to be able to see the instance you have shared. A non-owner cannot start an instance, so if you are going to share an instance with other users who can access your machine, you also need to be sure it has been started. When you create an instance you can do this as follows:

sqllocaldb create “MyInstance”
sqllocaldb share “MyInstance” “OurInstance”
sqllocaldb start “MyInstance”

You should add users explicitly when connected to the instance as the owner, e.g.

CREATE LOGIN [Domain\User] FROM WINDOWS;
GRANT CONNECT TO [Domain\User];
— other permissions…

In general, though, the purpose of SqlLocalDB is to serve as a sandbox for an individual developer on a machine, not to serve as a development environment for multiple users. Each user should be able to create, start, administer and use his/her own LocalDB instances.

Using Entity Framework in an ASP.NET MVC5 Application

In my previous two posts, I built a C# console application using Entity Framework (EF) in Microsoft Visual Studio 2013, and investigated how to perform CRUD operations on EF.

Building an ASP.NET MVC5 application using EF can become a straightforward job in Visual Studio 2013. It is very similar to building a J2EE MVC application by using JPA in Netbeans 7. The steps can be summarized as three steps: 1) create a ASP.NET MVC project; 2) add M: reversed engineer an EF model(M) from database; 3) Add C with V: scaffolding MVC 5 Controller (C) with views (V) using EF.

1. Create a ASP.NET MVC Project

In Microsoft Visual Studio 2013, create a new project (Ctrl-Shift-N) called EmployeeMVC using template (Visual C#->ASP.NET Web Application) and also select a template ‘MVC‘ and add folders and core references for ‘MVC’.

What will happene?
Visual Studio will create a few folders (App_Data, App_Start, Content, Controllers, fonts, Models, Scripts, Views) and files (Global.asax, packages.config, Web.config, Project_Readme.html, Startup.cs), also download a list of js scripts in Scripts folder, create AccountViewModels.cs and IdentityModels.cs in Models folder, AccountController.cs and HomeController.cs in Controllers folder, a list of *.shtml in various view folders, site style sheets in Contents folder and a few config.cs in App_Start.

Press F5 to build and run the empty application now.

2. Add ADO.NET Entity Data Model

Following the steps to reversed engineer EF 5 model from a table in the database into ASP.NET MVC (for reversed engineer an EF 6 model class, please use Entity Framework Power Tools):

  • Right click on Models folder, and choose New Item-Add->Data->ADO.NET Entity Data Model (C#);
  • Provide a Name: EmployeeModel.edmx and Click ‘Add’;
  • Choose ‘generate from database’ and Click ‘Next’
  • Connect to a SQL instance (local), choose your database (test) and table (HR.Employee)
  • If you receive a security warning, select OK to continue running the template.
  • This will add EmployeeModel.edmx (EF 5) as a folder under Models, and also add relevant references.

    Build the solution.

    3. Generate Controller and Views

    To generate controller and views:

  • Add the new controller to the existing Controllers folder. Right-click the Controllers folder, and select Add – New Scaffolded Item; Select the MVC 5 Controller with views, using Entity Framework option. This option will generate the controller and views for updating, deleting, creating and displaying the data in your model.
  • Set the controller name to EmployeeController, select Employee (EmployeeMVC.Models) for the model class, and select the testEntities (EmployeeMVC.Models) for the context class, Click ‘Add’
  • This will create EmployeeController.cs in Controllers:

    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Data.Entity;
    using System.Linq;
    using System.Net;
    using System.Web;
    using System.Web.Mvc;
    using EmployeeMVC.Models;
    
    namespace EmployeeMVC.Controllers
    {
        public class EmployeeController : Controller
        {
            private testEntities db = new testEntities();
    
            // GET: /Employee/
            public ActionResult Index()
            {
                var employees = db.Employees.Include(e => e.Employee1);
                return View(employees.ToList());
            }
    
            // GET: /Employee/Details/5
            public ActionResult Details(int? id)
            {
                if (id == null)
                {
                    return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
                }
                Employee employee = db.Employees.Find(id);
                if (employee == null)
                {
                    return HttpNotFound();
                }
                return View(employee);
            }
    
            // GET: /Employee/Create
            public ActionResult Create()
            {
                ViewBag.mgrid = new SelectList(db.Employees, "empid", "lastname");
                return View();
            }
    
            // POST: /Employee/Create
            // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
            // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
            [HttpPost]
            [ValidateAntiForgeryToken]
            public ActionResult Create([Bind(Include="empid,lastname,firstname,title,titleofcourtesy,birthdate,hiredate,address,city,region,postalcode,country,phone,mgrid")] Employee employee)
            {
                if (ModelState.IsValid)
                {
                    db.Employees.Add(employee);
                    db.SaveChanges();
                    return RedirectToAction("Index");
                }
    
                ViewBag.mgrid = new SelectList(db.Employees, "empid", "lastname", employee.mgrid);
                return View(employee);
            }
    
            // GET: /Employee/Edit/5
            public ActionResult Edit(int? id)
            {
                if (id == null)
                {
                    return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
                }
                Employee employee = db.Employees.Find(id);
                if (employee == null)
                {
                    return HttpNotFound();
                }
                ViewBag.mgrid = new SelectList(db.Employees, "empid", "lastname", employee.mgrid);
                return View(employee);
            }
    
            // POST: /Employee/Edit/5
            // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
            // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
            [HttpPost]
            [ValidateAntiForgeryToken]
            public ActionResult Edit([Bind(Include="empid,lastname,firstname,title,titleofcourtesy,birthdate,hiredate,address,city,region,postalcode,country,phone,mgrid")] Employee employee)
            {
                if (ModelState.IsValid)
                {
                    db.Entry(employee).State = EntityState.Modified;
                    db.SaveChanges();
                    return RedirectToAction("Index");
                }
                ViewBag.mgrid = new SelectList(db.Employees, "empid", "lastname", employee.mgrid);
                return View(employee);
            }
    
            // GET: /Employee/Delete/5
            public ActionResult Delete(int? id)
            {
                if (id == null)
                {
                    return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
                }
                Employee employee = db.Employees.Find(id);
                if (employee == null)
                {
                    return HttpNotFound();
                }
                return View(employee);
            }
    
            // POST: /Employee/Delete/5
            [HttpPost, ActionName("Delete")]
            [ValidateAntiForgeryToken]
            public ActionResult DeleteConfirmed(int id)
            {
                Employee employee = db.Employees.Find(id);
                db.Employees.Remove(employee);
                db.SaveChanges();
                return RedirectToAction("Index");
            }
    
            protected override void Dispose(bool disposing)
            {
                if (disposing)
                {
                    db.Dispose();
                }
                base.Dispose(disposing);
            }
        }
    }
    
    

    It will also create a folder ‘Employee‘ in Views with a list of cshtml (Create, Delete, Details, Edit, Index)

    Build and run by pressing F5, and go to the similar link in the browser like:
    http://localhost:49481/employee

    I removed some of unwanted items in index.cshtml. My index page looked like:

    ASP.NET MVC 5 using EF

    ASP.NET MVC 5 using EF

    Summary

    Using Entity Framework, Visual Studio 2013 can easily generate a model from database, and scaffold a controller and generate all the views based on default templates and standard CRUD operations on EF.

    The advantage of this process is that the model, controller and view can be easily re-generated by repeating the above step 2 and 3 if the table structure in the underlying physical table is changed.

    The disadvantage is also obvious. Whatever customization made after the generation on (M. V. C) will have to be repeated after re-generation.

    Using JPA to build a J2EE 3-tier Web Application

    The purpose of this entry is to demonstrate a full J2EE web application. The application will generate:

      1. a Java Persistence API (JPA) entity modeled on an existing database table
      2. an Enterprise JavaBean (EJB) which will query the database through the JPA
      3. a Servlet coupled with a JavaServer Faces (JSF) 2 framework for information display
      4. a Representational State Transfer (REST) resource capable of providing the JPA entities as web resources

    The project will be built in Netbeans 7.2.1 and hosted on Glassfish 3.2.1

    Start off by creating a Web Application project and specify the Glassfish Server. Then, clicking on the project, create a new Entity Class from Database (under Persistence) and specify the datasource along with the required tables. Specify a package. Check the NamedQuery, JAXB and Persistence Unit boxes.

    Image

    Next, create a new stateless EJB in the package (with the annotation @Stateless). We will be using JPA entities as RESTful resources, so tell netbeans to register all REST resources to the javax.ws.rs.Application class automatically and add a Jersey Library (JAX-RS implementation).

    @javax.inject.Named
    @Path("/customers")
    @Stateless
    public class CustomerSessionBean {
    
        @PersistenceContext
        EntityManager em;
    
        public List<Customer> getCustomers() {
            return (List<Customer>)em.createNamedQuery("Customer.findAll").getResultList();
        }
    
        //RESTful resource, access at http://localhost:8080/JavaEE6SampleApp/webresources/customers/customer/1
        @GET
        @Path("/customer/{id}")
        @Produces("application/xml")
        public Customer getCustomer(@PathParam("id")Integer id) {
            return
            (Customer)em.createNamedQuery("Customer.findByCustomerId")
            .setParameter("customerId", id).getSingleResult();
        }
    }
    

    Next, create the servlet that uses the EJB.

    @WebServlet(name = "TestServlet", urlPatterns = {"/TestServlet"})
    public class TestServlet extends HttpServlet {
    
        @EJB CustomerSessionBean ejb;
    
        // Access at http://localhost:8080/JavaEE6SampleApp/TestServlet
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                out.println("<html>");
                out.println("<head>");
                out.println("<title>Servlet TestServlet</title>");
                out.println("</head>");
                out.println("<body>");
                out.println("<h1>Servlet TestServlet at " + request.getContextPath () + "</h1>");
                out.println(ejb.getCustomers());
                out.println("</body>");
                out.println("</html>");
            } finally {
                out.close();
            }
        }
    
        // HTTPServlet Methods go here
    }
    

    Next, we will go about creating the Context and Dependency Injection (CDI) which allows the EJB to support the JSF pages. Create a beans.xml file in the project and set the project framework to JSF. Create a Facelets Template (JSF) in the WEB-INF folder using one of the CSS layouts. Edit it to become:

    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:h="http://java.sun.com/jsf/html">
        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <link href="./../resources/css/default.css" rel="stylesheet" type="text/css" />
            <link href="./../resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
            <title>Facelets Template</title>
        </h:head>
        <h:body>
            <div id="top">
                <ui:insert name="top"><h1>Java EE 6 Sample App</h1></ui:insert>
            </div>
    
            <div id="content" class="center_content">
                <ui:insert name="content">Content</ui:insert>
            </div>
    
            <div id="bottom">
                <ui:insert name="bottom"><center>DEMO!</center></ui:insert>
            </div>
        </h:body>
    </html>
    

    Delete the old index.xhtml file and replace it with a new Facelets Template Client copy. In this case, the root tag used is :

    <?xml version='1.0' encoding='UTF-8' ?>
    <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                    template="./WEB-INF/template.xhtml"
                    xmlns:h="http://java.sun.com/jsf/html">
        <ui:define name="content">
            <h:dataTable value="#{customerSessionBean.customers}" var="c">
                <h:column>#{c.name}</h:column>
                <h:column>#{c.customerId}</h:column>
            </h:dataTable>
        </ui:define>
    </ui:composition>
    

    And we are done. The final results are:

    Screenshot from 2013-01-07 12:34:30 Screenshot from 2013-01-07 12:34:43 Screenshot from 2013-01-07 12:34:53 Screenshot from 2013-01-07 12:35:17

    Some tricks on Visual Studio 2010

    •Suggestion mode [CTRL]+[ALT]+[SPACE]
    •Find all references [SHIFT]+[F12]
    •Navigating Highlights   [CTRL]+[SHIFT]+[UP|DOWN]
    •Code: ZOOM Mouse and Keyboard   [CTRL]+[SHIFT]+[<|>]
    •Outline Hide [CTRL]+[M],[H]
    •Outline Show [CTRL]+[M],[U]
    •Smart Tag Shortcut [CTRL]+[.]
    Code Snippets
    •Double [TAB] Expansion
    •Insert Snippet

    [CTRL]+[K] and [CTRL]+[X]

    ADO.NET Offline DataTable Application

    The following is an ADO.NET application using a windows form template in Visual Studio 2008. The program manipulates a DataTable which is not connected to any external DataSet.

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace ADOWindowsForm
    {
        public partial class Form1 : Form
        {
            DataTable tblCustomer = new DataTable();
            DataTable tblFoodPrice = new DataTable();
            DataTable tblComboBoxSelectWherePrice = new DataTable();
    
            DataSet set = new DataSet("Set");
    
            public Form1()
            {
                set.Tables.Add(tblCustomer);
                set.Tables.Add(tblFoodPrice);
    
                tblCustomer.TableName = "tblCustomer";
                tblFoodPrice.TableName = "tblFoodPrice";
    
                tblCustomer.Columns.Add("ID", typeof(long));
                tblCustomer.PrimaryKey = new DataColumn[] {tblCustomer.Columns["ID"]};
                tblCustomer.Columns["ID"].AutoIncrement = true;
                tblCustomer.Columns["ID"].AutoIncrementSeed = 1;
                tblCustomer.Columns["ID"].AllowDBNull = false;
                tblCustomer.Columns.Add("Name", typeof(string));
                tblCustomer.Columns.Add("Order", typeof(string)); 
                tblCustomer.Columns.Add("OrderID", typeof(long));
                tblCustomer.Columns["OrderID"].AllowDBNull = false;
                tblCustomer.Columns.Add("Price", typeof(double));
    
                tblFoodPrice.Columns.Add("ID", typeof(long));
                tblFoodPrice.PrimaryKey = new DataColumn[] { tblFoodPrice.Columns["ID"] };
                tblFoodPrice.Columns["ID"].AutoIncrement = true;
                tblFoodPrice.Columns["ID"].AutoIncrementSeed = 1;
                tblFoodPrice.Columns["ID"].AllowDBNull = false;
                tblFoodPrice.Columns.Add("Food", typeof(string));
                tblFoodPrice.Columns.Add("Price", typeof(double));
    
                tblComboBoxSelectWherePrice.Columns.Add("Condition", typeof(string));
    
                DataRelation foodID = new DataRelation("FoodID", tblFoodPrice.Columns["ID"], tblCustomer.Columns["OrderID"]);
                set.Relations.Add(foodID);
                tblCustomer.Columns["Order"].Expression = "Parent(FoodID).Food";
                tblCustomer.Columns["Price"].Expression = "Parent(FoodID).Price";
    
                tblFoodPrice.Rows.Add(new Object[] {null, "Fish", 10.00});
                tblFoodPrice.Rows.Add(new Object[] { null, "Couch Potato", 5.00 });
                tblFoodPrice.Rows.Add(new Object[] { null, "Head Cheese", 2.50 });
                tblFoodPrice.Rows.Add(new Object[] { null, "Whoopie Pie", 4.50 });
                tblFoodPrice.Rows.Add(new Object[] { null, "Spotted Dick", 11.50 });
                tblFoodPrice.Rows.Add(new Object[] { null, "WOMBO COMBO", 9.99 });
    
                tblCustomer.Rows.Add(new Object[] { null, "Customer A", null, 1 });
                tblCustomer.Rows.Add(new Object[] { null, "John Smith", null, 1 });
                tblCustomer.Rows.Add(new Object[] { null, "Gabe", null, 2 });
                tblCustomer.Rows.Add(new Object[] { null, "Ramirez", null, 3 });
                tblCustomer.Rows.Add(new Object[] { null, "Sir Woodsworth", null, 4});
                tblCustomer.Rows.Add(new Object[] { null, "Stereotype A", null, 5 });
                tblCustomer.Rows.Add(new Object[] { null, "John Smith", null, 2 });
    
                tblComboBoxSelectWherePrice.Rows.Add(new Object[] { "Equal To" });
                tblComboBoxSelectWherePrice.Rows.Add(new Object[] { "Less Than" });
                tblComboBoxSelectWherePrice.Rows.Add(new Object[] { "Greater Than" });
                tblComboBoxSelectWherePrice.Rows.Add(new Object[] { "Less Than or Equal To" });
                tblComboBoxSelectWherePrice.Rows.Add(new Object[] { "Greater Than or Equal To" });
    
                InitializeComponent();
    
                comboBoxSelectWherePrice.DataSource = tblComboBoxSelectWherePrice;
                comboBoxSelectWherePrice.DisplayMember = "Condition";
    
                DataTable addRowsCustomer = new DataTable();
                addRowsCustomer.Columns.Add("Name", typeof(string));
                addRowsCustomer.Columns.Add("OrderID", typeof(long));
                dataGridViewAddRowsCustomer.DataSource = addRowsCustomer;
    
                DataTable addRowsFood = new DataTable();
                addRowsFood.Columns.Add("Food", typeof(string));
                addRowsFood.Columns.Add("Price", typeof(double));
                dataGridViewAddRowsFood.DataSource = addRowsFood; 
    
                dataGridView1.AllowUserToAddRows = false;
    
                btnShowCustomerTable_Click(null, null);
            }
    
            private void btnShowCustomerTable_Click(object sender, EventArgs e)
            {
                /*listBox1.DataSource = tblCustomer;
                listBox1.DisplayMember = "ID";
                listBox1.Refresh();*/
    
                dataGridView1.DataSource = null;
                dataGridView1.DataSource = tblCustomer;
                dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                listBox1.Text = "Now showing from table: tblCustomer";
                dataGridView1.Refresh();
            }
    
            private void btnShowFoodTable_Click(object sender, EventArgs e)
            {
                /*listBox1.DataSource = tblFoodPrice;
                listBox1.DisplayMember = "ID";
                listBox1.Refresh();*/
    
                dataGridView1.DataSource = null;
                dataGridView1.DataSource = tblFoodPrice;
                dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                listBox1.Text = "Now showing from table: tblFoodPrice";
                dataGridView1.Refresh();
            }
    
            private void btnAddRowCustomer_Click(object sender, EventArgs e)
            {
                try
                {
                    btnShowCustomerTable_Click(null, null);
                    tblCustomer.Rows.Add(new Object[] { null, textBoxName.Text, null, Convert.ToInt64(textBoxOrder.Text), null });
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                textBoxName.Text = null;
                textBoxOrder.Text = null;
            }
    
            private void btnAddRowsCustomer_Click(object sender, EventArgs e)
            {
                try
                {
                    btnShowCustomerTable_Click(null, null);
                    for (int i = 0; i &lt; dataGridViewAddRowsCustomer.RowCount-1; i++)
                    {
                        tblCustomer.Rows.Add(new Object[] { null, dataGridViewAddRowsCustomer.Rows[i].Cells[0].Value, null, dataGridViewAddRowsCustomer.Rows[i].Cells[1].Value });
                    }
                    dataGridViewAddRowsCustomer.DataSource = null;
                    DataTable addRowsCustomer = new DataTable();
                    addRowsCustomer.Columns.Add("Food", typeof(string));
                    addRowsCustomer.Columns.Add("Price", typeof(long));
                    dataGridViewAddRowsCustomer.DataSource = addRowsCustomer; 
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                }
            }
    
            private void btnAddRowFood_Click(object sender, EventArgs e)
            {
                try
                {
                    btnShowFoodTable_Click(null, null);
                    tblFoodPrice.Rows.Add(new Object[] { null, txtboxNewFoodName.Text, Convert.ToDouble(txtBoxNewFoodPrice.Text)});
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtboxNewFoodName.Text = null;
                txtBoxNewFoodPrice.Text = null;
            }
    
            private void btnAddRowsFood_Click(object sender, EventArgs e)
            {
                try
                {
                    btnShowFoodTable_Click(null, null);
                    for (int i = 0; i &lt; dataGridViewAddRowsFood.RowCount - 1; i++)
                    {
                        tblFoodPrice.Rows.Add(new Object[] { null, dataGridViewAddRowsFood.Rows[i].Cells[0].Value, dataGridViewAddRowsFood.Rows[i].Cells[1].Value });
                    }
                    dataGridViewAddRowsFood.DataSource = null;
                    DataTable addRowsFood = new DataTable();
                    addRowsFood.Columns.Add("Name", typeof(string));
                    addRowsFood.Columns.Add("Price", typeof(double));
                    dataGridViewAddRowsFood.DataSource = addRowsFood;
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                }
            }
    
            private void btnSelectCustomerWhereID_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = tblCustomer.Select("ID = " + textBoxSelectCustomerWhereID.Text);
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                textBoxSelectCustomerWhereID.Text = null;
            }
    
            private void btnSelectCustomerWhereOrder_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = tblCustomer.Select("Order = '" + textBoxSelectCustomerWhereOrder.Text + "'");
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                textBoxSelectCustomerWhereOrder.Text = null;
            }
    
            private void btnSelectCustomerWhereOrderID_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = tblCustomer.Select("OrderID = " + textBoxSelectCustomerWhereOrderID.Text);
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                textBoxSelectCustomerWhereOrderID.Text = null;
            }
    
            private void btnSelectCustomerWhereCustomer_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = tblCustomer.Select("Name = '" + textBoxSelectCustomerWhereCustomer.Text + "'");
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                textBoxSelectCustomerWhereCustomer.Text = null;
            }
    
            private void btnSelectFoodWhereID_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = tblFoodPrice.Select("ID = " + txtBoxSelectFoodWhereID.Text );
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtBoxSelectFoodWhereID.Text = null;
            }
    
            private void SelectFoodWherePrice_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = null;
    
                    if (comboBoxSelectWherePrice.SelectedIndex == 0)
                        matchingRows = tblFoodPrice.Select("Price = " + txtBoxSelectFoodWherePrice.Text);
                    else if (comboBoxSelectWherePrice.SelectedIndex == 1)
                        matchingRows = tblFoodPrice.Select("Price &lt; " + txtBoxSelectFoodWherePrice.Text);                 else if (comboBoxSelectWherePrice.SelectedIndex == 2)                     matchingRows = tblFoodPrice.Select("Price &gt; " + txtBoxSelectFoodWherePrice.Text);
                    else if (comboBoxSelectWherePrice.SelectedIndex == 3)
                        matchingRows = tblFoodPrice.Select("Price &lt;= " + txtBoxSelectFoodWherePrice.Text);                 else                     matchingRows = tblFoodPrice.Select("Price &gt;= " + txtBoxSelectFoodWherePrice.Text);
    
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtBoxSelectFoodWherePrice.Text = null;
            }
    
            private void btnSelectFoodWhereName_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = tblFoodPrice.Select("Food = '" + txtBoxSelectFoodWhereName.Text + "'");
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtBoxSelectFoodWhereName.Text = null;
            }
    
            private void btnCustomSelection_Click(object sender, EventArgs e)
            {
                try
                {
                    DataRow[] matchingRows = set.Tables[txtBoxSelectFromTableName.Text].Select(txtBoxCustomSelectionStatement.Text);
                    dataGridView1.DataSource = null;
                    DataTable tableForSelectedRows = matchingRows.CopyToDataTable();
                    dataGridView1.DataSource = tableForSelectedRows;
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                }
                txtBoxSelectFromTableName.Text = null;
                txtBoxCustomSelectionStatement.Text = null;
            }
    
            private void btnAlterCustomerRow_Click(object sender, EventArgs e)
            {
                try
                {
                    dataGridView1.DataSource = tblCustomer;
                    if (tblCustomer.Select("ID = " + txtboxAlterCustomerWhereID.Text).Length != 0)
                    {
                        DataRow[] upload = tblCustomer.Select("ID = " + txtboxAlterCustomerWhereID.Text);
                        if (txtboxChangeCustomerName.Text.Length &gt; 0)
                        {
                            upload[0]["Name"] = txtboxChangeCustomerName.Text;
                        }
                        if (txtboxChangeCustomerOrder.Text.Length &gt; 0)
                        {
                            upload[0]["OrderID"] = txtboxChangeCustomerOrder.Text;
                        }
                    }
                    btnShowCustomerTable_Click(null, null);
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtboxChangeCustomerName.Text = null;
                txtboxChangeCustomerOrder.Text = null;
                txtboxAlterCustomerWhereID.Text = null;
            }
    
            private void btnAlterFoodRow_Click(object sender, EventArgs e)
            {
                try
                {
                    dataGridView1.DataSource = tblFoodPrice;
                    if (tblFoodPrice.Select("ID = " + txtboxAlterFoodWhereID.Text).Length != 0)
                    {
                        DataRow[] upload = tblFoodPrice.Select("ID = " + txtboxAlterFoodWhereID.Text);
                        if (txtboxChangeFoodName.Text.Length &gt; 0)
                            upload[0]["Food"] = txtboxChangeFoodName.Text;
                        if (txtboxChangeFoodPrice.Text.Length &gt; 0)
                            upload[0]["Price"] = Convert.ToDouble(txtboxChangeFoodPrice.Text);
                    }
                    btnShowFoodTable_Click(null, null);
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtboxAlterFoodWhereID.Text = null;
                txtboxChangeFoodName.Text = null;
                txtboxChangeFoodPrice.Text = null;
            }
    
            private void btnDeleteCustomerWhereID_Click(object sender, EventArgs e)
            {
                try
                {
                    dataGridView1.DataSource = tblCustomer;
                    DataRow[] toDelete = tblCustomer.Select("ID = " + txtBoxDeleteCustomerWhereID.Text);
                    toDelete[0].Delete();
                    btnShowCustomerTable_Click(null, null);
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtBoxDeleteCustomerWhereID.Text = null;
            }
    
            private void DeleteFoodWhereID_Click(object sender, EventArgs e)
            {
                try
                {
                    dataGridView1.DataSource = tblFoodPrice;
                    DataRow[] toDelete = tblFoodPrice.Select("ID = " + txtboxDeleteFoodWhereID.Text);
                    toDelete[0].Delete();
                    btnShowFoodTable_Click(null, null);
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                    listBox1.Refresh();
                }
                txtboxDeleteFoodWhereID.Text = null;
            }
    
            private void btnAggregateName_Click(object sender, EventArgs e)
            {
                try
                {
                    dataGridView1.DataSource = null;
                    DataTable nameAggregate = new DataTable();
                    nameAggregate.Columns.Add("Name", typeof(string));
                    nameAggregate.Columns.Add("No. of Orders", typeof(int));
                    nameAggregate.Columns.Add("Price", typeof(double));
                    nameAggregate.Columns["Name"].AllowDBNull = false;
                    nameAggregate.Columns["No. of Orders"].AllowDBNull = false;
    
                    DataTable copyTable = tblCustomer;
                    DataRow[] selected = copyTable.Select("Name IS NOT null");
                    int counter = 0;
                    double totalPrice = 0;
    
                    Boolean[] array = new Boolean[selected.Length];
                    Boolean nope = false;
    
                    for (int i = 0; i &lt; selected.Length; i++)
                    {
                        nope = false;
                        counter = 1;
                        totalPrice = 0;
                        if (array[i] == true)
                            nope = true;
                        if (nope == false &amp;&amp; selected[i]["Name"].ToString().Equals(String.Empty) == false)
                        {
                            totalPrice = Convert.ToDouble(selected[i]["Price"].ToString());
                            for (int j = i + 1; j &lt; selected.Length; j++)
                            {
                                if (selected[i]["Name"].ToString().Equals(selected[j]["Name"].ToString()) == true)
                                {
                                    counter++;
                                    totalPrice += Convert.ToDouble(selected[j]["Price"].ToString());
                                    array[j] = true;
                                }
                            }
                            nameAggregate.Rows.Add(new Object[] { selected[i]["Name"].ToString(), counter, totalPrice });
                        }
                    }
    
                    dataGridView1.DataSource = nameAggregate;
                    dataGridView1.Columns["Price"].DefaultCellStyle.Format = "c";
                    dataGridView1.Refresh();
                }
                catch (Exception ex) {
                    listBox1.Text = ex.Message;
                }
            }
    
            private void btnAggregateOrder_Click(object sender, EventArgs e)
            {
                try
                {
                    dataGridView1.DataSource = null;
                    DataTable nameAggregate = new DataTable();
                    nameAggregate.Columns.Add("Order", typeof(string));
                    nameAggregate.Columns.Add("Food ID", typeof(string));
                    nameAggregate.Columns.Add("No. of Orders", typeof(int));
                    nameAggregate.Columns["Order"].AllowDBNull = false;
                    nameAggregate.Columns["Food ID"].AllowDBNull = false;
                    nameAggregate.Columns["No. of Orders"].AllowDBNull = false;
    
                    DataTable copyTable = tblCustomer;
                    DataRow[] selected = copyTable.Select("OrderID IS NOT null");
                    int counter = 0;
    
                    Boolean[] array = new Boolean[selected.Length];
                    Boolean nope = false;
    
                    for (int i = 0; i &lt; selected.Length; i++)
                    {
                        nope = false;
                        counter = 1;
                        if (array[i] == true)
                            nope = true;
                        if (nope == false &amp;&amp; selected[i]["OrderID"].ToString().Equals(String.Empty) == false)
                        {
                            for (int j = i + 1; j &lt; selected.Length; j++)
                            {
                                if (selected[i]["OrderID"].ToString().Equals(selected[j]["OrderID"].ToString()) == true)
                                {
                                    counter++;
                                    array[j] = true;
                                }
                            }
                            nameAggregate.Rows.Add(new Object[] { selected[i]["Order"].ToString(), selected[i]["OrderID"].ToString(), counter });
                        }
                    }
    
                    dataGridView1.DataSource = nameAggregate;
                    dataGridView1.Sort(dataGridView1.Columns["Food ID"], ListSortDirection.Ascending);
                    dataGridView1.Refresh();
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                }
            }
    
            private void btnDataGridViewTotalPrice_Click(object sender, EventArgs e)
            {
                try
                {
                    DataTable referenceTable = (DataTable)(dataGridView1.DataSource);
                    DataRow[] rowClone = referenceTable.Select();
                    DataTable cloneTable = rowClone.CopyToDataTable();
    
                    double totalPrice = 0;
                    for (int i = 0; i &lt; rowClone.Length; i++)
                    {
                        totalPrice += Convert.ToDouble(rowClone[i]["Price"].ToString());
                    }
                    Object[] totalPriceRow = new Object[dataGridView1.ColumnCount];
                    for (int i = 0; i &lt; totalPriceRow.Length; i++)
                    {
                        if (dataGridView1.Columns[i].Name.Equals("Price"))
                            totalPriceRow[i] = totalPrice;
                        else
                            totalPriceRow[i] = null;
                    }
                    cloneTable.Rows.Add(totalPriceRow);
    
                    dataGridView1.DataSource = cloneTable;
                }
                catch (Exception ex)
                {
                    listBox1.Text = ex.Message;
                }
            }
        }
    }
    

    All of the above code, is of course, useless without the lengthy Designer class for which the windows forms are generated:

    namespace ADOWindowsForm
    {
        partial class Form1
        {
            /// <summary>
            /// Required designer variable.
            /// </summary>
            private System.ComponentModel.IContainer components = null;
    
            /// <summary>
            /// Clean up any resources being used.
            /// </summary>
            /// true if managed resources should be disposed; otherwise, false.
            protected override void Dispose(bool disposing)
            {
                if (disposing &amp;&amp; (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.btnShowCustomerTable = new System.Windows.Forms.Button();
                this.dataGridView1 = new System.Windows.Forms.DataGridView();
                this.btnAddRowCustomer = new System.Windows.Forms.Button();
                this.textBoxName = new System.Windows.Forms.TextBox();
                this.label1 = new System.Windows.Forms.Label();
                this.label2 = new System.Windows.Forms.Label();
                this.textBoxOrder = new System.Windows.Forms.TextBox();
                this.tabControl1 = new System.Windows.Forms.TabControl();
                this.tabPage1 = new System.Windows.Forms.TabPage();
                this.tabControl2 = new System.Windows.Forms.TabControl();
                this.tabPage6 = new System.Windows.Forms.TabPage();
                this.tabPage7 = new System.Windows.Forms.TabPage();
                this.txtBoxNewFoodPrice = new System.Windows.Forms.TextBox();
                this.label9 = new System.Windows.Forms.Label();
                this.label8 = new System.Windows.Forms.Label();
                this.txtboxNewFoodName = new System.Windows.Forms.TextBox();
                this.btnAddRowFood = new System.Windows.Forms.Button();
                this.tabPage3 = new System.Windows.Forms.TabPage();
                this.tabControl3 = new System.Windows.Forms.TabControl();
                this.tabPage8 = new System.Windows.Forms.TabPage();
                this.btnAlterCustomerRow = new System.Windows.Forms.Button();
                this.label3 = new System.Windows.Forms.Label();
                this.label5 = new System.Windows.Forms.Label();
                this.txtboxAlterCustomerWhereID = new System.Windows.Forms.TextBox();
                this.txtboxChangeCustomerOrder = new System.Windows.Forms.TextBox();
                this.txtboxChangeCustomerName = new System.Windows.Forms.TextBox();
                this.label4 = new System.Windows.Forms.Label();
                this.tabPage9 = new System.Windows.Forms.TabPage();
                this.txtboxChangeFoodPrice = new System.Windows.Forms.TextBox();
                this.label12 = new System.Windows.Forms.Label();
                this.label11 = new System.Windows.Forms.Label();
                this.txtboxChangeFoodName = new System.Windows.Forms.TextBox();
                this.txtboxAlterFoodWhereID = new System.Windows.Forms.TextBox();
                this.label10 = new System.Windows.Forms.Label();
                this.btnAlterFoodRow = new System.Windows.Forms.Button();
                this.tabPage4 = new System.Windows.Forms.TabPage();
                this.tabControl4 = new System.Windows.Forms.TabControl();
                this.tabPage10 = new System.Windows.Forms.TabPage();
                this.btnDeleteCustomerWhereID = new System.Windows.Forms.Button();
                this.txtBoxDeleteCustomerWhereID = new System.Windows.Forms.TextBox();
                this.label6 = new System.Windows.Forms.Label();
                this.tabPage11 = new System.Windows.Forms.TabPage();
                this.txtboxDeleteFoodWhereID = new System.Windows.Forms.TextBox();
                this.label13 = new System.Windows.Forms.Label();
                this.DeleteFoodWhereID = new System.Windows.Forms.Button();
                this.tabPage2 = new System.Windows.Forms.TabPage();
                this.tabControl5 = new System.Windows.Forms.TabControl();
                this.tabPage12 = new System.Windows.Forms.TabPage();
                this.textBoxSelectCustomerWhereOrderID = new System.Windows.Forms.TextBox();
                this.btnSelectCustomerWhereID = new System.Windows.Forms.Button();
                this.btnSelectCustomerWhereOrderID = new System.Windows.Forms.Button();
                this.btnSelectCustomerWhereOrder = new System.Windows.Forms.Button();
                this.textBoxSelectCustomerWhereID = new System.Windows.Forms.TextBox();
                this.textBoxSelectCustomerWhereOrder = new System.Windows.Forms.TextBox();
                this.tabPage13 = new System.Windows.Forms.TabPage();
                this.txtBoxSelectFoodWherePrice = new System.Windows.Forms.TextBox();
                this.SelectFoodWherePrice = new System.Windows.Forms.Button();
                this.comboBoxSelectWherePrice = new System.Windows.Forms.ComboBox();
                this.txtBoxSelectFoodWhereID = new System.Windows.Forms.TextBox();
                this.btnSelectFoodWhereID = new System.Windows.Forms.Button();
                this.tabPage5 = new System.Windows.Forms.TabPage();
                this.btnAggregateOrder = new System.Windows.Forms.Button();
                this.btnAggregateName = new System.Windows.Forms.Button();
                this.btnShowFoodTable = new System.Windows.Forms.Button();
                this.listBox1 = new System.Windows.Forms.RichTextBox();
                this.btnSelectFoodWhereName = new System.Windows.Forms.Button();
                this.txtBoxSelectFoodWhereName = new System.Windows.Forms.TextBox();
                this.tabControl6 = new System.Windows.Forms.TabControl();
                this.tabPage14 = new System.Windows.Forms.TabPage();
                this.tabPage16 = new System.Windows.Forms.TabPage();
                this.btnCustomSelection = new System.Windows.Forms.Button();
                this.label7 = new System.Windows.Forms.Label();
                this.txtBoxSelectFromTableName = new System.Windows.Forms.TextBox();
                this.label14 = new System.Windows.Forms.Label();
                this.label15 = new System.Windows.Forms.Label();
                this.txtBoxCustomSelectionStatement = new System.Windows.Forms.TextBox();
                this.btnDataGridViewTotalPrice = new System.Windows.Forms.Button();
                this.btnSelectCustomerWhereCustomer = new System.Windows.Forms.Button();
                this.textBoxSelectCustomerWhereCustomer = new System.Windows.Forms.TextBox();
                this.dataGridViewAddRowsCustomer = new System.Windows.Forms.DataGridView();
                this.btnAddRowsCustomer = new System.Windows.Forms.Button();
                this.dataGridViewAddRowsFood = new System.Windows.Forms.DataGridView();
                this.btnAddRowsFood = new System.Windows.Forms.Button();
                ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
                this.tabControl1.SuspendLayout();
                this.tabPage1.SuspendLayout();
                this.tabControl2.SuspendLayout();
                this.tabPage6.SuspendLayout();
                this.tabPage7.SuspendLayout();
                this.tabPage3.SuspendLayout();
                this.tabControl3.SuspendLayout();
                this.tabPage8.SuspendLayout();
                this.tabPage9.SuspendLayout();
                this.tabPage4.SuspendLayout();
                this.tabControl4.SuspendLayout();
                this.tabPage10.SuspendLayout();
                this.tabPage11.SuspendLayout();
                this.tabPage2.SuspendLayout();
                this.tabControl5.SuspendLayout();
                this.tabPage12.SuspendLayout();
                this.tabPage13.SuspendLayout();
                this.tabPage5.SuspendLayout();
                this.tabControl6.SuspendLayout();
                this.tabPage14.SuspendLayout();
                this.tabPage16.SuspendLayout();
                ((System.ComponentModel.ISupportInitialize)(this.dataGridViewAddRowsCustomer)).BeginInit();
                ((System.ComponentModel.ISupportInitialize)(this.dataGridViewAddRowsFood)).BeginInit();
                this.SuspendLayout();
                // 
                // btnShowCustomerTable
                // 
                this.btnShowCustomerTable.Location = new System.Drawing.Point(12, 217);
                this.btnShowCustomerTable.Name = "btnShowCustomerTable";
                this.btnShowCustomerTable.Size = new System.Drawing.Size(120, 23);
                this.btnShowCustomerTable.TabIndex = 1;
                this.btnShowCustomerTable.Text = "Show Customer Table";
                this.btnShowCustomerTable.UseVisualStyleBackColor = true;
                this.btnShowCustomerTable.Click += new System.EventHandler(this.btnShowCustomerTable_Click);
                // 
                // dataGridView1
                // 
                this.dataGridView1.AllowUserToOrderColumns = true;
                this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
                this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
                this.dataGridView1.Location = new System.Drawing.Point(138, 12);
                this.dataGridView1.Name = "dataGridView1";
                this.dataGridView1.Size = new System.Drawing.Size(553, 299);
                this.dataGridView1.TabIndex = 2;
                // 
                // btnAddRowCustomer
                // 
                this.btnAddRowCustomer.Location = new System.Drawing.Point(6, 6);
                this.btnAddRowCustomer.Name = "btnAddRowCustomer";
                this.btnAddRowCustomer.Size = new System.Drawing.Size(75, 23);
                this.btnAddRowCustomer.TabIndex = 3;
                this.btnAddRowCustomer.Text = "Add Row";
                this.btnAddRowCustomer.UseVisualStyleBackColor = true;
                this.btnAddRowCustomer.Click += new System.EventHandler(this.btnAddRowCustomer_Click);
                // 
                // textBoxName
                // 
                this.textBoxName.Location = new System.Drawing.Point(144, 6);
                this.textBoxName.Name = "textBoxName";
                this.textBoxName.Size = new System.Drawing.Size(100, 20);
                this.textBoxName.TabIndex = 5;
                // 
                // label1
                // 
                this.label1.AutoSize = true;
                this.label1.Location = new System.Drawing.Point(91, 11);
                this.label1.Name = "label1";
                this.label1.Size = new System.Drawing.Size(38, 13);
                this.label1.TabIndex = 8;
                this.label1.Text = "Name:";
                // 
                // label2
                // 
                this.label2.AutoSize = true;
                this.label2.Location = new System.Drawing.Point(91, 35);
                this.label2.Name = "label2";
                this.label2.Size = new System.Drawing.Size(47, 13);
                this.label2.TabIndex = 9;
                this.label2.Text = "OrderID:";
                // 
                // textBoxOrder
                // 
                this.textBoxOrder.Location = new System.Drawing.Point(144, 32);
                this.textBoxOrder.Name = "textBoxOrder";
                this.textBoxOrder.Size = new System.Drawing.Size(100, 20);
                this.textBoxOrder.TabIndex = 10;
                // 
                // tabControl1
                // 
                this.tabControl1.Controls.Add(this.tabPage1);
                this.tabControl1.Controls.Add(this.tabPage3);
                this.tabControl1.Controls.Add(this.tabPage4);
                this.tabControl1.Controls.Add(this.tabPage2);
                this.tabControl1.Controls.Add(this.tabPage5);
                this.tabControl1.Location = new System.Drawing.Point(13, 317);
                this.tabControl1.Name = "tabControl1";
                this.tabControl1.SelectedIndex = 0;
                this.tabControl1.Size = new System.Drawing.Size(678, 136);
                this.tabControl1.TabIndex = 13;
                // 
                // tabPage1
                // 
                this.tabPage1.Controls.Add(this.tabControl2);
                this.tabPage1.Location = new System.Drawing.Point(4, 22);
                this.tabPage1.Name = "tabPage1";
                this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage1.Size = new System.Drawing.Size(670, 110);
                this.tabPage1.TabIndex = 0;
                this.tabPage1.Text = "Add Row";
                this.tabPage1.UseVisualStyleBackColor = true;
                // 
                // tabControl2
                // 
                this.tabControl2.Controls.Add(this.tabPage6);
                this.tabControl2.Controls.Add(this.tabPage7);
                this.tabControl2.Location = new System.Drawing.Point(6, 3);
                this.tabControl2.Name = "tabControl2";
                this.tabControl2.SelectedIndex = 0;
                this.tabControl2.Size = new System.Drawing.Size(658, 101);
                this.tabControl2.TabIndex = 11;
                // 
                // tabPage6
                // 
                this.tabPage6.Controls.Add(this.btnAddRowsCustomer);
                this.tabPage6.Controls.Add(this.dataGridViewAddRowsCustomer);
                this.tabPage6.Controls.Add(this.btnAddRowCustomer);
                this.tabPage6.Controls.Add(this.textBoxName);
                this.tabPage6.Controls.Add(this.textBoxOrder);
                this.tabPage6.Controls.Add(this.label1);
                this.tabPage6.Controls.Add(this.label2);
                this.tabPage6.Location = new System.Drawing.Point(4, 22);
                this.tabPage6.Name = "tabPage6";
                this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage6.Size = new System.Drawing.Size(650, 75);
                this.tabPage6.TabIndex = 0;
                this.tabPage6.Text = "Customer";
                this.tabPage6.UseVisualStyleBackColor = true;
                // 
                // tabPage7
                // 
                this.tabPage7.Controls.Add(this.btnAddRowsFood);
                this.tabPage7.Controls.Add(this.dataGridViewAddRowsFood);
                this.tabPage7.Controls.Add(this.txtBoxNewFoodPrice);
                this.tabPage7.Controls.Add(this.label9);
                this.tabPage7.Controls.Add(this.label8);
                this.tabPage7.Controls.Add(this.txtboxNewFoodName);
                this.tabPage7.Controls.Add(this.btnAddRowFood);
                this.tabPage7.Location = new System.Drawing.Point(4, 22);
                this.tabPage7.Name = "tabPage7";
                this.tabPage7.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage7.Size = new System.Drawing.Size(650, 75);
                this.tabPage7.TabIndex = 1;
                this.tabPage7.Text = "Food";
                this.tabPage7.UseVisualStyleBackColor = true;
                // 
                // txtBoxNewFoodPrice
                // 
                this.txtBoxNewFoodPrice.Location = new System.Drawing.Point(143, 35);
                this.txtBoxNewFoodPrice.Name = "txtBoxNewFoodPrice";
                this.txtBoxNewFoodPrice.Size = new System.Drawing.Size(100, 20);
                this.txtBoxNewFoodPrice.TabIndex = 4;
                // 
                // label9
                // 
                this.label9.AutoSize = true;
                this.label9.Location = new System.Drawing.Point(88, 38);
                this.label9.Name = "label9";
                this.label9.Size = new System.Drawing.Size(34, 13);
                this.label9.TabIndex = 3;
                this.label9.Text = "Price:";
                // 
                // label8
                // 
                this.label8.AutoSize = true;
                this.label8.Location = new System.Drawing.Point(88, 12);
                this.label8.Name = "label8";
                this.label8.Size = new System.Drawing.Size(38, 13);
                this.label8.TabIndex = 2;
                this.label8.Text = "Name:";
                // 
                // txtboxNewFoodName
                // 
                this.txtboxNewFoodName.Location = new System.Drawing.Point(143, 9);
                this.txtboxNewFoodName.Name = "txtboxNewFoodName";
                this.txtboxNewFoodName.Size = new System.Drawing.Size(100, 20);
                this.txtboxNewFoodName.TabIndex = 1;
                // 
                // btnAddRowFood
                // 
                this.btnAddRowFood.Location = new System.Drawing.Point(7, 7);
                this.btnAddRowFood.Name = "btnAddRowFood";
                this.btnAddRowFood.Size = new System.Drawing.Size(75, 23);
                this.btnAddRowFood.TabIndex = 0;
                this.btnAddRowFood.Text = "Add Row";
                this.btnAddRowFood.UseVisualStyleBackColor = true;
                this.btnAddRowFood.Click += new System.EventHandler(this.btnAddRowFood_Click);
                // 
                // tabPage3
                // 
                this.tabPage3.Controls.Add(this.tabControl3);
                this.tabPage3.Location = new System.Drawing.Point(4, 22);
                this.tabPage3.Name = "tabPage3";
                this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage3.Size = new System.Drawing.Size(670, 110);
                this.tabPage3.TabIndex = 2;
                this.tabPage3.Text = "Alter Row";
                this.tabPage3.UseVisualStyleBackColor = true;
                // 
                // tabControl3
                // 
                this.tabControl3.Controls.Add(this.tabPage8);
                this.tabControl3.Controls.Add(this.tabPage9);
                this.tabControl3.Location = new System.Drawing.Point(6, 4);
                this.tabControl3.Name = "tabControl3";
                this.tabControl3.SelectedIndex = 0;
                this.tabControl3.Size = new System.Drawing.Size(658, 100);
                this.tabControl3.TabIndex = 7;
                // 
                // tabPage8
                // 
                this.tabPage8.Controls.Add(this.btnAlterCustomerRow);
                this.tabPage8.Controls.Add(this.label3);
                this.tabPage8.Controls.Add(this.label5);
                this.tabPage8.Controls.Add(this.txtboxAlterCustomerWhereID);
                this.tabPage8.Controls.Add(this.txtboxChangeCustomerOrder);
                this.tabPage8.Controls.Add(this.txtboxChangeCustomerName);
                this.tabPage8.Controls.Add(this.label4);
                this.tabPage8.Location = new System.Drawing.Point(4, 22);
                this.tabPage8.Name = "tabPage8";
                this.tabPage8.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage8.Size = new System.Drawing.Size(650, 74);
                this.tabPage8.TabIndex = 0;
                this.tabPage8.Text = "Customer";
                this.tabPage8.UseVisualStyleBackColor = true;
                // 
                // btnAlterCustomerRow
                // 
                this.btnAlterCustomerRow.Location = new System.Drawing.Point(6, 6);
                this.btnAlterCustomerRow.Name = "btnAlterCustomerRow";
                this.btnAlterCustomerRow.Size = new System.Drawing.Size(75, 23);
                this.btnAlterCustomerRow.TabIndex = 6;
                this.btnAlterCustomerRow.Text = "Alter Row";
                this.btnAlterCustomerRow.UseVisualStyleBackColor = true;
                this.btnAlterCustomerRow.Click += new System.EventHandler(this.btnAlterCustomerRow_Click);
                // 
                // label3
                // 
                this.label3.AutoSize = true;
                this.label3.Location = new System.Drawing.Point(93, 11);
                this.label3.Name = "label3";
                this.label3.Size = new System.Drawing.Size(94, 13);
                this.label3.TabIndex = 0;
                this.label3.Text = "Altering where ID: ";
                // 
                // label5
                // 
                this.label5.AutoSize = true;
                this.label5.Location = new System.Drawing.Point(298, 11);
                this.label5.Name = "label5";
                this.label5.Size = new System.Drawing.Size(87, 13);
                this.label5.TabIndex = 5;
                this.label5.Text = "Change OrderID:";
                // 
                // txtboxAlterCustomerWhereID
                // 
                this.txtboxAlterCustomerWhereID.Location = new System.Drawing.Point(185, 8);
                this.txtboxAlterCustomerWhereID.Name = "txtboxAlterCustomerWhereID";
                this.txtboxAlterCustomerWhereID.Size = new System.Drawing.Size(100, 20);
                this.txtboxAlterCustomerWhereID.TabIndex = 1;
                // 
                // txtboxChangeCustomerOrder
                // 
                this.txtboxChangeCustomerOrder.Location = new System.Drawing.Point(390, 8);
                this.txtboxChangeCustomerOrder.Name = "txtboxChangeCustomerOrder";
                this.txtboxChangeCustomerOrder.Size = new System.Drawing.Size(100, 20);
                this.txtboxChangeCustomerOrder.TabIndex = 4;
                // 
                // txtboxChangeCustomerName
                // 
                this.txtboxChangeCustomerName.Location = new System.Drawing.Point(185, 34);
                this.txtboxChangeCustomerName.Name = "txtboxChangeCustomerName";
                this.txtboxChangeCustomerName.Size = new System.Drawing.Size(100, 20);
                this.txtboxChangeCustomerName.TabIndex = 2;
                // 
                // label4
                // 
                this.label4.AutoSize = true;
                this.label4.Location = new System.Drawing.Point(93, 37);
                this.label4.Name = "label4";
                this.label4.Size = new System.Drawing.Size(78, 13);
                this.label4.TabIndex = 3;
                this.label4.Text = "Change Name:";
                // 
                // tabPage9
                // 
                this.tabPage9.Controls.Add(this.txtboxChangeFoodPrice);
                this.tabPage9.Controls.Add(this.label12);
                this.tabPage9.Controls.Add(this.label11);
                this.tabPage9.Controls.Add(this.txtboxChangeFoodName);
                this.tabPage9.Controls.Add(this.txtboxAlterFoodWhereID);
                this.tabPage9.Controls.Add(this.label10);
                this.tabPage9.Controls.Add(this.btnAlterFoodRow);
                this.tabPage9.Location = new System.Drawing.Point(4, 22);
                this.tabPage9.Name = "tabPage9";
                this.tabPage9.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage9.Size = new System.Drawing.Size(650, 74);
                this.tabPage9.TabIndex = 1;
                this.tabPage9.Text = "Food";
                this.tabPage9.UseVisualStyleBackColor = true;
                // 
                // txtboxChangeFoodPrice
                // 
                this.txtboxChangeFoodPrice.Location = new System.Drawing.Point(370, 8);
                this.txtboxChangeFoodPrice.Name = "txtboxChangeFoodPrice";
                this.txtboxChangeFoodPrice.Size = new System.Drawing.Size(100, 20);
                this.txtboxChangeFoodPrice.TabIndex = 6;
                // 
                // label12
                // 
                this.label12.AutoSize = true;
                this.label12.Location = new System.Drawing.Point(290, 11);
                this.label12.Name = "label12";
                this.label12.Size = new System.Drawing.Size(74, 13);
                this.label12.TabIndex = 5;
                this.label12.Text = "Change Price:";
                // 
                // label11
                // 
                this.label11.AutoSize = true;
                this.label11.Location = new System.Drawing.Point(87, 38);
                this.label11.Name = "label11";
                this.label11.Size = new System.Drawing.Size(78, 13);
                this.label11.TabIndex = 4;
                this.label11.Text = "Change Name:";
                // 
                // txtboxChangeFoodName
                // 
                this.txtboxChangeFoodName.Location = new System.Drawing.Point(184, 35);
                this.txtboxChangeFoodName.Name = "txtboxChangeFoodName";
                this.txtboxChangeFoodName.Size = new System.Drawing.Size(100, 20);
                this.txtboxChangeFoodName.TabIndex = 3;
                // 
                // txtboxAlterFoodWhereID
                // 
                this.txtboxAlterFoodWhereID.Location = new System.Drawing.Point(184, 8);
                this.txtboxAlterFoodWhereID.Name = "txtboxAlterFoodWhereID";
                this.txtboxAlterFoodWhereID.Size = new System.Drawing.Size(100, 20);
                this.txtboxAlterFoodWhereID.TabIndex = 2;
                // 
                // label10
                // 
                this.label10.AutoSize = true;
                this.label10.Location = new System.Drawing.Point(87, 11);
                this.label10.Name = "label10";
                this.label10.Size = new System.Drawing.Size(91, 13);
                this.label10.TabIndex = 1;
                this.label10.Text = "Altering where ID:";
                // 
                // btnAlterFoodRow
                // 
                this.btnAlterFoodRow.Location = new System.Drawing.Point(6, 6);
                this.btnAlterFoodRow.Name = "btnAlterFoodRow";
                this.btnAlterFoodRow.Size = new System.Drawing.Size(75, 23);
                this.btnAlterFoodRow.TabIndex = 0;
                this.btnAlterFoodRow.Text = "Alter Row";
                this.btnAlterFoodRow.UseVisualStyleBackColor = true;
                this.btnAlterFoodRow.Click += new System.EventHandler(this.btnAlterFoodRow_Click);
                // 
                // tabPage4
                // 
                this.tabPage4.Controls.Add(this.tabControl4);
                this.tabPage4.Location = new System.Drawing.Point(4, 22);
                this.tabPage4.Name = "tabPage4";
                this.tabPage4.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage4.Size = new System.Drawing.Size(670, 110);
                this.tabPage4.TabIndex = 4;
                this.tabPage4.Text = "Delete Row";
                this.tabPage4.UseVisualStyleBackColor = true;
                // 
                // tabControl4
                // 
                this.tabControl4.Controls.Add(this.tabPage10);
                this.tabControl4.Controls.Add(this.tabPage11);
                this.tabControl4.Location = new System.Drawing.Point(6, 4);
                this.tabControl4.Name = "tabControl4";
                this.tabControl4.SelectedIndex = 0;
                this.tabControl4.Size = new System.Drawing.Size(658, 100);
                this.tabControl4.TabIndex = 3;
                // 
                // tabPage10
                // 
                this.tabPage10.Controls.Add(this.btnDeleteCustomerWhereID);
                this.tabPage10.Controls.Add(this.txtBoxDeleteCustomerWhereID);
                this.tabPage10.Controls.Add(this.label6);
                this.tabPage10.Location = new System.Drawing.Point(4, 22);
                this.tabPage10.Name = "tabPage10";
                this.tabPage10.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage10.Size = new System.Drawing.Size(650, 74);
                this.tabPage10.TabIndex = 0;
                this.tabPage10.Text = "Customer";
                this.tabPage10.UseVisualStyleBackColor = true;
                // 
                // btnDeleteCustomerWhereID
                // 
                this.btnDeleteCustomerWhereID.Location = new System.Drawing.Point(6, 6);
                this.btnDeleteCustomerWhereID.Name = "btnDeleteCustomerWhereID";
                this.btnDeleteCustomerWhereID.Size = new System.Drawing.Size(75, 23);
                this.btnDeleteCustomerWhereID.TabIndex = 0;
                this.btnDeleteCustomerWhereID.Text = "Delete Row";
                this.btnDeleteCustomerWhereID.UseVisualStyleBackColor = true;
                this.btnDeleteCustomerWhereID.Click += new System.EventHandler(this.btnDeleteCustomerWhereID_Click);
                // 
                // txtBoxDeleteCustomerWhereID
                // 
                this.txtBoxDeleteCustomerWhereID.Location = new System.Drawing.Point(150, 8);
                this.txtBoxDeleteCustomerWhereID.Name = "txtBoxDeleteCustomerWhereID";
                this.txtBoxDeleteCustomerWhereID.Size = new System.Drawing.Size(100, 20);
                this.txtBoxDeleteCustomerWhereID.TabIndex = 2;
                // 
                // label6
                // 
                this.label6.AutoSize = true;
                this.label6.Location = new System.Drawing.Point(87, 11);
                this.label6.Name = "label6";
                this.label6.Size = new System.Drawing.Size(56, 13);
                this.label6.TabIndex = 1;
                this.label6.Text = "Where ID:";
                // 
                // tabPage11
                // 
                this.tabPage11.Controls.Add(this.txtboxDeleteFoodWhereID);
                this.tabPage11.Controls.Add(this.label13);
                this.tabPage11.Controls.Add(this.DeleteFoodWhereID);
                this.tabPage11.Location = new System.Drawing.Point(4, 22);
                this.tabPage11.Name = "tabPage11";
                this.tabPage11.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage11.Size = new System.Drawing.Size(650, 74);
                this.tabPage11.TabIndex = 1;
                this.tabPage11.Text = "Food";
                this.tabPage11.UseVisualStyleBackColor = true;
                // 
                // txtboxDeleteFoodWhereID
                // 
                this.txtboxDeleteFoodWhereID.Location = new System.Drawing.Point(151, 9);
                this.txtboxDeleteFoodWhereID.Name = "txtboxDeleteFoodWhereID";
                this.txtboxDeleteFoodWhereID.Size = new System.Drawing.Size(100, 20);
                this.txtboxDeleteFoodWhereID.TabIndex = 2;
                // 
                // label13
                // 
                this.label13.AutoSize = true;
                this.label13.Location = new System.Drawing.Point(88, 12);
                this.label13.Name = "label13";
                this.label13.Size = new System.Drawing.Size(56, 13);
                this.label13.TabIndex = 1;
                this.label13.Text = "Where ID:";
                // 
                // DeleteFoodWhereID
                // 
                this.DeleteFoodWhereID.Location = new System.Drawing.Point(7, 7);
                this.DeleteFoodWhereID.Name = "DeleteFoodWhereID";
                this.DeleteFoodWhereID.Size = new System.Drawing.Size(75, 23);
                this.DeleteFoodWhereID.TabIndex = 0;
                this.DeleteFoodWhereID.Text = "Delete Row";
                this.DeleteFoodWhereID.UseVisualStyleBackColor = true;
                this.DeleteFoodWhereID.Click += new System.EventHandler(this.DeleteFoodWhereID_Click);
                // 
                // tabPage2
                // 
                this.tabPage2.Controls.Add(this.tabControl5);
                this.tabPage2.Location = new System.Drawing.Point(4, 22);
                this.tabPage2.Name = "tabPage2";
                this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage2.Size = new System.Drawing.Size(670, 110);
                this.tabPage2.TabIndex = 5;
                this.tabPage2.Text = "Select";
                this.tabPage2.UseVisualStyleBackColor = true;
                // 
                // tabControl5
                // 
                this.tabControl5.Controls.Add(this.tabPage12);
                this.tabControl5.Controls.Add(this.tabPage13);
                this.tabControl5.Controls.Add(this.tabPage16);
                this.tabControl5.Location = new System.Drawing.Point(6, 4);
                this.tabControl5.Name = "tabControl5";
                this.tabControl5.SelectedIndex = 0;
                this.tabControl5.Size = new System.Drawing.Size(673, 100);
                this.tabControl5.TabIndex = 14;
                // 
                // tabPage12
                // 
                this.tabPage12.Controls.Add(this.textBoxSelectCustomerWhereCustomer);
                this.tabPage12.Controls.Add(this.btnSelectCustomerWhereCustomer);
                this.tabPage12.Controls.Add(this.textBoxSelectCustomerWhereOrderID);
                this.tabPage12.Controls.Add(this.btnSelectCustomerWhereID);
                this.tabPage12.Controls.Add(this.btnSelectCustomerWhereOrderID);
                this.tabPage12.Controls.Add(this.btnSelectCustomerWhereOrder);
                this.tabPage12.Controls.Add(this.textBoxSelectCustomerWhereID);
                this.tabPage12.Controls.Add(this.textBoxSelectCustomerWhereOrder);
                this.tabPage12.Location = new System.Drawing.Point(4, 22);
                this.tabPage12.Name = "tabPage12";
                this.tabPage12.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage12.Size = new System.Drawing.Size(665, 74);
                this.tabPage12.TabIndex = 0;
                this.tabPage12.Text = "Customer";
                this.tabPage12.UseVisualStyleBackColor = true;
                // 
                // textBoxSelectCustomerWhereOrderID
                // 
                this.textBoxSelectCustomerWhereOrderID.Location = new System.Drawing.Point(466, 8);
                this.textBoxSelectCustomerWhereOrderID.Name = "textBoxSelectCustomerWhereOrderID";
                this.textBoxSelectCustomerWhereOrderID.Size = new System.Drawing.Size(100, 20);
                this.textBoxSelectCustomerWhereOrderID.TabIndex = 14;
                // 
                // btnSelectCustomerWhereID
                // 
                this.btnSelectCustomerWhereID.Location = new System.Drawing.Point(6, 6);
                this.btnSelectCustomerWhereID.Name = "btnSelectCustomerWhereID";
                this.btnSelectCustomerWhereID.Size = new System.Drawing.Size(171, 23);
                this.btnSelectCustomerWhereID.TabIndex = 6;
                this.btnSelectCustomerWhereID.Text = "Select Where ID";
                this.btnSelectCustomerWhereID.UseVisualStyleBackColor = true;
                this.btnSelectCustomerWhereID.Click += new System.EventHandler(this.btnSelectCustomerWhereID_Click);
                // 
                // btnSelectCustomerWhereOrderID
                // 
                this.btnSelectCustomerWhereOrderID.Location = new System.Drawing.Point(289, 6);
                this.btnSelectCustomerWhereOrderID.Name = "btnSelectCustomerWhereOrderID";
                this.btnSelectCustomerWhereOrderID.Size = new System.Drawing.Size(171, 23);
                this.btnSelectCustomerWhereOrderID.TabIndex = 13;
                this.btnSelectCustomerWhereOrderID.Text = "Select Where OrderID";
                this.btnSelectCustomerWhereOrderID.UseVisualStyleBackColor = true;
                this.btnSelectCustomerWhereOrderID.Click += new System.EventHandler(this.btnSelectCustomerWhereOrderID_Click);
                // 
                // btnSelectCustomerWhereOrder
                // 
                this.btnSelectCustomerWhereOrder.Location = new System.Drawing.Point(6, 32);
                this.btnSelectCustomerWhereOrder.Name = "btnSelectCustomerWhereOrder";
                this.btnSelectCustomerWhereOrder.Size = new System.Drawing.Size(171, 23);
                this.btnSelectCustomerWhereOrder.TabIndex = 11;
                this.btnSelectCustomerWhereOrder.Text = "Select Where Order";
                this.btnSelectCustomerWhereOrder.UseVisualStyleBackColor = true;
                this.btnSelectCustomerWhereOrder.Click += new System.EventHandler(this.btnSelectCustomerWhereOrder_Click);
                // 
                // textBoxSelectCustomerWhereID
                // 
                this.textBoxSelectCustomerWhereID.Location = new System.Drawing.Point(183, 8);
                this.textBoxSelectCustomerWhereID.Name = "textBoxSelectCustomerWhereID";
                this.textBoxSelectCustomerWhereID.Size = new System.Drawing.Size(100, 20);
                this.textBoxSelectCustomerWhereID.TabIndex = 7;
                // 
                // textBoxSelectCustomerWhereOrder
                // 
                this.textBoxSelectCustomerWhereOrder.Location = new System.Drawing.Point(183, 36);
                this.textBoxSelectCustomerWhereOrder.Name = "textBoxSelectCustomerWhereOrder";
                this.textBoxSelectCustomerWhereOrder.Size = new System.Drawing.Size(97, 20);
                this.textBoxSelectCustomerWhereOrder.TabIndex = 12;
                // 
                // tabPage13
                // 
                this.tabPage13.Controls.Add(this.txtBoxSelectFoodWhereName);
                this.tabPage13.Controls.Add(this.btnSelectFoodWhereName);
                this.tabPage13.Controls.Add(this.txtBoxSelectFoodWherePrice);
                this.tabPage13.Controls.Add(this.SelectFoodWherePrice);
                this.tabPage13.Controls.Add(this.comboBoxSelectWherePrice);
                this.tabPage13.Controls.Add(this.txtBoxSelectFoodWhereID);
                this.tabPage13.Controls.Add(this.btnSelectFoodWhereID);
                this.tabPage13.Location = new System.Drawing.Point(4, 22);
                this.tabPage13.Name = "tabPage13";
                this.tabPage13.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage13.Size = new System.Drawing.Size(665, 74);
                this.tabPage13.TabIndex = 1;
                this.tabPage13.Text = "Food";
                this.tabPage13.UseVisualStyleBackColor = true;
                // 
                // txtBoxSelectFoodWherePrice
                // 
                this.txtBoxSelectFoodWherePrice.Location = new System.Drawing.Point(280, 36);
                this.txtBoxSelectFoodWherePrice.Name = "txtBoxSelectFoodWherePrice";
                this.txtBoxSelectFoodWherePrice.Size = new System.Drawing.Size(100, 20);
                this.txtBoxSelectFoodWherePrice.TabIndex = 4;
                // 
                // SelectFoodWherePrice
                // 
                this.SelectFoodWherePrice.Location = new System.Drawing.Point(6, 34);
                this.SelectFoodWherePrice.Name = "SelectFoodWherePrice";
                this.SelectFoodWherePrice.Size = new System.Drawing.Size(127, 23);
                this.SelectFoodWherePrice.TabIndex = 3;
                this.SelectFoodWherePrice.Text = "Select Where Price:";
                this.SelectFoodWherePrice.UseVisualStyleBackColor = true;
                this.SelectFoodWherePrice.Click += new System.EventHandler(this.SelectFoodWherePrice_Click);
                // 
                // comboBoxSelectWherePrice
                // 
                this.comboBoxSelectWherePrice.FormattingEnabled = true;
                this.comboBoxSelectWherePrice.Location = new System.Drawing.Point(140, 36);
                this.comboBoxSelectWherePrice.Name = "comboBoxSelectWherePrice";
                this.comboBoxSelectWherePrice.Size = new System.Drawing.Size(134, 21);
                this.comboBoxSelectWherePrice.TabIndex = 2;
                // 
                // txtBoxSelectFoodWhereID
                // 
                this.txtBoxSelectFoodWhereID.Location = new System.Drawing.Point(140, 9);
                this.txtBoxSelectFoodWhereID.Name = "txtBoxSelectFoodWhereID";
                this.txtBoxSelectFoodWhereID.Size = new System.Drawing.Size(134, 20);
                this.txtBoxSelectFoodWhereID.TabIndex = 1;
                // 
                // btnSelectFoodWhereID
                // 
                this.btnSelectFoodWhereID.Location = new System.Drawing.Point(7, 7);
                this.btnSelectFoodWhereID.Name = "btnSelectFoodWhereID";
                this.btnSelectFoodWhereID.Size = new System.Drawing.Size(127, 23);
                this.btnSelectFoodWhereID.TabIndex = 0;
                this.btnSelectFoodWhereID.Text = "Select Where ID:";
                this.btnSelectFoodWhereID.UseVisualStyleBackColor = true;
                this.btnSelectFoodWhereID.Click += new System.EventHandler(this.btnSelectFoodWhereID_Click);
                // 
                // tabPage5
                // 
                this.tabPage5.Controls.Add(this.tabControl6);
                this.tabPage5.Location = new System.Drawing.Point(4, 22);
                this.tabPage5.Name = "tabPage5";
                this.tabPage5.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage5.Size = new System.Drawing.Size(670, 110);
                this.tabPage5.TabIndex = 6;
                this.tabPage5.Text = "Aggregate";
                this.tabPage5.UseVisualStyleBackColor = true;
                // 
                // btnAggregateOrder
                // 
                this.btnAggregateOrder.Location = new System.Drawing.Point(6, 35);
                this.btnAggregateOrder.Name = "btnAggregateOrder";
                this.btnAggregateOrder.Size = new System.Drawing.Size(125, 23);
                this.btnAggregateOrder.TabIndex = 1;
                this.btnAggregateOrder.Text = "Aggregate by Order";
                this.btnAggregateOrder.UseVisualStyleBackColor = true;
                this.btnAggregateOrder.Click += new System.EventHandler(this.btnAggregateOrder_Click);
                // 
                // btnAggregateName
                // 
                this.btnAggregateName.Location = new System.Drawing.Point(6, 6);
                this.btnAggregateName.Name = "btnAggregateName";
                this.btnAggregateName.Size = new System.Drawing.Size(125, 23);
                this.btnAggregateName.TabIndex = 0;
                this.btnAggregateName.Text = "Aggregate by Name";
                this.btnAggregateName.UseVisualStyleBackColor = true;
                this.btnAggregateName.Click += new System.EventHandler(this.btnAggregateName_Click);
                // 
                // btnShowFoodTable
                // 
                this.btnShowFoodTable.Location = new System.Drawing.Point(13, 247);
                this.btnShowFoodTable.Name = "btnShowFoodTable";
                this.btnShowFoodTable.Size = new System.Drawing.Size(119, 23);
                this.btnShowFoodTable.TabIndex = 14;
                this.btnShowFoodTable.Text = "Show Food Table";
                this.btnShowFoodTable.UseVisualStyleBackColor = true;
                this.btnShowFoodTable.Click += new System.EventHandler(this.btnShowFoodTable_Click);
                // 
                // listBox1
                // 
                this.listBox1.Location = new System.Drawing.Point(12, 12);
                this.listBox1.Name = "listBox1";
                this.listBox1.ReadOnly = true;
                this.listBox1.Size = new System.Drawing.Size(120, 199);
                this.listBox1.TabIndex = 15;
                this.listBox1.Text = "";
                // 
                // btnSelectFoodWhereName
                // 
                this.btnSelectFoodWhereName.Location = new System.Drawing.Point(387, 7);
                this.btnSelectFoodWhereName.Name = "btnSelectFoodWhereName";
                this.btnSelectFoodWhereName.Size = new System.Drawing.Size(115, 23);
                this.btnSelectFoodWhereName.TabIndex = 6;
                this.btnSelectFoodWhereName.Text = "Select Where Name:";
                this.btnSelectFoodWhereName.UseVisualStyleBackColor = true;
                this.btnSelectFoodWhereName.Click += new System.EventHandler(this.btnSelectFoodWhereName_Click);
                // 
                // txtBoxSelectFoodWhereName
                // 
                this.txtBoxSelectFoodWhereName.Location = new System.Drawing.Point(508, 9);
                this.txtBoxSelectFoodWhereName.Name = "txtBoxSelectFoodWhereName";
                this.txtBoxSelectFoodWhereName.Size = new System.Drawing.Size(100, 20);
                this.txtBoxSelectFoodWhereName.TabIndex = 7;
                // 
                // tabControl6
                // 
                this.tabControl6.Controls.Add(this.tabPage14);
                this.tabControl6.Location = new System.Drawing.Point(6, 7);
                this.tabControl6.Name = "tabControl6";
                this.tabControl6.SelectedIndex = 0;
                this.tabControl6.Size = new System.Drawing.Size(658, 100);
                this.tabControl6.TabIndex = 2;
                // 
                // tabPage14
                // 
                this.tabPage14.Controls.Add(this.btnAggregateName);
                this.tabPage14.Controls.Add(this.btnAggregateOrder);
                this.tabPage14.Location = new System.Drawing.Point(4, 22);
                this.tabPage14.Name = "tabPage14";
                this.tabPage14.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage14.Size = new System.Drawing.Size(650, 74);
                this.tabPage14.TabIndex = 0;
                this.tabPage14.Text = "Customer";
                this.tabPage14.UseVisualStyleBackColor = true;
                // 
                // tabPage16
                // 
                this.tabPage16.Controls.Add(this.txtBoxCustomSelectionStatement);
                this.tabPage16.Controls.Add(this.label15);
                this.tabPage16.Controls.Add(this.label14);
                this.tabPage16.Controls.Add(this.txtBoxSelectFromTableName);
                this.tabPage16.Controls.Add(this.label7);
                this.tabPage16.Controls.Add(this.btnCustomSelection);
                this.tabPage16.Location = new System.Drawing.Point(4, 22);
                this.tabPage16.Name = "tabPage16";
                this.tabPage16.Padding = new System.Windows.Forms.Padding(3);
                this.tabPage16.Size = new System.Drawing.Size(665, 74);
                this.tabPage16.TabIndex = 2;
                this.tabPage16.Text = "Custom";
                this.tabPage16.UseVisualStyleBackColor = true;
                // 
                // btnCustomSelection
                // 
                this.btnCustomSelection.Location = new System.Drawing.Point(448, 22);
                this.btnCustomSelection.Name = "btnCustomSelection";
                this.btnCustomSelection.Size = new System.Drawing.Size(75, 23);
                this.btnCustomSelection.TabIndex = 0;
                this.btnCustomSelection.Text = "Select";
                this.btnCustomSelection.UseVisualStyleBackColor = true;
                this.btnCustomSelection.Click += new System.EventHandler(this.btnCustomSelection_Click);
                // 
                // label7
                // 
                this.label7.AutoSize = true;
                this.label7.Location = new System.Drawing.Point(7, 7);
                this.label7.Name = "label7";
                this.label7.Size = new System.Drawing.Size(65, 13);
                this.label7.TabIndex = 1;
                this.label7.Text = "Table Name";
                // 
                // txtBoxSelectFromTableName
                // 
                this.txtBoxSelectFromTableName.Location = new System.Drawing.Point(10, 24);
                this.txtBoxSelectFromTableName.Name = "txtBoxSelectFromTableName";
                this.txtBoxSelectFromTableName.Size = new System.Drawing.Size(100, 20);
                this.txtBoxSelectFromTableName.TabIndex = 2;
                // 
                // label14
                // 
                this.label14.AutoSize = true;
                this.label14.Location = new System.Drawing.Point(123, 7);
                this.label14.Name = "label14";
                this.label14.Size = new System.Drawing.Size(0, 13);
                this.label14.TabIndex = 3;
                // 
                // label15
                // 
                this.label15.AutoSize = true;
                this.label15.Location = new System.Drawing.Point(116, 8);
                this.label15.Name = "label15";
                this.label15.Size = new System.Drawing.Size(102, 13);
                this.label15.TabIndex = 4;
                this.label15.Text = "Selection Statement";
                // 
                // txtBoxCustomSelectionStatement
                // 
                this.txtBoxCustomSelectionStatement.Location = new System.Drawing.Point(117, 24);
                this.txtBoxCustomSelectionStatement.Name = "txtBoxCustomSelectionStatement";
                this.txtBoxCustomSelectionStatement.Size = new System.Drawing.Size(325, 20);
                this.txtBoxCustomSelectionStatement.TabIndex = 5;
                // 
                // btnDataGridViewTotalPrice
                // 
                this.btnDataGridViewTotalPrice.Location = new System.Drawing.Point(13, 277);
                this.btnDataGridViewTotalPrice.Name = "btnDataGridViewTotalPrice";
                this.btnDataGridViewTotalPrice.Size = new System.Drawing.Size(119, 23);
                this.btnDataGridViewTotalPrice.TabIndex = 16;
                this.btnDataGridViewTotalPrice.Text = "Total Price";
                this.btnDataGridViewTotalPrice.UseVisualStyleBackColor = true;
                this.btnDataGridViewTotalPrice.Click += new System.EventHandler(this.btnDataGridViewTotalPrice_Click);
                // 
                // btnSelectCustomerWhereCustomer
                // 
                this.btnSelectCustomerWhereCustomer.Location = new System.Drawing.Point(289, 32);
                this.btnSelectCustomerWhereCustomer.Name = "btnSelectCustomerWhereCustomer";
                this.btnSelectCustomerWhereCustomer.Size = new System.Drawing.Size(171, 23);
                this.btnSelectCustomerWhereCustomer.TabIndex = 15;
                this.btnSelectCustomerWhereCustomer.Text = "Select Where Customer";
                this.btnSelectCustomerWhereCustomer.UseVisualStyleBackColor = true;
                this.btnSelectCustomerWhereCustomer.Click += new System.EventHandler(this.btnSelectCustomerWhereCustomer_Click);
                // 
                // textBoxSelectCustomerWhereCustomer
                // 
                this.textBoxSelectCustomerWhereCustomer.Location = new System.Drawing.Point(467, 34);
                this.textBoxSelectCustomerWhereCustomer.Name = "textBoxSelectCustomerWhereCustomer";
                this.textBoxSelectCustomerWhereCustomer.Size = new System.Drawing.Size(100, 20);
                this.textBoxSelectCustomerWhereCustomer.TabIndex = 16;
                // 
                // dataGridViewAddRowsCustomer
                // 
                this.dataGridViewAddRowsCustomer.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
                this.dataGridViewAddRowsCustomer.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
                this.dataGridViewAddRowsCustomer.Location = new System.Drawing.Point(376, 6);
                this.dataGridViewAddRowsCustomer.Name = "dataGridViewAddRowsCustomer";
                this.dataGridViewAddRowsCustomer.Size = new System.Drawing.Size(268, 63);
                this.dataGridViewAddRowsCustomer.TabIndex = 11;
                // 
                // btnAddRowsCustomer
                // 
                this.btnAddRowsCustomer.Location = new System.Drawing.Point(295, 6);
                this.btnAddRowsCustomer.Name = "btnAddRowsCustomer";
                this.btnAddRowsCustomer.Size = new System.Drawing.Size(75, 23);
                this.btnAddRowsCustomer.TabIndex = 12;
                this.btnAddRowsCustomer.Text = "Add Rows";
                this.btnAddRowsCustomer.UseVisualStyleBackColor = true;
                this.btnAddRowsCustomer.Click += new System.EventHandler(this.btnAddRowsCustomer_Click);
                // 
                // dataGridViewAddRowsFood
                // 
                this.dataGridViewAddRowsFood.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
                this.dataGridViewAddRowsFood.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
                this.dataGridViewAddRowsFood.Location = new System.Drawing.Point(375, 6);
                this.dataGridViewAddRowsFood.Name = "dataGridViewAddRowsFood";
                this.dataGridViewAddRowsFood.Size = new System.Drawing.Size(269, 63);
                this.dataGridViewAddRowsFood.TabIndex = 5;
                // 
                // btnAddRowsFood
                // 
                this.btnAddRowsFood.Location = new System.Drawing.Point(294, 9);
                this.btnAddRowsFood.Name = "btnAddRowsFood";
                this.btnAddRowsFood.Size = new System.Drawing.Size(75, 23);
                this.btnAddRowsFood.TabIndex = 13;
                this.btnAddRowsFood.Text = "Add Rows";
                this.btnAddRowsFood.UseVisualStyleBackColor = true;
                this.btnAddRowsFood.Click += new System.EventHandler(this.btnAddRowsFood_Click);
                // 
                // Form1
                // 
                this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
                this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
                this.ClientSize = new System.Drawing.Size(705, 465);
                this.Controls.Add(this.btnDataGridViewTotalPrice);
                this.Controls.Add(this.listBox1);
                this.Controls.Add(this.btnShowFoodTable);
                this.Controls.Add(this.dataGridView1);
                this.Controls.Add(this.btnShowCustomerTable);
                this.Controls.Add(this.tabControl1);
                this.Name = "Form1";
                this.Text = "ADO Windows Form";
                ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
                this.tabControl1.ResumeLayout(false);
                this.tabPage1.ResumeLayout(false);
                this.tabControl2.ResumeLayout(false);
                this.tabPage6.ResumeLayout(false);
                this.tabPage6.PerformLayout();
                this.tabPage7.ResumeLayout(false);
                this.tabPage7.PerformLayout();
                this.tabPage3.ResumeLayout(false);
                this.tabControl3.ResumeLayout(false);
                this.tabPage8.ResumeLayout(false);
                this.tabPage8.PerformLayout();
                this.tabPage9.ResumeLayout(false);
                this.tabPage9.PerformLayout();
                this.tabPage4.ResumeLayout(false);
                this.tabControl4.ResumeLayout(false);
                this.tabPage10.ResumeLayout(false);
                this.tabPage10.PerformLayout();
                this.tabPage11.ResumeLayout(false);
                this.tabPage11.PerformLayout();
                this.tabPage2.ResumeLayout(false);
                this.tabControl5.ResumeLayout(false);
                this.tabPage12.ResumeLayout(false);
                this.tabPage12.PerformLayout();
                this.tabPage13.ResumeLayout(false);
                this.tabPage13.PerformLayout();
                this.tabPage5.ResumeLayout(false);
                this.tabControl6.ResumeLayout(false);
                this.tabPage14.ResumeLayout(false);
                this.tabPage16.ResumeLayout(false);
                this.tabPage16.PerformLayout();
                ((System.ComponentModel.ISupportInitialize)(this.dataGridViewAddRowsCustomer)).EndInit();
                ((System.ComponentModel.ISupportInitialize)(this.dataGridViewAddRowsFood)).EndInit();
                this.ResumeLayout(false);
    
            }
    
            #endregion
    
            private System.Windows.Forms.Button btnShowCustomerTable;
            private System.Windows.Forms.Button btnAddRowCustomer;
            private System.Windows.Forms.TextBox textBoxName;
            private System.Windows.Forms.DataGridView dataGridView1;
            private System.Windows.Forms.Label label1;
            private System.Windows.Forms.Label label2;
            private System.Windows.Forms.TextBox textBoxOrder;
            private System.Windows.Forms.TabControl tabControl1;
            private System.Windows.Forms.TabPage tabPage1;
            private System.Windows.Forms.TabPage tabPage3;
            private System.Windows.Forms.Button btnAlterCustomerRow;
            private System.Windows.Forms.Label label5;
            private System.Windows.Forms.TextBox txtboxChangeCustomerOrder;
            private System.Windows.Forms.Label label4;
            private System.Windows.Forms.TextBox txtboxChangeCustomerName;
            private System.Windows.Forms.TextBox txtboxAlterCustomerWhereID;
            private System.Windows.Forms.Label label3;
            private System.Windows.Forms.TabPage tabPage4;
            private System.Windows.Forms.TextBox txtBoxDeleteCustomerWhereID;
            private System.Windows.Forms.Label label6;
            private System.Windows.Forms.Button btnDeleteCustomerWhereID;
            private System.Windows.Forms.TabPage tabPage2;
            private System.Windows.Forms.Button btnSelectCustomerWhereID;
            private System.Windows.Forms.TextBox textBoxSelectCustomerWhereOrder;
            private System.Windows.Forms.TextBox textBoxSelectCustomerWhereID;
            private System.Windows.Forms.Button btnSelectCustomerWhereOrder;
            private System.Windows.Forms.TabPage tabPage5;
            private System.Windows.Forms.Button btnAggregateOrder;
            private System.Windows.Forms.Button btnAggregateName;
            private System.Windows.Forms.Button btnShowFoodTable;
            private System.Windows.Forms.TabControl tabControl2;
            private System.Windows.Forms.TabPage tabPage6;
            private System.Windows.Forms.TabPage tabPage7;
            private System.Windows.Forms.Button btnAddRowFood;
            private System.Windows.Forms.Label label9;
            private System.Windows.Forms.Label label8;
            private System.Windows.Forms.TextBox txtboxNewFoodName;
            private System.Windows.Forms.TextBox txtBoxNewFoodPrice;
            private System.Windows.Forms.TabControl tabControl3;
            private System.Windows.Forms.TabPage tabPage8;
            private System.Windows.Forms.TabPage tabPage9;
            private System.Windows.Forms.Button btnAlterFoodRow;
            private System.Windows.Forms.Label label10;
            private System.Windows.Forms.TextBox txtboxChangeFoodPrice;
            private System.Windows.Forms.Label label12;
            private System.Windows.Forms.Label label11;
            private System.Windows.Forms.TextBox txtboxChangeFoodName;
            private System.Windows.Forms.TextBox txtboxAlterFoodWhereID;
            private System.Windows.Forms.TabControl tabControl4;
            private System.Windows.Forms.TabPage tabPage10;
            private System.Windows.Forms.TabPage tabPage11;
            private System.Windows.Forms.Button DeleteFoodWhereID;
            private System.Windows.Forms.TextBox txtboxDeleteFoodWhereID;
            private System.Windows.Forms.Label label13;
            private System.Windows.Forms.Button btnSelectCustomerWhereOrderID;
            private System.Windows.Forms.TabControl tabControl5;
            private System.Windows.Forms.TabPage tabPage12;
            private System.Windows.Forms.TextBox textBoxSelectCustomerWhereOrderID;
            private System.Windows.Forms.TabPage tabPage13;
            private System.Windows.Forms.TextBox txtBoxSelectFoodWhereID;
            private System.Windows.Forms.Button btnSelectFoodWhereID;
            private System.Windows.Forms.TextBox txtBoxSelectFoodWherePrice;
            private System.Windows.Forms.Button SelectFoodWherePrice;
            private System.Windows.Forms.ComboBox comboBoxSelectWherePrice;
            private System.Windows.Forms.RichTextBox listBox1;
            private System.Windows.Forms.TextBox txtBoxSelectFoodWhereName;
            private System.Windows.Forms.Button btnSelectFoodWhereName;
            private System.Windows.Forms.TabControl tabControl6;
            private System.Windows.Forms.TabPage tabPage14;
            private System.Windows.Forms.TabPage tabPage16;
            private System.Windows.Forms.Label label14;
            private System.Windows.Forms.TextBox txtBoxSelectFromTableName;
            private System.Windows.Forms.Label label7;
            private System.Windows.Forms.Button btnCustomSelection;
            private System.Windows.Forms.TextBox txtBoxCustomSelectionStatement;
            private System.Windows.Forms.Label label15;
            private System.Windows.Forms.Button btnDataGridViewTotalPrice;
            private System.Windows.Forms.TextBox textBoxSelectCustomerWhereCustomer;
            private System.Windows.Forms.Button btnSelectCustomerWhereCustomer;
            private System.Windows.Forms.DataGridView dataGridViewAddRowsCustomer;
            private System.Windows.Forms.Button btnAddRowsCustomer;
            private System.Windows.Forms.Button btnAddRowsFood;
            private System.Windows.Forms.DataGridView dataGridViewAddRowsFood;
        }
    }