</asp:Repeater>
Maticsoft.Model.DR_TRoles _TRoles = _bll_TRoles.GetModel(int.Parse(user.TRIdInt.ToString()));
if (_TRoles != null && _TRoles.Cids != null)
{
DataSet ds = _bll_TMenus.GetList(" TMIdInt in(" + _TRoles.Cids + ") order by SortTint ASC");
Repeater1.DataSource = ds;
Repeater1.DataBind();
string[] arr = user.Cids.Split(',');
for (int i = 0; i < arr.Length; i++)
{
foreach (Control c in this.Repeater1.Controls)
{
CheckBoxList cbx = (CheckBoxList)c.FindControl("CheckBoxList1");
if (cbx != null)
{
foreach (ListItem item in cbx.Items)
{
if (item.Value==arr[i])
{
item.Selected = true;
}
}
}
}
}
}
string cids = string.Empty;
foreach (Control c in this.Repeater1.Controls)
{
CheckBoxList cbx = (CheckBoxList)c.FindControl("CheckBoxList1");
if (cbx != null)
{
foreach (ListItem item in cbx.Items)
{
if (item.Selected == true)
{
cids += item.Value+",";
}
}
}
}
user.Cids = cids.TrimEnd(',');
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有