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

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("num1", System.Data.DbType.Int32, 10))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("num2", System.Data.DbType.Int32, 10))

checkcommand.Parameters.Add(New Data.OracleClient.OracleParameter("msysdn_r", System.Data.OracleClient.OracleType.Number, 15))         checkcommand.Parameters("num1").Direction = ParameterDirection.Output         checkcommand.Parameters("num2").Direction = ParameterDirection.Output         checkcommand.Parameters("msysdn_r").Direction = ParameterDirection.Output         checkcommand.Connection.Open()

Try

checkcommand.ExecuteNonQuery()

Catch ex As Exception

End Try

If checkcommand.Parameters("num1").Value = 0 Then

Response.Redirect("no_active_mask.aspx")

Else

If checkcommand.Parameters("num2").Value = 0 Then

Response.Redirect("no_numbers.aspx")

Else

TextBox1.Text = checkcommand.Parameters("msysdn_r").Value

Button8.Enabled = False

End If

End If

End Sub

Private Sub DropDownList2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As

System.EventArgs) Handles DropDownList2.SelectedIndexChanged

TextBox5.Text = DropDownList1.SelectedValue

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

If TextBox2.Text = "" Then

Response.Redirect("choose_app.aspx")

Else

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_DELETE_APP"             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("num", System.Data.DbType.Int32, 10))

checkcommand.Parameters("num").Direction = ParameterDirection.Output             checkcommand.Parameters("app1").Value = TextBox2.Text

checkcommand.Connection.Open()

Try

checkcommand.ExecuteNonQuery()

Catch ex As Exception

End Try

If checkcommand.Parameters("num").Value > 0 Then

Response.Redirect("failed_delete_app.aspx")

Else

TextBox2.Text = ""

TextBox4.Text = ""

TextBox1.Text = ""

End If

End If

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

If DropDownList1.Enabled = True Then

TextBox2.Text = ""

TextBox4.Text = ""

TextBox1.Text = ""

End If

Button1.Enabled = True

Button2.Enabled = True

Button3.Enabled = True

Button7.Enabled = True

Button4.Enabled = False

Button5.Enabled = False

Button8.Enabled = False

Button9.Enabled = True

DropDownList2.Enabled = False

DropDownList1.Enabled = False

'DropDownList3.Enabled = False

End Sub

Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click

If TextBox2.Text = "" Then

Response.Redirect("choose_app.aspx")

Else

Session.Add("app", TextBox2.Text)

Response.Redirect("app_ident.aspx")

End If

End Sub

Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click

If TextBox2.Text = "" Then

Response.Redirect("choose_app.aspx")

Else

Dim ds As DataSet

Dim con As Data.OracleClient.OracleConnection             Dim da As Data.OracleClient.OracleDataAdapter