Private Sub categorydroplist_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles categorydroplist.SelectedIndexChanged
Eiatxt.Text = (categorydroplist.SelectedValue + idnum + 0.1).ToString
End Sub
Private Sub Submittxt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submittxt.Click
Dim InsertSQL As String
InsertSQL = "INSERT INTO [data1]("
InsertSQL &= "CategoryType,RefId,PreparedBy)"
InsertSQL &= " VALUES ('"
InsertSQL &= categorydroplist.SelectedValue & "','"
InsertSQL &= Eiatxt.Text & "','"
InsertSQL &= preparedbytxt.Text & "')"
Dim con As New SqlConnection(SqlConn)
Dim cmd As New SqlCommand(InsertSQL, con)
con.Open()
cmd.ExecuteNonQuery()
con.Close()
ClearControl()
BindCategory()
End Sub
for the above code:
when user choose the a value from dropdownlist
in the Eiatxt(text box) able to display the value which i want
like this if user click service type the value will be (1.1) if click the storage willl be (2.1)
so once is generate i able to fill the prepared column and save the data.
so i able to save the data into database...
at here i face another problem.
when the second user choose the service type my system must read the RefId from database.
if the value at database for RefId is 1.1
then it suppose to increment to 1.2...
how to do this....i got idea but don't knw how to implement into coding
PLEASE HELP ME SIR
Eiatxt.Text = (categorydroplist.SelectedValue + idnum + 0.1).ToString
End Sub
Private Sub Submittxt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submittxt.Click
Dim InsertSQL As String
InsertSQL = "INSERT INTO [data1]("
InsertSQL &= "CategoryType,RefId,PreparedBy)"
InsertSQL &= " VALUES ('"
InsertSQL &= categorydroplist.SelectedValue & "','"
InsertSQL &= Eiatxt.Text & "','"
InsertSQL &= preparedbytxt.Text & "')"
Dim con As New SqlConnection(SqlConn)
Dim cmd As New SqlCommand(InsertSQL, con)
con.Open()
cmd.ExecuteNonQuery()
con.Close()
ClearControl()
BindCategory()
End Sub
for the above code:
when user choose the a value from dropdownlist
in the Eiatxt(text box) able to display the value which i want
like this if user click service type the value will be (1.1) if click the storage willl be (2.1)
so once is generate i able to fill the prepared column and save the data.
so i able to save the data into database...
at here i face another problem.
when the second user choose the service type my system must read the RefId from database.
if the value at database for RefId is 1.1
then it suppose to increment to 1.2...
how to do this....i got idea but don't knw how to implement into coding
PLEASE HELP ME SIR