public ActionResult Register(RegisterRowData model) { var result = _account.Register(model); if (result) { return(Redirect("/Account/Login")); } return(View()); }
// POST: api/apiRegister public int Post([FromBody] RegisterRowData model) { int result = 1; try { if (_accountmodel.checkUsernameIsexists(model)) { result = 2; // email da duoc dang ky } else if (_accountmodel.Register(model) == false) { result = -1; // loi he thong } } catch (Exception ex) { result = -1; } return(result); }