Esempio n. 1
0
        public ActionResult Add(AddService.User user)
        {
            AddClient addClient = new AddClient();

            user.SubmitTime = DateTime.Now;
            addClient.DoWork(user);
            return(RedirectToAction("Get"));
        }
Esempio n. 2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            User user = new User();

            user.UserName   = this.txtUserName.Text;
            user.Password   = this.txtPassword.Text;
            user.Discribe   = this.txtDiscribe.Text;
            user.SubmitTime = System.DateTime.Now;
            addClient.DoWork(user);
            Response.Write("添加成功!<a href='list.aspx'>返回列表</a><br/>");
        }