Click here to Skip to main content
15,886,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I'm writing an approval system. The requester need to choose their own manager to approve their request form. I'm using Oracle Sql Developer. I have User Table. In User table, have Employee_Id, Employee_Name, Email, and Group. The user are divided into 3 type: Requester, Manager, and Security.This 3 type of person are into the group. I just want the manager name only appear in dropdownlist. I want to write code for choosing Manager name only from the group. I try my best to overcome the problem. But, I can't do it. Please someone kindly help me to solve the problem. Below is the code:

VB
'Approving Manager
      DataSource1.SelectCommand = "SELECT Manager_Name FROM CUST_TB_USER"
      DV = DataSource1.Select(DataSourceSelectArguments.Empty)
      For Each R In DV
          AppMgr.Items.Add(New ListItem() With {.Text = R(0)})
      Next
      DV.Dispose()


Please help me to solve the problem. thank you in advance.
Posted
Updated 25-Nov-15 14:48pm
v4
Comments
PIEBALDconsult 25-Nov-15 20:32pm    
Unclear. Is group its own table? It should be. Please use Improve question to add more detail about your current schema.
Member 12077709 25-Nov-15 20:36pm    
in user table has group. the user are divided into requester, manager, and security. this 3 person are into the group information
PIEBALDconsult 25-Nov-15 21:06pm    
Yeah, that's not a good idea.
Member 12077709 25-Nov-15 21:18pm    
So, izit I need to create table for group.
PIEBALDconsult 25-Nov-15 21:52pm    
I definitely recommend it. The simplest (and most restrictive) schema would be to have an Employee's record point to its Group's record and a Group's record point to its manager's Employee record.
I would probably go for something more complex, but this should be good enough for your immediate needs.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900