public string GetRolesHead() { string strCols = ""; DataAccess.Para_District pro = new DataAccess.Para_District(); DataSet ds = pro.GetList(""); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strCols += string.Format("<th>{0}</th>", ds.Tables[0].Rows[i]["District_Name"].ToString()); } return(strCols); }
public string GetRolesDetail(string userId) { string strCols = ""; DataAccess.Para_District pro = new DataAccess.Para_District(); DataSet ds = pro.GetList(""); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { strCols += (string.Format("<td><input id={5}{1}{5} onclick={5}SetRoles('{1}',{2},'{3}','{4}'){5} type='checkbox' name='radio' data-labelauty='未授权|已授权' /></td>", userId, userId + "_" + ds.Tables[0].Rows[i]["District_Code"].ToString(), "this.checked" , userId, ds.Tables[0].Rows[i]["District_Code"].ToString(), @"""")); } return(strCols); }