{
List
TaskListBE objtaskListBE = new TaskListBE();
PropertyDescriptorCollection prop = TypeDescriptor.GetProperties(objtaskListBE);
foreach(DataRow datarow in dbTaskTable.Select())
{
objtaskListBE=new TaskListBE();
foreach (PropertyDescriptor properties in prop)
{
objtaskListBE.GetType().GetProperty(properties.Name).SetValue(objtaskListBE, (((datarow[properties.Name])==System.DBNull.Value)?null:datarow[properties.Name]), null);
}
lsttaskListBE.Add(objtaskListBE);
}
return lsttaskListBE;
}
No comments:
Post a Comment