Проектирование схемы БД в среде ERwin. Проблема избыточности данных. Проблема обновления данных. Проблема удаления данных., страница 16

Response.Redirect("no_free_attributes.aspx")

End If

End If

End If

End If

End If

End If

End If

Button1.Enabled = True

Button2.Enabled = True         Button3.Enabled = True         Button7.Enabled = True

Button4.Enabled = False

Button5.Enabled = False

Button9.Enabled = True

Button10.Enabled = True

Button11.Enabled = True

Button12.Enabled = True

DropDownList2.Enabled = False

DropDownList1.Enabled = False

'DropDownList3.Enabled = False

End Sub

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

Button9.Enabled = False

TextBox1.Text = ""

Dim ds As DataSet

Dim con As Data.OracleClient.OracleConnection

con = New Data.OracleClient.OracleConnection("user id=dev;data source=katestr;password=developer")

'Заполнение статуса

Dim da As Data.OracleClient.OracleDataAdapter

Dim sel As String = "select * from status_app where lower(name_stat) like 'активно'"         da = New Data.OracleClient.OracleDataAdapter(sel, con)         ds = New DataSet         da.Fill(ds, "STATUS")

DropDownList3.DataSource = ds

DropDownList3.DataTextField = "NAME_STAT"

DropDownList3.DataValueField = "STAT"

DropDownList3.DataBind()         'Заполнение ЛС и тарифов

Dim ds1 As DataSet

Dim ds2 As DataSet

Dim da1 As Data.OracleClient.OracleDataAdapter

Dim da2 As Data.OracleClient.OracleDataAdapter

Dim sel1 As String = "select acc from account"         Dim sel2 As String = "select * from tarif"         da1 = New Data.OracleClient.OracleDataAdapter(sel1, con)         da2 = New Data.OracleClient.OracleDataAdapter(sel2, con)         ds1 = New DataSet         ds2 = New DataSet         da1.Fill(ds1, "ACCOUNT")         da2.Fill(ds2, "TARIF")

DropDownList1.DataSource = ds1

DropDownList1.DataTextField = "ACC"

DropDownList1.DataValueField = "ACC"

DropDownList1.DataBind()

DropDownList2.DataSource = ds2

DropDownList2.DataTextField = "NAME_TARIF"

DropDownList2.DataValueField = "TARIFID"

DropDownList2.DataBind()

'Инициализация полей

Dim checkcommand As Data.OracleClient.OracleCommand         Dim check As String = "DEV.WEB_INSERT_APP1"         checkcommand = New Data.OracleClient.OracleCommand(check, con)         checkcommand.CommandType = CommandType.StoredProcedure      checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("app1", System.Data.DbType.Int32, 10))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("cdate1", System.Data.OracleClient.OracleType.DateTime, 20))         checkcommand.Parameters("app1").Direction = ParameterDirection.Output         checkcommand.Parameters("cdate1").Direction = ParameterDirection.Output         checkcommand.Connection.Open()

Try

checkcommand.ExecuteNonQuery()

Catch ex As Exception

End Try

checkcommand.Connection.Close()

TextBox2.Text = checkcommand.Parameters("app1").Value

TextBox4.Text = checkcommand.Parameters("cdate1").Value

Button1.Enabled = False

Button2.Enabled = False

Button3.Enabled = False

Button7.Enabled = False

Button4.Enabled = True

Button5.Enabled = True

Button8.Enabled = True

Button10.Enabled = False

Button11.Enabled = False

Button12.Enabled = False

DropDownList1.Enabled = True

DropDownList2.Enabled = True

TextBox5.Text = DropDownList2.SelectedValue

End Sub

Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click

Dim ds As DataSet

Dim con As Data.OracleClient.OracleConnection

con = New Data.OracleClient.OracleConnection("user id=dev;data source=katestr;password=developer")

Dim checkcommand As Data.OracleClient.OracleCommand         Dim check As String = "DEV.WEB_GET_MSYSDN"         checkcommand = New Data.OracleClient.OracleCommand(check, con)         checkcommand.CommandType = CommandType.StoredProcedure