Hello good evening to all of you! I know this question is basic but I am really having a hard time doing it.

I am a creating a Employee information system. My dilemma is I want to view all the informtion of all the employees from the department that I selected from the menu strip but how could I do that? I really need your help........

Thanks for your immediate reply........

Here is an interface I drew to show how it should look.........I really don't know where to start or how to start it...........please help me........

Edited 4 Years Ago by akasekaihime

Attachments

selecting the data from the database by clicking the selected department from the menustrip.......

what is the primary key?
can you send me the code you have tried.............
hope this will help

 myConnection = New SqlConnection(connectionstring)
        myConnection.Open()


        Dim TempData As New DataTable
         myCommand1 = New SqlCommand("SELECT * FROM Departement ", myConnection)
        myCommand1.ExecuteNonQuery()

        '    Dim dr1 As SqlDataReader = myCommand1.ExecuteReader

        Dim pr As String
          Do While dr1.Read()
            ' pr = dr1("Category").ToString


            ''''''''''''''''''''''''
            ' For i = 0 To TempData.Rows.Count-1
            Dim newItem1 As New ListViewItem(dr1.Item("Name").ToString)
            newItem1.SubItems.Add(dr1("Postion"))
            newItem1.SubItems.Add(dr1("Address"))
              newItem1.SubItems.Add(dr1("Datehired"))
            ListView1.Items.Add(newItem1)

        Loop
        myConnection.Close()

there are three categories, by department, by status and by nature of work, should I use If-else???? how should I do it using your code???

Yes it will work, place the code in the CLICK function so that whenever that sub menu is being clicked, the code will execute then.

This article has been dead for over six months. Start a new discussion instead.