0

how can i get the value ...which code write in button click event that get my id..
USE DATATABLE

 Public Function inst() As DataTable
        Dim tb2 As New DataTable
        Dim st As String
        Dim dfsty As DataSet
        Dim df As New SqlClient.SqlDataAdapter



        Try

            cn.Open()
            st = "SELECT EmMaster_EmploId FROM(EmMaster) WHERE EmMaster_EmploId=(SELECT max(EmMaster_EmploId) FROM EmMaster)"
            df = New SqlDataAdapter(st, cn)
            df.Fill(dfsty, "EmMasater")
            tb2 = dfsty.Tables(0)
            cn.Close()




        Catch ex As Exception
            MessageBox.Show(ex.Message)
        Finally
            cn.Close()

        End Try
        Return tb2


    End Function

    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSave.Click

        Try
            Dim dss As DataTable
            dss = inst()
2
Contributors
2
Replies
11
Views
11 Months
Discussion Span
Last Post by Parth_3
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.