protected void ButtonSubscribe_Click(object sender, EventArgs e) { if (!AuthenticationHandler.getInstance().ExistsEmail(TextBoxUser.Text)) { int key = VenueHostHandler.getInstance().InsertVenueHost(TextBoxName.Text, TextBoxUser.Text, TextBoxPassword.Text, 'V'); if (key == -1) { Response.Redirect("SubscribeVenueHostError.aspx"); } else { Response.Redirect("SubscribeVenueHostSuccess.aspx"); } } }
protected void ButtonAddBranch_Click(object sender, EventArgs e) { HttpCookie userCookie; userCookie = Request.Cookies["VenueHostID"]; if (userCookie == null) { Response.Redirect("Login.aspx"); } if (checkNumber(TextBoxAddressNumber.Text)) { int key = VenueHostHandler.getInstance().InsertBranch(Int32.Parse(userCookie.Value), TextBoxName.Text, TextBoxAddress.Text, Int32.Parse(TextBoxAddressNumber.Text), TextBoxZipCode.Text, TextBoxCity.Text, DropDownListProvince.Text, "Canada"); if (key == -1) { Response.Redirect("AddBranchError.aspx"); } else { Response.Redirect("VenueHostDashBoard.aspx"); } } }