Exemplo n.º 1
0
        protected void button_next(object sender, EventArgs e)
        {
            //STORE RESPONSE INTO A SESSION
            if (validateORGFields() != false)
            {
                orgList.Add(txtOrgNameField.Value.ToString());
                orgList.Add(txtMailAddrLine1.Value.ToString());
                orgList.Add(txtMailAddrLine2.Value.ToString());
                orgList.Add(txtCity.Value.ToString());
                orgList.Add(txtPostalCode.Value.ToString());
                orgList.Add(txtTelephone.Value.ToString());
                orgList.Add(txtOffice.Value.ToString());
                orgList.Add(txtWebsiteURL.Value.ToString());
                orgList.Add(txtbDesc.Value.ToString());
                orgList.Add(pointOfContact.Value.ToString());
                orgList.Add(txtnotes.Value.ToString());
                orgList.Add(txtUEN.Value.ToString());

                int check = 0;
                try
                {
                    check = db.addOrg(orgList);
                    if (check == 1 || check == 2)
                    {
                        Response.Redirect("Membership_Registration_CorperateAssociateRepresentative.aspx");

                        //ScriptManager.RegisterStartupScript(Page, GetType(), "AlertDisplay", "displaySuccess('Successfully Created New Org: " + txtOrgNameField.Value + "');", true);
                    }
                    else if (check == 0)
                    {
                        ScriptManager.RegisterStartupScript(Page, GetType(), "AlertFailureDisplay", "displayFailure();", true);
                    }
                }
                catch (Exception ex)
                {
                    ErrorLog.WriteErrorLog(ex.ToString());
                    ScriptManager.RegisterStartupScript(Page, GetType(), "AlertFailureDisplay", "displayFailure();", true);
                }
            }
            else
            {
                //error message
            }
        }