예제 #1
0
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            dbProcedures db = new dbProcedures();

            int MemberId = 0;

            MemberId = db.CreateNewMember(txtUsername.Text, txtPassword.Text, cbInvalidPassword.Checked, cbInactive.Checked, txtFirstName.Text, txtLastName.Text, txtCarrier.SelectedValue, txtEmployerGroup.Text);
            db.Close();

            if (MemberId == -1)
            {
                Session["strMemberId"] = "";
                lblMemberId.Text = "Username already exists!";
                lblMemberId.ForeColor = System.Drawing.Color.Red;
            }
            else
            {
                Response.Redirect("~/MemberDetail.aspx?id=" + MemberId);
            }
        }