﻿Imports System.Data
Partial Class Default2
    Inherits System.Web.UI.Page



    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim con As New OleDb.OleDbConnection()

        Dim sql As String = "insert into person values ('" + TextBox1.Text + "', '" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox15.Text + "','" + TextBox16.Text + "','" + TextBox8.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox11.Text + "','" + TextBox12.Text + "','" + TextBox13.Text + "','" + TextBox14.Text + "','@التخصص والشعبة التي ترغب بدراستها داخل المعهد')"
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
        "Data Source=C:\TelDir.mdb;Persist Security Info=False"

        Try
            con.Open()
            Dim cmd As New OleDb.OleDbCommand(sql, con)
            cmd.Parameters.AddWithValue("@المهن الميكانيكية,@المهن الكهربائية والالكترونية,@قسم المصارف والاستثمار,@مهن البناء والتشييد,@مهن الحاسوب", Me.RadioButtonList1.SelectedValue.Trim)
            cmd.ExecuteReader()
        Catch e1 As OleDb.OleDbException
        Finally
            con.Close()

        End Try

    End Sub



    Protected Sub RadioButtonList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButtonList1.SelectedIndexChanged
        
    End Sub
End Class
