コード例 #1
0
ファイル: EditUser.aspx.cs プロジェクト: archerkiller5/test
        /// <summary>
        /// 完成数据的更新
        /// </summary>
        protected void UpdateUserInfo()
        {
            UserInfo userInfo = new UserInfo();

            userInfo.Id       = Convert.ToInt32(Request.Form["txtId"]);
            userInfo.UserName = Request.Form["txtName"];
            userInfo.UserPass = Request.Form["txtPwd"];
            userInfo.Email    = Request.Form["txtMail"];
            userInfo.RegTime  = Convert.ToDateTime(Request.Form["txtRegTime"]);
            if (UserInfoService.EditUserInfo(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["txtEditUserName"];
            userInfo.UserPass = context.Request["txtEditUserPwd"];
            userInfo.Email    = context.Request["txtEditUserMail"];
            userInfo.Id       = Convert.ToInt32(context.Request["txtEditUserId"]);
            userInfo.RegTime  = Convert.ToDateTime(context.Request["txtEditRegTime"]);
            BLL.UserInfoService UserInfoService = new BLL.UserInfoService();
            if (UserInfoService.EditUserInfo(userInfo))
            {
                context.Response.Write("yes");
            }
            else
            {
                context.Response.Write("no");
            }
        }
コード例 #3
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //接收数据.
            //  UserInfo userInfo = new UserInfo();
            int id = Convert.ToInt32(context.Request.Form["txtId"]);//接收隐藏中的值

            BLL.UserInfoService UserInfoService = new BLL.UserInfoService();
            UserInfo            userInfo        = UserInfoService.GetUserInfo(id);

            userInfo.UserName = context.Request.Form["txtName"];
            userInfo.UserPass = context.Request.Form["txtPwd"];
            userInfo.Email    = context.Request.Form["txtMail"];
            if (UserInfoService.EditUserInfo(userInfo))
            {
                context.Response.Redirect("UserInfoList.ashx");
            }
            else
            {
                context.Response.Redirect("Error.html");
            }
        }