示例#1
0
 protected void InsertUserInfo()
 {
     Model.UserInfo UserInfo = new Model.UserInfo();
     UserInfo.UserName = Request.Form["txtName"];
     UserInfo.UserPass = Request.Form["txtPwd"];
     UserInfo.Email    = Request.Form["txtMail"];
     UserInfo.RegTime  = DateTime.Now;
     BLL.UserInfoService UserInfoService = new BLL.UserInfoService();
     if (UserInfoService.AddUserInfo(UserInfo))
     {
         Response.Redirect("UserInfoList.aspx");
     }
     else
     {
         Response.Redirect("/Error.html");
     }
 }
示例#2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            UserInfo userInfo = new UserInfo();

            userInfo.UserName = context.Request["txtUserName"];
            userInfo.UserPass = context.Request["txtUserPwd"];
            userInfo.Email    = context.Request["txtUserMail"];
            userInfo.RegTime  = DateTime.Now;
            BLL.UserInfoService UserInfoService = new BLL.UserInfoService();
            if (UserInfoService.AddUserInfo(userInfo))
            {
                context.Response.Write("ok");
            }
            else
            {
                context.Response.Write("no");
            }
        }
示例#3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string   userName  = context.Request.Form["txtName"];
            string   userPwd   = context.Request.Form["txtPwd"];
            string   userEmail = context.Request.Form["txtMail"];
            UserInfo userInfo  = new UserInfo();

            userInfo.UserName = userName;
            userInfo.UserPass = userPwd;
            userInfo.Email    = userEmail;
            userInfo.RegTime  = DateTime.Now;
            BLL.UserInfoService UserInfoService = new BLL.UserInfoService();
            if (UserInfoService.AddUserInfo(userInfo))
            {
                context.Response.Redirect("UserInfoList.ashx");
            }
            else
            {
                context.Response.Redirect("Error.html");
            }
        }