/// <summUry> /// 绑定用户列表 /// </summUry> protected void UserBind() { SgqPage pg = new SgqPage(); pg.PageIndex = Pages; pg.PageSize = 30; pg.dt = bU.UserList(mU).Tables[0]; DBList.DataSource = pg.DataSource(); DBList.DataBind(); this.PageView.Text = pg.PageView1(); }
/// <summary> /// 绑定管理员列表 /// </summary> protected void AdminBind() { bAdmin bA = new bAdmin(); SgqPage pg = new SgqPage(); pg.PageIndex = Pages; pg.PageSize = 30; pg.dt = bA.AdminList().Tables[0]; DBList.DataSource = pg.DataSource(); DBList.DataBind(); this.PageView.Text = pg.PageView1(); }
/// <summary> /// 栏目列表信息遍历 /// </summary> /// <param name="ParentId"></param> /// <param name="Line"></param> protected void ListBind(int MenuId) { #region 2010-05-25 mjh string mmod = "style=\"display:none;\""; string mdel = "style=\"display:none;\""; string mshow = "style=\"display:none;\""; if (mM.Id != 0) { DataSet dst = bM.MenuReader(mM); if (dst.Tables[0].Rows.Count > 0) { string[] Arry2 = dst.Tables[0].Rows[0]["Sitting"].ToString().Split(','); for (int i = 0; i < Arry2.Length; i++) { if (Arry2[i] == "2") { mmod = ""; } if (Arry2[i] == "3") { mdel = ""; } if (Arry2[i] == "5") { mshow = ""; } } } } #endregion mm.FieldList = GetField(); mm.Condition = " ClassId=" + MenuId; mm.Sort = "Sort DESC"; mm.PageSize = 20; mm.PageIndex = StringDeal.ToInt(Request.QueryString["Page"]); DataSet ds = bm.ModelList(mm); //----分页开始----- SgqPage pg = new SgqPage(); pg.PageSize = mm.PageSize; pg.PageIndex = mm.PageIndex; pg.RecordCount = (int)ds.Tables[1].Rows[0][0];//获取数据总数 this.PageView.Text = pg.PageView2(); //----分页结束----- foreach (DataRow dr in ds.Tables[0].Rows) { InfoList += "<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">\n"; InfoList += "<td align=\"center\"><input type=\"checkbox\" name=\"Id\" value=\"" + dr[0] + "\" /></td>\n"; InfoList += "<td align=\"center\">" + dr[0] + "</td>\n"; int x = 0; foreach (string j in GetField().Split(',')) { int i = 0; if (x == 0) { if (StringDeal.GetTrueOfStr(dr["IsTop"], "[置顶]") != string.Empty) { i++; } if (StringDeal.GetTrueOfStr(dr["IsElite"], "[推荐]") != string.Empty) { i++; } if (StringDeal.GetTrueOfStr(dr["IsHot"], "[热门]") != string.Empty) { i++; } i = i * 6; } InfoList += "<td><div class=\"editfieldbox\" title=\"" + StringDeal.StrFormat(dr[j]) + "\">" + HXD.Common.StringDeal.Substrings1(StringDeal.StrFormat(dr[j]).ToString(), 44 - i) + " "; if (x == 0) { InfoList += "<span style=\"color:green;\">"; InfoList += StringDeal.GetTrueOfStr(dr["IsTop"], "[置顶]"); InfoList += StringDeal.GetTrueOfStr(dr["IsElite"], "[推荐]"); InfoList += StringDeal.GetTrueOfStr(dr["IsHot"], "[热门]"); InfoList += "</span>"; } InfoList += "</div></td>\n"; x++; } InfoList += "<td align=\"center\" nowrap=\"nowrap\"><input type=\"type\" onchange=\"IsNum(this.value," + dr[0] + ");\" class=\"input required\" size=\"3\" id=\"SortId_" + dr[0] + "\" name=\"SortId\" value=\"" + dr["Sort"] + "\" /><span id='s" + dr[0] + "'></span></td>\n"; InfoList += "<td align=\"center\" nowrap=\"nowrap\">" + StringDeal.GetYesOrNo(dr["IsStatus"]) + "</td>\n"; InfoList += "<td align=\"center\" nowrap=\"nowrap\">"; InfoList += " <a href=\"Useradd.aspx?MenuId=" + dr[0] + "\">添加管理员</a> <a " + mshow + " href=\"Model_show.aspx?MenuId=" + MenuId + "&Id=" + dr[0] + "\">查看</a> <a " + mmod + " href=\"Model_Edit.aspx?MenuId=" + MenuId + "&Id=" + dr[0] + "\">修改</a> <a " + mdel + " onclick=\"return confirm('确认删除');\" href=\"?Action=del&MenuId=" + MenuId + "&Id=" + dr[0] + "\">删除</a>"; InfoList += "</td>\n</tr>\n"; } }