public IList <T> GetRefilledEntityList <T>(DataGridView dgv) where T : class, new() { ColumnMember[] columnMembers = m_fillEntrys[dgv] as ColumnMember[]; CGridRefillTool cGridRefillTool = new CGridRefillTool(dgv, columnMembers); return(cGridRefillTool.GetRefilledRowDataList <T>()); }
public IList GetRefilledEntityList(DataGridView dgv) { ColumnMember[] columnMembers = m_fillEntrys[dgv] as ColumnMember[]; CGridRefillTool cGridRefillTool = new CGridRefillTool(dgv, columnMembers); return(cGridRefillTool.GetRefilledRowDataList()); }
internal override void FillEntity(Control control, object entity) { DataGridView dataGridView = control as DataGridView; if (control == null || dataGridView == null) { throw new ArgumentNullException("control"); } if (entity == null) { throw new ArgumentNullException("entity"); } if (m_member.Trim() == string.Empty || m_columnMembers == null || m_columnMembers.Length <= 0) { return; } try { IList list = null; Type propertyType = PropertyHelper.GetPropertyType(m_member, entity); if (propertyType.IsArray) { Type elementType = propertyType.GetElementType(); CGridRefillTool cGridRefillTool = new CGridRefillTool(dataGridView, m_columnMembers); list = cGridRefillTool.GetRefilledRowDataList(elementType); if (list != null) { ArrayList arrayList = new ArrayList(list); list = arrayList.ToArray(elementType); } } PropertyHelper.SetPropertyValue(m_member, entity, list); } catch { throw; } }