public ActionResult Register(AccountRegister model)
 {
     var UserId = model.UserId;
     var Pwd = model.Pwd;
     Response.Write("<script>alert('注册成功!!')</script>");
     return Redirect("../Home/Index");
 }
 public async Task<ActionResult> Register(AccountRegister model)
 {
     DBHelper db = new DBHelper();
     var UserId = model.UserId;
     var Pwd = model.Pwd;
     //判断用户名是否存在
     if (!db.UserExist(UserId))
     {
         var cmd = "Insert into UserAccount(UserId,Pwd) values('"+UserId+"','"+Pwd+"')";
         db.SqlExcute(cmd);
         return Redirect("Login");
     }
     else
     {
         Response.Write("<script>alert('账号已存在~~~ ')</script>");
         return View();
     }
 }