protected void Page_Load(object sender, EventArgs e) { this.fun_id = MyRequest.GetQueryString("fun_id"); if (!Page.IsPostBack) { var model = GetAdminInfo_CCOM(); BLL.CCOM.Reply_group rg_bll = new BLL.CCOM.Reply_group(); BLL.CCOM.Reply_commission rc_bll = new BLL.CCOM.Reply_commission(); List <Model.CCOM.Reply_group> modellist1 = rg_bll.GetModelList("User_id=" + model.User_id); List <Model.CCOM.Reply_commission> modellist2 = rc_bll.GetModelList("User_id=" + model.User_id); if (modellist1.Count == 0 && modellist2.Count == 0) { string ht = ""; ht = " <div class=\"content\" align=\"center\"><h3>您尚无权限<h3><table class=\"table table-striped table-bordered dataTable\"></table></div>"; this.print_div.InnerHtml = ht; } else { string _order = MyRequest.GetString("sort").Replace(",", " "); if (_order == "" || Tools.CheckParams(_order)) { _order = " Group_id asc"; } StringBuilder strTemp = new StringBuilder(); strTemp.Append("("); string res = ""; foreach (Model.CCOM.Reply_group rg_model in modellist1) { res += rg_model.Group_id + ","; } foreach (Model.CCOM.Reply_commission rg_model in modellist2) { res += rg_model.Group_id + ","; } if (res != "") { strTemp.Append(Utils.DelLastComma(res) + ")"); } else { strTemp.Append("0)"); } RptBind(strTemp.ToString(), _order); } } }