/// <summary> /// 绑定数据 /// </summary> protected void BindData() { if (!string.IsNullOrEmpty(Request.QueryString["plateID"])) { int id = 0; if (!int.TryParse(Request.QueryString["plateID"], out id)) { throw new Exception("你所访问的页面不存在!"); } ExtendBLL.PostPlate pp = new ExtendBLL.PostPlate(); LabMS.Model.PostPlate ppInfo = pp.GetModel(id); if (ppInfo == null) { throw new Exception("当前版块已经在另一处被删除!"); } ExtendBLL.Post post = new ExtendBLL.Post(); DataSet dsWholePosts = post.GetAllWithFullInfo(ppInfo.ID); AspNetPager.RecordCount = dsWholePosts.Tables[0].Rows.Count; HandleData(dsWholePosts); } else { throw new Exception("你所访问的页面不存在!"); } }
protected void Page_Load(object sender, EventArgs e) { strPagePrivilege.Add("BKGL"); strPageUserType.Add("mana"); if (!Page.IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["plateID"])) { int id = 0; if (!int.TryParse(Request.QueryString["plateID"], out id)) { throw new Exception("�������ʵ�ҳ�治����!"); } ExtendBLL.PostPlate pp = new ExtendBLL.PostPlate(); LabMS.Model.PostPlate ppInfo = pp.GetModel(id); if (ppInfo == null) { throw new Exception("��ǰ���������һ����ɾ��!"); } PlateTitle.Text = ppInfo.Name; dsModerators = pp.GetAllModerators(id); } else { throw new Exception("�������ʵ�ҳ�治����!"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int id = 0; if (string.IsNullOrEmpty(Request.QueryString["id"])) { WriteBackScript("alert('指定版块分区不存在');window.location.href='Index.aspx';"); return; } if (!int.TryParse(Request.QueryString["id"], out id)) { WriteBackScript("alert('指定版块分区不存在');window.location.href='Index.aspx';"); return; } ExtendBLL.PostPlate pp = new ExtendBLL.PostPlate(); ppInfo = pp.GetModel(id); if (ppInfo == null) { WriteBackScript("alert('指定版块分区不存在');window.location.href='Index.aspx';"); return; } dsPlates = pp.GetSubPlates(id, true); } }
protected void Page_Load(object sender, EventArgs e) { strPagePrivilege.Add("BKGL"); strPageUserType.Add("mana"); if (!Page.IsPostBack) { int id = 0; if (!string.IsNullOrEmpty(Request.QueryString["sectionID"])) { int.TryParse(Request.QueryString["sectionID"], out id); } ExtendBLL.PostPlate pp = new ExtendBLL.PostPlate(); if (id != 0) { LabMS.Model.PostPlate ppInfo = pp.GetModel(id); if (ppInfo != null) { SectionName.Text = ppInfo.Name; SectionList.Visible = false; SectionName.Visible = true; return; } } DataSet ds = pp.GetSections(); foreach (DataRow row in ds.Tables[0].Rows) { SectionList.Items.Add( new ListItem(row["Name"].ToString(), row["ID"].ToString()) ); } } }