public ActionResult Add(AddService.User user) { AddClient addClient = new AddClient(); user.SubmitTime = DateTime.Now; addClient.DoWork(user); return(RedirectToAction("Get")); }
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/>"); }