zoukankan      html  css  js  c++  java
  • 20151223:Web:审核:审核和取消

    审核和取消不需要设计页面,只需写后台代码

    审核:

    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");
        }
    }
  • 相关阅读:
    C# base64编码、解码
    C#异常重试通用类Retry
    C#操作Control异步工具类
    Notepad++的Json格式化插件
    CG 标准函数库
    Unity 几种优化建议
    基于Unity的Profiler性能分析
    Time.timeScale、游戏暂停
    Lua 中的string库(字符串函数库)总结
    Lua 日志
  • 原文地址:https://www.cnblogs.com/mn-b/p/5079196.html
Copyright © 2011-2022 走看看