Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Framework entity
i have table with columns empid, empname,empmanagerid, now if i type empid in textbox, empmanager name shod be display in supervisor dropdown.
if i type 1001 empid, corresponding manager name kanna should display in dropdown using entity framework.pls help me
 

empid empname empmanagerid
1001 jay 1002
1002 kanna 1001
1003 chandru 1002
1004 priya 1003
1005 venkat 1003
1006 ramana 1003
1007 sekhar 1002
1008 j 1007
NULL NULL NULL
 
Employee ID: TEXTBOX
Employee Name: TEXTBOX
 
Supervisor": DROPDOWNLIST
Posted 10-Oct-11 21:11pm
Edited 10-Oct-11 21:31pm
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

you can use LINQ to query the Entity i.e. the table and/or lambda expressions to fetch the data you want. But my question here is, do you want to retrieve the name as you type the id in the text box or after you have typed the ID and tabbed out or clicked a button? The former is pretty much like using "LIKE" in a SQL query and the latter is like doing an exact search based on an ID. Lambda Expressions can make it extremely easy for you to query the Entity much like a SQL query and then bind the results to the drop down.
 
Explore a little and hack a lot and I am sure you will find your answer.
 
Cheers...
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 295
1 OriginalGriff 274
2 Shweta N Mishra 216
3 PIEBALDconsult 184
4 CPallini 155
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 12 Oct 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100