Click here to Skip to main content
15,895,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to know the .net version of a windows application just looking the code? Pin
Krushna Sahu7-Dec-08 18:31
Krushna Sahu7-Dec-08 18:31 
AnswerRe: How to know the .net version of a windows application just looking the code? Pin
Karmendra Suthar5-Dec-08 23:58
Karmendra Suthar5-Dec-08 23:58 
GeneralRe: How to know the .net version of a windows application just looking the code? Pin
Dave Kreskowiak6-Dec-08 4:17
mveDave Kreskowiak6-Dec-08 4:17 
GeneralRe: How to know the .net version of a windows application just looking the code? Pin
Krushna Sahu7-Dec-08 18:33
Krushna Sahu7-Dec-08 18:33 
GeneralRe: How to know the .net version of a windows application just looking the code? Pin
Dave Kreskowiak8-Dec-08 2:15
mveDave Kreskowiak8-Dec-08 2:15 
GeneralRe: How to know the .net version of a windows application just looking the code? Pin
Krushna Sahu1-Jan-09 19:18
Krushna Sahu1-Jan-09 19:18 
Questioncombo box Pin
kirandilip5-Dec-08 19:05
kirandilip5-Dec-08 19:05 
AnswerRe: combo box Pin
beatles16925-Dec-08 20:52
beatles16925-Dec-08 20:52 
Hi Here's my suggestion.Having a service that returns an EmployeeName by a given EmployeeId, you can ask for EmployeeName by employeeId whenever you want.

First I create an Interface:
<br />
public interface IEmployeeService<br />
{<br />
string GetEmployeeNameById(int emp_id);<br />
}<br />

Then I implement it.According to your scenario I think that you can get an employee name when its needed(you don't have to load all names at once)
Here's a possible implementation:
<br />
public string GetEmployeeNameById(int emp_id)<br />
{<br />
var query=string.Format("SELECT emp_name FROM EmployeeTable WHERE emp_id={0}",empId);<br />
//Execute a database command and return its result <br />
...<br />
}<br />


Now I define a local variable in my form like this:
<br />
...<br />
IEmployeeService employeeService=new MyEmployeeSrvice();<br />
...<br />


And finally I handle the ComboBox SelectedItemChange event to set text of EmployeeName text box
<br />
...<br />
empNameTextBox.Text=employeeService.GetEmployeeNameById(selectedId);<br />
...<br />

GeneralRe: combo box Pin
nelsonpaixao7-Dec-08 14:52
nelsonpaixao7-Dec-08 14:52 
QuestionForEach Loop Pin
Jon Stroh5-Dec-08 18:51
Jon Stroh5-Dec-08 18:51 
AnswerRe: ForEach Loop Pin
Christian Graus5-Dec-08 22:36
protectorChristian Graus5-Dec-08 22:36 
GeneralRe: ForEach Loop Pin
Jon Stroh6-Dec-08 4:19
Jon Stroh6-Dec-08 4:19 
AnswerRe: ForEach Loop Pin
Mark Salsbery6-Dec-08 7:17
Mark Salsbery6-Dec-08 7:17 
QuestionRemoting a Form? Pin
Snixtor5-Dec-08 16:09
Snixtor5-Dec-08 16:09 
QuestionAccess MS Access Pin
picasso25-Dec-08 14:48
picasso25-Dec-08 14:48 
AnswerRe: Access MS Access Pin
picasso25-Dec-08 18:31
picasso25-Dec-08 18:31 
QuestionAbout trojans, i worried now!!! Pin
nelsonpaixao5-Dec-08 14:14
nelsonpaixao5-Dec-08 14:14 
AnswerRe: About trojans, i worried now!!! Pin
Christian Graus5-Dec-08 14:57
protectorChristian Graus5-Dec-08 14:57 
AnswerRe: About trojans, i worried now!!! Pin
beatles16926-Dec-08 3:24
beatles16926-Dec-08 3:24 
Questioncoding for server controls Pin
samta khobragade5-Dec-08 13:18
samta khobragade5-Dec-08 13:18 
AnswerRe: coding for server controls Pin
Christian Graus5-Dec-08 14:57
protectorChristian Graus5-Dec-08 14:57 
QuestionRuntime construction of a constructed type [solved] [modified] Pin
PIEBALDconsult5-Dec-08 13:03
mvePIEBALDconsult5-Dec-08 13:03 
AnswerRe: Runtime construction of a constructed type Pin
Luc Pattyn5-Dec-08 18:43
sitebuilderLuc Pattyn5-Dec-08 18:43 
GeneralRe: Runtime construction of a constructed type Pin
PIEBALDconsult5-Dec-08 18:48
mvePIEBALDconsult5-Dec-08 18:48 
QuestionApply dataset changes to excel file Pin
emilio_ts5-Dec-08 12:20
emilio_ts5-Dec-08 12:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.