Click here to Skip to main content
16,003,265 members
Home / Discussions / C#
   

C#

 
QuestionnBass problem Pin
Mayood28-Apr-06 5:25
Mayood28-Apr-06 5:25 
AnswerRe: nBass problem Pin
J4amieC28-Apr-06 5:36
J4amieC28-Apr-06 5:36 
AnswerRe: nBass problem Pin
Graham Nimbley28-Apr-06 8:56
Graham Nimbley28-Apr-06 8:56 
QuestionDynamic control data referance Pin
PDietz28-Apr-06 4:57
PDietz28-Apr-06 4:57 
AnswerRe: Dynamic control data referance Pin
PDietz28-Apr-06 8:37
PDietz28-Apr-06 8:37 
Questioncoding for search button Pin
ramyasangeet28-Apr-06 2:19
ramyasangeet28-Apr-06 2:19 
AnswerRe: coding for search button Pin
V.28-Apr-06 3:29
professionalV.28-Apr-06 3:29 
AnswerRe: coding for search button Pin
Larantz28-Apr-06 8:59
Larantz28-Apr-06 8:59 
Create a button named i.e SearchButton and a textfield for holding the employee name.

Create a button_click event handler much like below:

<code>
private void SearchButton_Click(object sender, System.EventArgs e)
{
//Retrieve the name of the employee to search for
string name = this.textBoxName.Text;

//Searchstatement, much like SQL. I.e search for "Name like 'sangeet'".
//You can also add wildcards '%' to catch different versions of your
//searchtext. I.e 'searchstring = 'ColumnNameHere like '%" + name + "%'";

string searchStatement = "Name like '" + name + "'";

//Sort your hits, descending or ascending
string sorting = "Name DESC";

//Search for a row with matching name in column 'Name'
DataRow []rows = this.ds.Tables["TableNameHere"].Select(searchStatement, sorting);

foreach(DataRow row in rows)
{
for(int i=0; i < row.ItemArray.Length; i++)
{
//Do something with the data in each column of your datarow
Console.WriteLine(row.ItemArray[i].ToString());
}
}
}
</code>

-Larantz-

-- modified at 15:00 Friday 28th April, 2006
QuestionADO.Net and OOP Pin
martin_hughes28-Apr-06 0:51
martin_hughes28-Apr-06 0:51 
AnswerRe: ADO.Net and OOP Pin
V.28-Apr-06 1:08
professionalV.28-Apr-06 1:08 
GeneralRe: ADO.Net and OOP Pin
Maqsood Ahmed28-Apr-06 1:28
Maqsood Ahmed28-Apr-06 1:28 
QuestionFont Selection ToolStripComboBox Pin
Cerasti27-Apr-06 23:48
Cerasti27-Apr-06 23:48 
AnswerRe: Font Selection ToolStripComboBox Pin
alexey N27-Apr-06 23:55
alexey N27-Apr-06 23:55 
GeneralRe: Font Selection ToolStripComboBox Pin
Cerasti28-Apr-06 0:08
Cerasti28-Apr-06 0:08 
GeneralRe: Font Selection ToolStripComboBox Pin
alexey N28-Apr-06 0:27
alexey N28-Apr-06 0:27 
GeneralRe: Font Selection ToolStripComboBox Pin
Cerasti28-Apr-06 0:37
Cerasti28-Apr-06 0:37 
GeneralRe: Font Selection ToolStripComboBox Pin
alexey N28-Apr-06 0:57
alexey N28-Apr-06 0:57 
GeneralRe: Font Selection ToolStripComboBox Pin
Cerasti28-Apr-06 2:27
Cerasti28-Apr-06 2:27 
GeneralRe: Font Selection ToolStripComboBox Pin
Cerasti28-Apr-06 5:01
Cerasti28-Apr-06 5:01 
AnswerRe: Font Selection ToolStripComboBox Pin
Thomas Stockwell28-Apr-06 12:25
professionalThomas Stockwell28-Apr-06 12:25 
Questionhow to jpeg to bmp Pin
hikaru99627-Apr-06 22:22
hikaru99627-Apr-06 22:22 
AnswerRe: how to jpeg to bmp Pin
CWIZO27-Apr-06 23:38
CWIZO27-Apr-06 23:38 
GeneralRe: how to jpeg to bmp Pin
hikaru99628-Apr-06 1:40
hikaru99628-Apr-06 1:40 
GeneralRe: how to jpeg to bmp Pin
CWIZO28-Apr-06 1:43
CWIZO28-Apr-06 1:43 
GeneralRe: how to jpeg to bmp Pin
Graham Nimbley28-Apr-06 11:44
Graham Nimbley28-Apr-06 11:44 

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.