dongtrien 13 Newbie Poster

I get the employee list from SQL Server problem with fields:
ID: id employee
Employee: name employee
after filter the kernel list dv.RowFilter = "set condition unique 1 recoder" at the command if (dv.Count == 1) at this assignment id and the kernel name is not correct the unique file filter on which it assign the first file in the family list. yourself want to get sample sample already been filter by dv.RowFilter, main syntax in command if (dv.Count == 1) {// chars this again as what ?)

string tmpSQL = "string to get the list employee";
DataTable dt = Conection.FillDatatable(tmpSQL);

DataView dv = new DataView(dt);
// Search fast Employee
dv.RowFilter = "set condition unique 1 recoder";

if (dv.Count == 1)
{
//error at this buffer is not get unique sample template 
txtIdEmployee.Text = dv.Table.Rows[0]["ID"].ToString(); 
txtNameEmployee.Text = dv.Table.Rows[0]["Employee"].ToString();
}
else
{
//...
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.