审核和取消不需要设计页面,只需写后台代码
审核:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class ShenHe : System.Web.UI.Page { private UsersDataContext context = new UsersDataContext(); protected void Page_Load(object sender, EventArgs e) { string uid = Request["uid"].ToString(); users data = context.users.Where(p => p.UserName == uid).First(); data.State = 1; context.SubmitChanges(); Response.Redirect("Main.aspx"); } }
取消:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class QuXiao : System.Web.UI.Page { private UsersDataContext context = new UsersDataContext(); protected void Page_Load(object sender, EventArgs e) { string uid = Request["uid"].ToString(); users data = context.users.Where(p => p.UserName == uid).First(); data.State = 2; context.SubmitChanges(); Response.Redirect("Main.aspx"); } }