protected void IniGrid() { Maticsoft.BLL.tAbout BLL = new Maticsoft.BLL.tAbout(); DataTable table = null; table = BLL.GetList(" Id >0 order by Sort desc").Tables[0]; GridMenu.DataSource = table; GridMenu.DataBind(); }
protected void GridMenu_RowCommand(object sender, GridCommandEventArgs e) { int deptID = GetSelectedDataKeyID(GridMenu); if (e.CommandName == "Delete") { Maticsoft.BLL.tAbout BLL = new Maticsoft.BLL.tAbout(); if (BLL.Delete(deptID) == true) { Alert.ShowInTop("删除成功!"); IniGrid(); } } if (e.CommandName == "Edit") { string openUrl = String.Format("./SingleEdit.aspx?pageId={0}", HttpUtility.UrlEncode(deptID.ToString())); PageContext.RegisterStartupScript(Window1.GetSaveStateReference(deptID.ToString()) + Window1.GetShowReference(openUrl)); } }