public ActionResult Register([Bind(Include = "UserName,Password,Email")] Users users) { if (ModelState.IsValid) { string relativepath = @"/img/touxiang.jpg"; users.HeadPic = relativepath; usersmanager.AddUsers(users); return(Content("<script>;alert('注册成功!');history.go(-1)</script>")); } else { return(Content("<script>;alert('注册失败!');history.go(-1)</script>")); } }
public int AddUsers(Users users) { return(um.AddUsers(users)); }