protected void RptModelList2_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
     {
         Repeater repeater = (Repeater)e.Item.FindControl("RptFieldList");
         repeater.DataSource = ModelManager.GetFieldListByModelId(((ModelInfo)e.Item.DataItem).ModelId);
         repeater.DataBind();
         IList <RoleFieldPermissionsInfo> fieldPermissionsById = new List <RoleFieldPermissionsInfo>();
         fieldPermissionsById = RolePermissions.GetFieldPermissionsById(this.m_RoleId);
         HiddenField field = e.Item.FindControl("HdnModelId") as HiddenField;
         int         num   = DataConverter.CLng(field.Value);
         foreach (RepeaterItem item in repeater.Items)
         {
             HiddenField field2 = item.FindControl("HdnFieldName") as HiddenField;
             CheckBox    box    = item.FindControl("ChkFieldPurview") as CheckBox;
             foreach (RoleFieldPermissionsInfo info in fieldPermissionsById)
             {
                 if ((info.FieldName == field2.Value) && (info.ModelId == num))
                 {
                     box.Checked = true;
                 }
             }
             if (((field2.Value == "Title") || (field2.Value == "Status")) || (field2.Value == "NodeId"))
             {
                 box.Enabled = false;
             }
         }
         HtmlTable table = (HtmlTable)e.Item.FindControl("model");
         if (e.Item.ItemIndex > 0)
         {
             table.Style.Add("display", "none");
         }
         if (this.m_ArrTable.Length == 0)
         {
             this.m_ArrTable.Append("\"" + table.ClientID + "\"");
         }
         else
         {
             this.m_ArrTable.Append(",\"" + table.ClientID + "\"");
         }
     }
 }