public int ReviewerRegistration(ReviewerLite r)
    {
        Reviewer rv = new Reviewer();


        int result = db.usp_NewReviewer(r.UserName, r.FirstName, r.LastName, r.Email, r.Password);

        return(result);
    }
    public bool RegisterReviewer(Reviewer r)
    {
        //register using the stored procedure
        bool result = true;
        int  rev    = db.usp_NewReviewer(r.ReviewerUserName,
                                         r.ReviewerFirstName, r.ReviewerLastName,
                                         r.ReviewerEmail, r.ReviewPlainPassword);

        return(result);
    }
        public ActionResult Register([Bind(Include = "ReviewerUserName,ReviewerFirstName,ReviewerLastName,ReviewerEmail,ReviewPlainPassword")] Reviewer r)
        {
            int result = db.usp_NewReviewer(r.ReviewerUserName, r.ReviewerFirstName, r.ReviewerLastName, r.ReviewerEmail, r.ReviewPlainPassword);

            if (result != -1)
            {
                return(RedirectToAction("Index"));
            }

            return(View());
        }
示例#4
0
        public ActionResult Register([Bind(Include = "ReviewerUserName, ReviewerFirstName, ReviewerLastName, ReviewerEmail, ReviewPlainPassword")] Reviewer reviewer)
        {
            //we are passing the fields from the class to the stored procedure
            //which will write the reviewer and create the hashed password.
            int result = db.usp_NewReviewer(reviewer.ReviewerUserName, reviewer.ReviewerFirstName, reviewer.ReviewerLastName, reviewer.ReviewerEmail, reviewer.ReviewPlainPassword);

            if (result != -1)
            {
                return(RedirectToAction("Index"));
            }
            return(View(reviewer));
        }
示例#5
0
    protected void SubmitButton_Click(object sender, EventArgs e)
    {
        string user     = UserTextBox.Text;
        string first    = FirstNameTextBox.Text;
        string last     = LastNameTextBox.Text;
        string email    = EmailTextBox.Text;
        string password = ConfirmTextBox.Text;

        BookReviewDbEntities db = new BookReviewDbEntities();
        int result = db.usp_NewReviewer(user, first, last, email, password);

        if (result != -1)
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            ErrorLabel.Text = "Something went terribly wrong";
        }
    }