public ActionResult DoChangePassword(string oldPassword, string newPassword) { var service = new OwnerService(); var account = Session["Account"] as AccountInfo; var owner = new Owner() { Name = account.Name, Password = oldPassword }; return(Json(service.ChangePassword(owner, newPassword))); }