001.
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
002.
Dim
strConn
As
String
= WebConfigurationManager.ConnectionStrings(
"Genius"
).ConnectionString
003.
Dim
Conn
As
New
SqlConnection(strConn)
004.
005.
006.
Dim
ID
As
String
007.
008.
009.
ID =
"Tc_1234567890"
010.
Dim
User = Session(
"Username"
)
011.
Dim
Pass = Session(
"Pass"
)
012.
Dim
Email = Session(
"Email"
)
013.
Dim
first = Session(
"first"
)
014.
Dim
firstname = Session(
"firstname"
)
015.
Dim
last = Session(
"lastname"
)
016.
Dim
status =
"0"
017.
Dim
heigth = Session(
"heigth"
)
018.
Dim
weigth = Session(
"weigth"
)
019.
Dim
gender = Session(
"gender"
)
020.
Dim
marry = Session(
"marry"
)
021.
Dim
child = Session(
"child"
)
022.
Dim
Nation = Session(
"Nationality"
)
023.
Dim
Origin = Session(
"Origin"
)
024.
Dim
religion = Session(
"Religion"
)
025.
Dim
birth = Session(
"Date"
)
026.
Dim
Smoke = Session(
"Smoke"
)
027.
Dim
drink = Session(
"drink"
)
028.
Dim
street1 = Session(
"street_current"
)
029.
Dim
district1 = Session(
"district_current"
)
030.
Dim
Country1 = Session(
"country_current"
)
031.
Dim
Zip1 = Session(
"zip_current"
)
032.
Dim
tele1 = Session(
"tele_current"
)
033.
Dim
contact1 = Session(
"contact_current"
)
034.
Dim
street2 = Session(
"street_origin"
)
035.
Dim
district2 = Session(
"district_origin"
)
036.
Dim
Country2 = Session(
"country_origin"
)
037.
Dim
Zip2 = Session(
"zip_origin"
)
038.
Dim
tele2 = Session(
"tele_origin"
)
039.
Dim
contact2 = Session(
"contact_origin"
)
040.
Dim
hight = Session(
"hight"
)
041.
Dim
hight_ins = Session(
"hight_ins"
)
042.
Dim
hight_major = Session(
"hight_major"
)
043.
Dim
hight_branch = Session(
"hight_branch"
)
044.
Dim
hight_date = Session(
"hight_date"
)
045.
Dim
hight_GPA = Session(
"hight_GPA"
)
046.
Dim
sec = Session(
"sec"
)
047.
Dim
sec_ins = Session(
"sec_ins"
)
048.
Dim
sec_major = Session(
"sec_major"
)
049.
Dim
sec_branch = Session(
"sec_branch"
)
050.
Dim
sec_GPA = Session(
"sec_GPA"
)
051.
052.
053.
Dim
sqlAdd1
As
String
054.
Dim
comAdd1
As
New
SqlCommand
055.
If
ID.ToString =
""
Or
User.ToString =
""
Or
Pass.ToString =
""
Or
first.ToString =
""
Or
firstname.ToString =
""
Or
last.ToString =
""
Or
status.ToString =
""
Or
heigth.ToString =
""
Or
weigth.ToString =
""
Or
gender.ToString =
""
Or
Email.ToString =
""
Or
marry.ToString =
""
Or
child.ToString =
""
Or
Nation.ToString =
""
Or
Origin.ToString =
""
Or
religion.ToString =
""
Or
birth.ToString =
""
Or
Smoke.ToString =
""
Or
drink.ToString =
""
Or
street1.ToString =
""
Or
district1.ToString =
""
Or
Country1.ToString =
""
Or
Zip1.ToString =
""
Or
tele1.ToString =
""
Or
street1.ToString =
""
Or
district2.ToString =
""
Or
Country2.ToString =
""
Or
Zip2.ToString =
""
Or
tele2.ToString =
""
Or
hight.ToString =
""
Or
hight_ins.ToString =
""
Or
hight_major.ToString =
""
Or
hight_branch.ToString =
""
Or
hight_date.ToString =
""
Or
hight_GPA.ToString =
""
Or
sec.ToString =
""
Or
sec_ins.ToString =
""
Or
sec_branch.ToString =
""
Or
sec_GPA.ToString =
""
Then
056.
057.
058.
MsgBox(
"null"
, MsgBoxStyle.OkOnly)
059.
Else
060.
061.
sqlAdd1 =
"INSERT INTO Teacher(ID_Tc,Username,Password,First_Tc,Name_Tc,Sur_Tc,Status,Heigth,Weigth,Gender,email_Tc,marry,Num_child,nationality,origin,religion,Date_birth,Smoke,Drink,Street_Cur,District_Cur,Country_Cur,Zip_Cur,Tel1_Tc,Street_ori,District_ori,Country_ori,Zip_ori,Tel2_Tc,Hight_Level,Hight_Ins,Hight_Major,Hight_Branch,Hight_Since,Hight_GPA,Sec_Level,Sec_Ins,Sec_Major,Sec_Branch,Sec_GPA)"
062.
sqlAdd1 =
" VALUES('"
& ID.ToString &
"',"
063.
sqlAdd1 =
"'"
& User.ToString &
"',"
064.
sqlAdd1 =
"'"
& Pass.ToString &
"',"
065.
sqlAdd1 =
"'"
& first.ToString &
"',"
066.
sqlAdd1 =
"'"
& firstname.ToString &
"',"
067.
sqlAdd1 =
"'"
& last.ToString &
"',"
068.
sqlAdd1 =
"'"
& status.ToString &
"',"
069.
sqlAdd1 =
"'"
& heigth.ToString &
"',"
070.
sqlAdd1 =
"'"
& weigth.ToString &
"',"
071.
sqlAdd1 =
"'"
& gender.ToString &
"',"
072.
sqlAdd1 =
"'"
& Email.ToString &
"',"
073.
sqlAdd1 =
"'"
& marry.ToString &
"',"
074.
sqlAdd1 =
"'"
& child.ToString &
"',"
075.
sqlAdd1 =
"'"
& Nation.ToString &
"',"
076.
sqlAdd1 =
"'"
& Origin.ToString &
"',"
077.
sqlAdd1 =
"'"
& religion.ToString &
"',"
078.
sqlAdd1 =
"'"
& birth.ToString &
"',"
079.
sqlAdd1 =
"'"
& Smoke.ToString &
"',"
080.
sqlAdd1 =
"'"
& drink.ToString &
"',"
081.
sqlAdd1 =
"'"
& street1.ToString &
"',"
082.
sqlAdd1 =
"'"
& district1.ToString &
"',"
083.
sqlAdd1 =
"'"
& Country1.ToString &
"',"
084.
sqlAdd1 =
"'"
& Zip1.ToString &
"',"
085.
sqlAdd1 =
"'"
& tele1.ToString &
"',"
086.
sqlAdd1 =
"'"
& street1.ToString &
"',"
087.
sqlAdd1 =
"'"
& district2.ToString &
"',"
088.
sqlAdd1 =
"'"
& Country2.ToString &
"',"
089.
sqlAdd1 =
"'"
& Zip2.ToString &
"',"
090.
sqlAdd1 =
"'"
& tele2.ToString &
"',"
091.
sqlAdd1 =
"'"
& hight.ToString &
"',"
092.
sqlAdd1 =
"'"
& hight_ins.ToString &
"',"
093.
sqlAdd1 =
"'"
& hight_major.ToString &
"',"
094.
sqlAdd1 =
"'"
& hight_branch.ToString &
"',"
095.
sqlAdd1 =
"'"
& hight_date.ToString &
"',"
096.
sqlAdd1 =
"'"
& hight_GPA.ToString &
"',"
097.
sqlAdd1 =
"'"
& sec.ToString &
"',"
098.
sqlAdd1 =
"'"
& sec_ins.ToString &
"',"
099.
sqlAdd1 =
"'"
& sec_major.ToString &
"',"
100.
sqlAdd1 =
"'"
& sec_branch.ToString &
"',"
101.
sqlAdd1 =
"'"
& sec_GPA.ToString &
"')"
102.
Conn.Open()
103.
comAdd1 =
New
SqlCommand(sqlAdd1, Conn)
104.
105.
106.
107.
comAdd1.ExecuteNonQuery()
108.
109.
Conn.Close()
110.
111.
112.
113.
114.
115.
Dim
from1 = Session(
"from1"
)
116.
Dim
to1 = Session(
"to1"
)
117.
Dim
company1 = Session(
"company1"
)
118.
Dim
com_add1 = Session(
"com_add1"
)
119.
Dim
position1 = Session(
"position1"
)
120.
Dim
salary1 = Session(
"salary1"
)
121.
Dim
job1 = Session(
"job1"
)
122.
123.
Dim
sqlAdd2
As
String
124.
Dim
comAdd2
As
New
SqlCommand
125.
126.
sqlAdd2 =
"insert into Experience_Tc(ID_Tc,Ex_From,Ex_To,Company,Company_Add,Position,Salary,Job_Des,No_Ex)"
127.
sqlAdd2 =
" values ('"
& ID.ToString &
"',"
128.
sqlAdd2 =
"'"
& from1.ToString &
"',"
129.
sqlAdd2 =
"'"
& to1.ToString &
"',"
130.
sqlAdd2 =
"'"
& company1.ToString &
"',"
131.
sqlAdd2 =
"'"
& com_add1.ToString &
"',"
132.
sqlAdd2 =
"'"
& position1.ToString &
"',"
133.
sqlAdd2 =
"'"
& salary1.ToString &
"',"
134.
sqlAdd2 =
"'"
& job1.ToString &
"',"
135.
sqlAdd2 =
"'1')"
136.
Conn.Open()
137.
comAdd2 =
New
SqlCommand(sqlAdd2, Conn)
138.
139.
140.
141.
comAdd2.ExecuteNonQuery()
142.
143.
Conn.Close()
144.
145.
146.
End
If