public void SetCtls(DOEntity entity) { if (InvokeRequired) { this.Invoke(new Action(() => { SetCtls(entity); })); return; } LV_DO.Items.Clear(); var properties = entity.GetType().GetProperties(); foreach (var p in properties) { var attr = Attribute.GetCustomAttribute(p, typeof(DescriptionAttribute)); if (null != attr) { var desc = (DescriptionAttribute)attr; var str = Convert.ToBoolean(p.GetValue(entity)) ? "√" : "×"; { LV_DO.Items.Add(new ListViewItem(new string[] { desc.Name, str })); } } } }
public void SetCtls(DOEntity entity) { throw new NotImplementedException(); }