通过 List BaseModel 绑定 树形结构的FineUI.DropDownList - InitFineUITreeDropDownListByListBaseModel
2017-02-26 21:07:57 访问(1621) 赞(0) 踩(0)
/// <summary>
/// 通过 List BaseModel 绑定 树形结构的FineUI.DropDownList - InitFineUITreeDropDownListByListBaseModel +
/// </summary>
/// <param name="ddl"></param>
/// <param name="theList"></param>
/// <param name="curEmListControlAddItem"></param>
public void InitFineUITreeDropDownListByListBaseModel
(
FineUI.DropDownList ddl,
List<BaseModel> theList,
SlowX.FineUIUtils.Enums.ListControlAddItem.EmListControlAddItem curEmListControlAddItem
)
{
InitFineUITreeDropDownListByListBaseModel(ddl, theList, 0);
DropDownListSlowXFineUIUtilsFunctions.AddItemByEmListControlAddItem(ddl, curEmListControlAddItem);
}
/// <summary>
/// 通过 List BaseModel 绑定 树形结构的FineUI.DropDownList
/// </summary>
/// <param name="ddl"></param>
/// <param name="theList"></param>
/// <param name="curEmListControlAddItem"></param>
private void InitFineUITreeDropDownListByListBaseModel
(
FineUI.DropDownList ddl,
List<BaseModel> theList,
int treeLevel
)
{
if (theList == null)
return;
FineUI.ListItem item = null;
foreach (BaseModel model in theList)
{
item = new FineUI.ListItem();
item.Text = model.GetPropertyStrTheName();
item.Value = model.GetPropertyStrID();
item.SimulateTreeLevel = treeLevel;
ddl.Items.Add(item);
InitFineUITreeDropDownListByListBaseModel(ddl, model.GetListSon(), treeLevel + 1);
}
}
标签:
通过 List BaseModel 绑定 树形结构的FineUI.DropDownList - InitFineUITreeDropDownListByListBaseModel 


上一条:
下一条:
相关评论
发表评论