private void UserControl1_Load(object sender, EventArgs e)
{
try
{
List<emp> s = o.EMP1s.Select(x => new emp { EID = x.EID, NAME = x.NAME }).ToList();
dataGridView1.DataSource = s;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
public class emp
{
public int EID
{
get;
set;
}
public string NAME
{
get;
set;
}
}
{
try
{
List<emp> s = o.EMP1s.Select(x => new emp { EID = x.EID, NAME = x.NAME }).ToList();
dataGridView1.DataSource = s;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
public class emp
{
public int EID
{
get;
set;
}
public string NAME
{
get;
set;
}
}
No comments:
Post a Comment