April 17, 2015

Exam

Imports System.Data.SqlClient
Public Class Form1
    Dim con As SqlConnection = New SqlConnection("Data Source=.\sqlexpress;Initial Catalog=FinalExamination;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub

    Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label6.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cmd = New SqlCommand("Insert into Customer_Table values('" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
        Display()

    End Sub

    Public Sub Display()
        Dim ds As New DataSet
        Dim da As SqlDataAdapter

        cmd = New SqlCommand("Select * from Customer_Table", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        DataGridView1.DataSource = ds.Tables(0)
        con.Close()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        cmd = New SqlCommand("Insert into Product_Table values('" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
        Display1()
    End Sub

    Public Sub Display1()
        Dim ds As New DataSet
        Dim da As SqlDataAdapter

        cmd = New SqlCommand("Select * from Product_Table", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        DataGridView2.DataSource = ds.Tables(0)
        con.Close()

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        cmd = New SqlCommand("Insert into Order_Table values('" & TextBox12.Text & "')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
        Display2()
    End Sub
    Public Sub Display2()
        Dim ds As New DataSet
        Dim da As SqlDataAdapter

        cmd = New SqlCommand("Select * from Order_Table", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        DataGridView3.DataSource = ds.Tables(0)
        con.Close()

    End Sub
End Class

April 10, 2015

Html (Input ok )

<html>
<head>
<title>z</title>
<body>
<p>Enter something here:</p>
<input id="id1" type="number" min="100" max="300">
<button onclick="myFunction()">OK</button>
<p id="demo"> </p>
<script>
function myFunction(){
var inpObj = document.getElementById("id1");
if(inpObj.checkValidity()==false){
document.getElementById("demo").innerHTML=inpObj.validationMessage;
}
else{
document.getElementById("demo").innerHTML="InputOK!";
}
}
</script>
<p>Enter something here:</p>
<input id="id2" type="number" min="100" max="300">
<button onclick="myFunction2()">OK</button>
<p id="kahitano"> </p>
<script>
function myFunction2(){
var inpObj = document.getElementById("id2");
if(inpObj.checkValidity()==false){
document.getElementById("kahitano").innerHTML=inpObj.validationMessage;
}
else{
document.getElementById("kahitano").innerHTML="InputOK!";
}
}
</script>
</body>
</head>
</html>

HTML (Show 2 videos ) 2nd year/Tri-3rd sem

First note pad
Notepad name : Show.html

<html>
<body>
<body background="a.jpg">
< background-repeat: no repeat;>
<CENTER>
<br>
<a href="B1.html"><img src="x1.png" width="223" height="226"></a><br>
<a href="C1.html"><img src="x2.png" width="223" height="226"></a><br>
<a href="about.html"><img src="x3.png" width="223" height="226"></a><br>
<br>
<br>
<br>
</CENTER>
</html>


Second notepad
Notepad name : B1.html

<html>
<body>
<body background="b.jpg">

<br>
<br>
<br>
<br>
<div style="text-align:center">
<button onclick="PlayPause()"> Play/Pause  </button>
<button onclick="makeBig()"> Big </button>
<button onclick="makeNormal()"> Normal</button>
<button onclick="makeSmall()"> Small </button>

<br>
<video id="video1"width="420">
<source  src="gen.mp4" type="video/mp4">
Your browser does not support  videos of this type.
</video>
</div>
<script>

var myVideo=document.getElementById("video1");
function PlayPause(){
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();
}
function makeBig()
{
myVideo.width=960;
}
function makeNormal()
{
myVideo.width=620;
}
function makeSmall()
{
myVideo.width=420;
}
</script>
<br>
<br>
<center>
<a href ="Show.html"><img src="x4.png" width="223" height="226"></a><br><br>
</center>
</body>
</html>



Third notepad
Notepad name : C2.html


<html>
<body>
<body background="c.jpg">

<br>
<br>
<br>
<br>
<div style="text-align:center">
<button onclick="PlayPause()"> Play/Pause  </button>
<button onclick="makeBig()"> Big </button>
<button onclick="makeNormal()"> Normal</button>
<button onclick="makeSmall()"> Small </button>

<br>
<video id="video1"width="420">
<source  src="gene.mp4" type="video/mp4">
Your browser does not support  videos of this type.
</video>
</div>
<script>

var myVideo=document.getElementById("video1");
function PlayPause(){
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();
}
function makeBig()
{
myVideo.width=960;
}
function makeNormal()
{
myVideo.width=620;
}
function makeSmall()
{
myVideo.width=420;
}
<br>
<br>
<br>

</script>
<center>
<a href ="Show.html"><img src="x4.png" width="223" height="226"></a><br><br>
</center>
</body>
</html>



fourth notepad
Notepad name : About.html

<html>
<body>
<body background="f.jpg">

<head>
<title>GENE LIZA CORDOVA</title>
</head>
<center><img src="e.jpg" width="500" height="600"></center>
<CENTER>
<h1>GENE LIZA CORDOVA</h1>
</CENTER>
<CENTER>
<br>
AGE: 18 years old
<br>
BIRTHDAY: July 24, 1996
<br>
SCHOOL: AMACC
<br>
ADDRESS: Blk. 21 lot.6 Villa La Prinza Calamba Laguna
<br>
<br>
<br>
<br>

<center><a href ="Show.html"><img src="x4.png" width="223" height="226"></a><br><br></center>
</CENTER>
</body>
</html>


NOTE:
http://en.savefrom.net/




Name of the Picture : a.jpg












Name of the Picture : b.jpg












Name of the Picture : c.jpg












Name of the Picture : f.jpg












Name of the buttons : img src="x1.png"






Name of the buttons : img src="x2.png"






Name of the buttons : img src="x3.png"






Name of the buttons : img src="x4.png"






Name of Video : <source  src="gene.mp4" type="video/mp4">

OR ELSE DOWNLOAD YOUR OWN VIDEO AND NAME THE FOLLOWING:

April 9, 2015

TASM (Adding a number)

.model small
.stack 100h
.data
prompt db 13,10, 'First Number:','$'
prompt1 db 13,10, 'Second Number:','$'
result db 13, 10, 'SUM:', '$'

num1 db ?
num2 db ?
sum db ?
.code
main proc
mov ax @data;
mov ds, ax
mov ah, 9
mov dx offset prompt
int 21h

mov ah, l
mov int 21h
mov bl, a1
mov num1, al

mov ah, 9
lea dx, prompt1
int 21h

mov ah, 2
int 21h
mov bl, al
mov num2, al

mov ax, num1
add ax, num2
mov sum, ax

mov ah, 9
lea dx result
int 21h

 mov ax, 4C00h
     int 21h

main endp
end main

TASM (Biodata) (make it center)

.model small
.stack 100h
.data
line_message1 db ' CORDOVA, GENE LIZA',0DH,0AH,'$'
line_message2 db ' Blk. 21 Lot 6 Villa La Prinza Calamba Laguna',0DH,0AH,'$'
line_message3 db ' Contact Number: 09354261908',0DH,0AH,'$'
line_message4 db ' ',0DH,0AH,'$'
line_message5 db ' OBJECTIVES:',0DH,0AH,'$'
line_message6 db ' To be part of the company and to enhance my',0DH,0AH,'$'
line_message65 db 'skills and knowledge',0DH,0AH,'$'
line_message7 db ' ',0DH,0AH,'$'
line_message8 db ' EDUCATIONAL PROFILE:',0DH,0AH,'$'
line_message9 db ' ',0DH,0AH,'$'
line_message10 db ' Tertiary: AMA Computer College (2013-2016)',0DH,0AH,'$'
line_message11 db ' Course: Bachelor of Science Information Technology',0DH,0AH,'$'
line_message12 db ' Secondary: Manay National High School (2012-2009)',0DH,0AH,'$'
line_message13 db ' Primary: Filex Olea Elementary School (2002-2008)',0DH,0AH,'$'
line_message14 db ' ',0DH,0AH,'$'
line_message15 db ' PERSONAL PROFILE:',0DH,0AH,'$'
line_message16 db '   Bithday: July 24, 1996',0DH,0AH,'$'
line_message17 db '   Age: 18 years old',0DH,0AH,'$'
line_message18 db '   Religion: Roman Catholic',0DH,0AH,'$'
line_message19 db '   Gender: Female',0DH,0AH,'$'
line_message20 db '   Weight: 142 lbs',0DH,0AH,'$'
line_message21 db '   Height: 5 Ft. 6 inches',0DH,0AH,'$'
line_message22 db '   Civil Status: Single',0DH,0AH,'$'
line_message23 db '   Mother Name: Jesty Cordova',0DH,0AH,'$'
line_message24 db '   Parent Number: 09358801572',0DH,0AH,'$'
.code
main proc

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h

     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message1
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message2
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message3
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message4
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message5
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax,@data
     mov ds,ax
     mov ah,9
     mov dx,offset line_message6
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax,@data
     mov ds,ax
     mov ah,9
     mov dx,offset line_message65
     int 21h


     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message7
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message8
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message9
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message10
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message11
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message12
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h

     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message13
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message14
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message15
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message16
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message17
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message18
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message19
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h
   

     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message20
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message21
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message22
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message23
     int 21h

     MOV AH, 3
     MOV BH, 0
     int 10h

     MOV AH, 2
     MOV BH, 0
     MOV DL, 20
     int 10h


     mov ax, @data
     mov ds, ax
     mov ah, 9
     mov dx, offset line_message24
     int 10h



     mov ax, 4C00h
     int 21h

main endp
end main





                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

April 8, 2015

Sample Program (HTML)2ndyear/Tri-3rdsem

<html>
<body>
<head>
<table>
<body style="background-color:#87CEFA;">
<tr>
<td width="20%"></td>
<a name="top">
<td><center><h1><u>C Programming</u></center><br>
<center>
by:<b>Gene Liza Cordova</b><br></a></center>
<ul>
<li><a href ="#one">History of C</a></li><br><br>
<li><a href ="#two">Layout of C</a></li><br><br>
<li><a href ="#three">Data Types</a></li><br><br>
<li><a href ="#four">Sample program</a></li><br><br>
</ul>




<hr>
<a name="one"><font size="5">History of C</font></a>
<hr>
<p align="justify">A Brief History of C
C is a general-purpose language which has been closely associated with the UNIX operating system for which it was developed - since the system and most of the programs that run it are written in C.
Many of the important ideas of C stem from the language BCPL, developed by Martin Richards. The influence of BCPL on C proceeded indirectly through the language B, which was written by Ken Thompson in 1970 at Bell Labs, for the first UNIX system on a DEC PDP-7. BCPL and B are "type less" languages whereas C provides a variety of data types.
In 1972 Dennis Ritchie at Bell Labs writes C and in 1978 the publication of The C Programming Language by Kernighan & Ritchie caused a revolution in the computing world.
In 1983, the American National Standards Institute (ANSI) established a committee to provide a modern, comprehensive definition of C. The resulting definition, the ANSI standard, or "ANSI C", was completed late 1988.
A Rough Guide to Programming Languages is available on-line for those of you that are interested.
</p>

<a href ="#top">back to top</a><br><br>



<hr><a name="two"><font size="5">Layout of C</font></a><hr>
<p align="justify">C is an imperative (procedural) language. It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support. C was therefore useful for many applications that had formerly been coded in assembly language, such as in system programming.
Despite its low-level capabilities, the language was designed to encourage cross-platform programming. A standards-compliant and portably written C program can be compiled for a very wide variety of computer platforms and operating systems with few changes to its source code. The language has become available on a very wide range of platforms, from embedded microcontrollers to supercomputers.
</p>

<a href ="#top">back to top</a><br><br>




<hr>
<a name="three"><font size="5">Data Types</font></a>
<hr>
<b>Objectives</b><br>
<br>Having read this section you should be able to:
<br>
declare (name) a local variable as being one of C's five data types
initialise local variables
perform simple arithmetic using local variables
Now we have to start looking into the details of the C language. How easy you find the rest of this section will depend on whether you have ever programmed before - no matter what the language was. There are a great many ideas common to programming in any language and C is no exception to this rule.
So if you haven't programmed before, you need to take the rest of this section slowly and keep going over it until it makes sense. If, on the other hand, you have programmed before you'll be wondering what all the fuss is about It's a lot like being able to ride a bike!
The first thing you need to know is that you can create variables to store values in. A variable is just a named area of storage that can hold a single value (numeric or character). C is very fussy about how you create variables and what you store in them. It demands that you declare the name of each variable that you are going to use and its type, or class, before you actually try to do anything with it.
In this section we are only going to be discussing local variables. These are variables that are used within the current program unit (or function) in a later section we will looking at global variables - variables that are available to all the program's functions.
There are five basic data types associated with variables:
<br>
<b><br>int </b>- integer: a whole number.
<b><br>float</b> - floating point value: ie a number with a fractional part.
<b><br>double</b> - a double-precision floating point value.
<b><br>char</b> - a single character.
<b><br>void </b>- valueless special purpose type which we will examine closely in later sections.<br><br>
One of the confusing things about the C language is that the range of values and the amount of storage that each of these types takes is not defined. This is because in each case the 'natural' choice is made for each type of machine. You can call variables what you like, although it helps if you give them sensible names that give you a hint of what they're being used for - names like sum, total, average and so on. If you are translating a formula then use variable names that reflect the elements used in the formula. For example, 2(r (that should read as "2 pi r" but that depends upon how your browser has been set-up) would give local variables names of pi and r. Remember, C programmers tend to prefer short names!
<br>
<b>Note:</b>all C's variables must begin with a letter or a "_" (underscore) character.
</p>

<p align="justify">Microsoft's webmail isn't the only service that's changed: A dropdown next to the main icon in the Outlook.com interface offers access to other
 suite members, similar to the way Apple's iCloud Web apps do, with brightly colored Metro-style tiles. These include People, Mail, SkyDrive, and, eventually, Calendar, though
the Calendar sub-site still has the old Hotmail design at the time of my testing. The integration between these services is much tighter, especially with the new Microsoft account,
which will tie together not just these, but also will work with your Xbox Live account if you have one, and your Windows 8 PC's default apps.
<br><br>

<b>Integer Number Variables</b><br></b><br> <br>

The first type of variable we need to know about is of class type int - short for integer. An int variable can store a value in the range -32768 to +32767. You can think of it as a largish positive or negative whole number: no fractional part is allowed. To declare an int you use the instruction:
int variable name;
<br>
For example:
<br>int a;
declares that you want to create an int variable called a.
To assign a value to our integer variable we would use the following C statement:
<br>a=10;

<br>The C programming language uses the "=" character for assignment. A statement of the form a=10; should be interpreted as take the numerical value 10 and store it in a memory location associated with the integer variable a. The "=" character should not be seen as an equality otherwise writing statements of the form:
a=a+10;

</p>
<a href ="#top">back to top</a>


<hr><a name="four"><font size="5"><b>Sample Program</b></font></a><hr>
<p align="justify"><b>Your First Program</b><br>

<br><b>Objectives</b><br>

Having read this section you should have an understanding of:<br>

a pre-processor directive that must be present in all your C programs.
a simple C function used to write information to your screen.
how to add comments to your programs
Now that you've seen the compiler in action it's time for you to write your very own first C program. You can probably guess what it's going to be - the program that everyone writes just to check they understand the very, very, very basics of what is going on in a new language.
<br>
Yes - it's the ubiquitous "Hello World" program. All your first program is going to do is print the message "Hello World" on the screen.
<br>
The program is a short one, to say the least. Here it is:
<br>
<br>
#include $$$$stdio.h&&&&
<br>
main()
<br>
{
<br>
printf("Hello World\n");
<br>
}
<br>
[program]
<br><br>

<br>
The first line is the standard start for all C programs - main(). After this comes the program's only instruction enclosed in curly brackets {}. The curly brackets mark the start and end of the list of instructions that make up the program - in this case just one instruction.

Notice the semicolon marking the end of the instruction. You might as well get into the habit of ending every C instruction with a semicolon - it will save you a lot of trouble! Also notice that the semicolon marks the end of an instruction - it isn't a separator as is the custom in other languages.

If you're puzzled about why the curly brackets are on separate lines I'd better tell you that it's just a layout convention to help you spot matching brackets. C is very unfussy about the way you lay it out. For example, you could enter the Hello World program as:

main(){printf("Hello World\n");}

but this is unusual.

The printf function does what its name suggest it does: it prints, on the screen, whatever you tell it to. The "\n" is a special symbols that forces a new line on the screen.

OK, that's enough explanation of our first program! Type it in and save it as Hello.c. Then use the compiler to compile it, then the linker to link it and finally run it. The output is as follows:

Hello World
</p>

<a href ="#top">back to top</a><br><br>
<td width="20%"></td>
</tr>



</div>

</td>
</table>
</body>
</html>





Thanks : http://www.quackit.com/html/codes/html_background_codes.cfm

LAB EXAM

FORM 1


Imports System.Data.SqlClient
Public Class Form1
    Dim con As SqlConnection = New SqlConnection("Data Source=.\SqlExpress;Initial Catalog=LabExam;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Public Sub display()
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select * From PRODUCTtbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        DataGridView1.DataSource = abind
        ComboBox1.DataSource = abind
        ComboBox1.DisplayMember = "ProductName"
        da.Update(ds)
        con.Close()

    End Sub

    Private Sub ComboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress
        e.Handled = True
        MessageBox.Show("User is not permitted to type in this feild")
    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If ComboBox1.Text = "Apple" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (1).jpg")
        ElseIf ComboBox1.Text = "Banana" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download.jpg")
        ElseIf ComboBox1.Text = "Grapes" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\images (2).jpg")
        ElseIf ComboBox1.Text = "Buko" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (5).jpg")
        ElseIf ComboBox1.Text = "Santol" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\kraTon2.jpg")
        ElseIf ComboBox1.Text = "Pineapple" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\images (3).jpg")
        ElseIf ComboBox1.Text = "Melon" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (4).jpg")
        ElseIf ComboBox1.Text = "Mango" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (3).jpg")
        ElseIf ComboBox1.Text = "langka" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (6).jpg")
        ElseIf ComboBox1.Text = "Duhat" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (2).jpg")
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cmd = New SqlCommand("insert into ORDERStbl values('" & TextBox3.Text & " ','" & TextBox4.Text & "','" & TextBox5.Text & "')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()

        MessageBox.Show("successfully added", "adding information", MessageBoxButtons.OK, MessageBoxIcon.Information)
        display()


    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        display()

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        cmd = New SqlCommand("delete from ORDERStbl where OrdersID='" & TextBox2.Text & "'", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()

        MessageBox.Show("Successfully deleted", "delete Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        cmd = New SqlCommand("Update ORDERStbl set OrdersName='" & TextBox5.Text & "' where OrdersID='" & TextBox2.Text & "'", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
        MessageBox.Show("Successfully Updated", "Update Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
        display()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Form3.Show()
        Me.Hide()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("select*FROM PRODUCTtbl where ProductName like'%" & TextBox1.Text & "%'", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        DataGridView1.DataSource = ds.Tables(0)
        con.Close()
    End Sub
End Class




FORM 2

Imports System.Data.SqlClient

Public Class Form2
    Dim con As SqlConnection = New SqlConnection("Data Source=.\SqlExpress;Initial Catalog=LabExam;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Public Sub display()
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        da.Update(ds)
        con.Close()

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "P" And TextBox2.Text = "grace" Then
        Else
            MsgBox("Sorry, username or password not found", MsgBoxStyle.OkOnly, "Invalid")
        End If
        Form3.Show()
        Me.Hide()
    End Sub

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class




FORM 3

Imports System.Data.SqlClient
Public Class Form3
    Dim con As SqlConnection = New SqlConnection("Data Source=.\SqlExpress;Initial Catalog=LabExam;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Public Sub display()
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select * From PRODUCTtbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        da.Update(ds)
        con.Close()

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select * From PRODUCTtbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        da.Update(ds)
        con.Close()
        Form4.Show()
        Me.Hide()

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select * From ORDERStbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        da.Update(ds)
        con.Close()
        Form1.Show()
        Me.Hide()

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select * From CUSTOMERtbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        da.Update(ds)
        con.Close()
        Form6.Show()
        Me.Hide()
    End Sub
End Class






FORM 4

Imports System.Data.SqlClient
Public Class Form4
    Dim con As SqlConnection = New SqlConnection("Data Source=.\SqlExpress;Initial Catalog=LabExam;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Public Sub display()
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select * From PRODUCTtbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        DataGridView1.DataSource = abind
        da.Update(ds)
        con.Close()
    End Sub

    Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        display()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cmd = New SqlCommand("insert into PRODUCTtbl values('" & TextBox3.Text & " ','" & TextBox4.Text & "','" & TextBox5.Text & "')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()

        MessageBox.Show("successfully added", "adding information", MessageBoxButtons.OK, MessageBoxIcon.Information)
        display()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        cmd = New SqlCommand("delete from PRODUCTtbl where ProductsID='" & TextBox2.Text & "'", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()

        MessageBox.Show("Successfully deleted", "delete Information", MessageBoxButtons.OK, MessageBoxIcon.Information)

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        cmd = New SqlCommand("Update PRODUCTtbl set ProductName='" & TextBox3.Text & "'ProductQuantity='" & TextBox4.Text & "'ProductPrice='" & TextBox5.Text & "' where is ProductID='" & TextBox2.Text & "'", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
        MessageBox.Show("Successfully Updated", "Update Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
        display()
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Form3.Show()
        Me.Hide()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("select*FROM PRODUCTtbl where ProductName like'%" & TextBox1.Text & "%'", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        DataGridView1.DataSource = ds.Tables(0)
        con.Close()
    End Sub

End Class





FORM 5


Imports System.Data.SqlClient
Public Class Form5
    Dim con As SqlConnection = New SqlConnection("Data Source=.\SqlExpress;Initial Catalog=LabExam;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Public Sub display()
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select OrdersName From ORDERStbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        ComboBox1.DataSource = abind
        ComboBox1.DisplayMember = "ProductName"
        DataGridView1.DataSource = abind
        da.Update(ds)
        con.Close()


    End Sub

    Private Sub ComboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress
        e.Handled = True
        MessageBox.Show("User is not permitted to type in this feild")

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If ComboBox1.Text = "Banana" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (1).jpg")
        ElseIf ComboBox1.Text = "Grapes" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download.jpg")
        ElseIf ComboBox1.Text = "Apple" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\images (2).jpg")
        ElseIf ComboBox1.Text = "Buko" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (5).jpg")
        ElseIf ComboBox1.Text = "Santol" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\kraTon2.jpg")
        ElseIf ComboBox1.Text = "Pineapple" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\images (3).jpg")
        ElseIf ComboBox1.Text = "Melon" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (4).jpg")
        ElseIf ComboBox1.Text = "Mango" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (3).jpg")
        ElseIf ComboBox1.Text = "langka" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (6).jpg")
        ElseIf ComboBox1.Text = "Duhat" Then
            PictureBox1.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Student\Downloads\images\download (2).jpg")
        End If
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show(" You Ordered'" & ComboBox1.Text & "'")

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        display()

    End Sub

    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click

    End Sub

End Class






FORM 6

Imports System.Data.SqlClient
Public Class Form6
    Dim con As SqlConnection = New SqlConnection("Data Source=.\SqlExpress;Initial Catalog=LabExam;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Public Sub display()
        Dim abind As New BindingSource
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("Select * From CUSTOMERtbl", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        abind.DataSource = ds.Tables(0)
        DataGridView1.DataSource = abind
        da.Update(ds)
        con.Close()
    End Sub

    Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        display()

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cmd = New SqlCommand("insert into CUSTOMERtbl values('" & TextBox2.Text & " ','" & TextBox3.Text & "')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()

        MessageBox.Show("successfully added", "adding information", MessageBoxButtons.OK, MessageBoxIcon.Information)
        display()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        cmd = New SqlCommand("delete from CUSTOMERtbl where CustomerID='" & TextBox2.Text & "'", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()

        MessageBox.Show("Successfully deleted", "delete Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        cmd = New SqlCommand("Update CUSTOMERtbl set CustomerName='" & TextBox2.Text & "'CustomerAddress='" & TextBox3.Text & "' where OrdersID='" & TextBox1.Text & "'", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
        MessageBox.Show("Successfully Updated", "Update Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
        display()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Form3.Show()
        Me.Hide()
    End Sub

    Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged

    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Dim ds As New DataSet
        Dim da As SqlDataAdapter
        cmd = New SqlCommand("select*FROM CUSTOMERtbl where CustomerName like'%" & TextBox4.Text & "%'", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        DataGridView1.DataSource = ds.Tables(0)
        con.Close()
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        Form2.Show()
        Me.Hide()
    End Sub
End Class







SPLASH SCREEN


Public NotInheritable Class SplashScreen1

    'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab
    '  of the Project Designer ("Properties" under the "Project" menu).


    Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Set up the dialog text at runtime according to the application's assembly information.

        'TODO: Customize the application's assembly information in the "Application" pane of the project
        '  properties dialog (under the "Project" menu).

        'Application title
        'If My.Application.Info.Title <> "" Then
        '    ApplicationTitle.Text = My.Application.Info.Title
        'Else
        '    'If the application title is missing, use the application name, without the extension
        '    ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
        'End If

        ''Format the version information using the text set into the Version control at design time as the
        ''  formatting string.  This allows for effective localization if desired.
        ''  Build and revision information could be included by using the following code and changing the
        ''  Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar.  See
        ''  String.Format() in Help for more information.
        ''
        ''    Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

        'Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

        ''Copyright info
        'Copyright.Text = My.Application.Info.Copyright
    End Sub

    Private Sub MainLayoutPanel_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MainLayoutPanel.Paint

    End Sub

    Private Sub ApplicationTitle_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ApplicationTitle.Click
        Form2.Show()
        Me.Hide()


    End Sub
End Class



Microsoft Visual Studio 2008 (2nd year/Tri-3sem)

Imports System.Data.SqlClient
Public Class Form1
    Dim con As SqlConnection = New SqlConnection("Data Source=.\sqlexpress;Initial Catalog=StudentInfoDatabase;Integrated Security=True;Pooling=False")
    Dim cmd As SqlCommand
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        cmd = New SqlCommand("Insert into StudentInfoTable values('" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & ComboBox1.Text & "','" & DateTimePicker1.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "','" & ComboBox2.Text & "','" & TextBox1.Text & "')", con)
        con.Open()
        cmd.ExecuteNonQuery()
        con.Close()
        Display()

    End Sub

    Public Sub Display()
        Dim da As SqlDataAdapter
        Dim ds As New DataSet

        cmd = New SqlCommand("Select * from StudentInfoTable", con)
        con.Open()
        da = New SqlDataAdapter(cmd)
        da.Fill(ds)
        DataGridView1.DataSource = ds.Tables(0)
        con.Close()
    End Sub