protected void SaveAll_Click(object sender, EventArgs e) { if (logo_description.SelectedValue != "2") { if ((logo_pic.HasFile) && (auth_doc.HasFile)) { TransactionOptions transactionOptions = new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted, Timeout = new TimeSpan(0, 15, 0) }; TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, transactionOptions); try { c_pwall.validationID = transID; c_pwall.amt = xamt.Value; c_pwall.applicantID = xcode.Text; c_pwall.log_officer = "0"; c_app.xname = xapplicantname.Value; c_app.nationality = nationality.Text; c_app.log_staff = "0"; c_app.reg_date = reg_date; c_app.visible = visible; c_app_addy.countryID = residence.Text; c_app_addy.stateID = xselectState.Text; c_app_addy.street = xaddress.Text; c_app_addy.telephone1 = xtelephone.Text; c_app_addy.email1 = xemail.Text; c_app_addy.log_staff = "0"; c_app_addy.reg_date = reg_date; c_app_addy.visible = visible; c_mark.tm_typeID = tmType.SelectedValue; if (Session["logo_description"] != null) { c_mark.logo_descriptionID = Session["logo_description"].ToString(); Session["logo_descriptionxx"] = Session["logo_description"].ToString(); } else { c_mark.logo_descriptionID = logo_description.SelectedValue; } c_mark.product_title = title_of_product.Text; c_mark.nice_class = national_class.SelectedValue; c_mark.nice_class_desc = nice_class_desc.Text; c_mark.national_classID = national_class.SelectedValue; c_mark.disclaimer = txt_discalimer.Text; c_mark.log_staff = "0"; c_mark.reg_date = reg_date; c_mark.xvisible = visible; c_aos.stateID = aos_xselectState.Text; c_aos.city = ""; c_aos.street = aos_xaddress.Text; c_aos.telephone1 = aos_xtelephone.Text; c_aos.email1 = aos_xemail.Text; c_aos.log_staff = "0"; c_aos.reg_date = reg_date; c_aos.visible = visible; c_rep.agent_code = xcode.Text; c_rep.xname = rep_xname.Text; c_rep.nationality = rep_nationality.SelectedValue; c_rep.log_staff = "0"; c_rep.reg_date = reg_date; c_rep.visible = visible; c_rep_addy.countryID = rep_residence.SelectedValue; c_rep_addy.stateID = xselectRepState.SelectedValue; c_rep_addy.city = ""; c_rep_addy.street = rep_address.Text; c_rep_addy.telephone1 = rep_xtelephone.Text; c_rep_addy.email1 = rep_xemail.Text; c_rep_addy.log_staff = "0"; c_rep_addy.reg_date = reg_date; c_rep_addy.visible = visible; pwalletID = xpwalletID.Value; xmarkID.Value = t.addTrademarkTx(c_app, c_mark, c_aos, c_rep, c_app_addy, c_rep_addy, c_pwall, sl_docz, logo_pic, auth_doc, sup_doc1, sup_doc2, Server.MapPath("~/")); if (Convert.ToInt32(xmarkID.Value) > 0) { scope.Complete(); scope.Dispose(); } else { scope.Dispose(); Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } } catch (Exception exception) { exception.ToString(); scope.Dispose(); Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } finally { if (scope != null) { scope.Dispose(); } } Response.Redirect("./tm_acknowledgement.aspx"); } else { show_imageMsg = "PLEASE UPLOAD A VALID IMAGE AND POWER OF ATTORNEY DOCUMENT!!"; } } //////////No Logo else { if (auth_doc.HasFile) { TransactionOptions transactionOptions = new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted, Timeout = new TimeSpan(0, 15, 0) }; TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, transactionOptions); try { c_pwall.validationID = transID; c_pwall.amt = xamt.Value; c_pwall.applicantID = xcode.Text; c_pwall.log_officer = "0"; c_app.xname = xapplicantname.Value; c_app.nationality = nationality.Text; c_app.log_staff = "0"; c_app.reg_date = reg_date; c_app.visible = visible; c_app_addy.countryID = residence.Text; c_app_addy.stateID = xselectState.Text; c_app_addy.street = xaddress.Text; c_app_addy.telephone1 = xtelephone.Text; c_app_addy.email1 = xemail.Text; c_app_addy.log_staff = "0"; c_app_addy.reg_date = reg_date; c_app_addy.visible = visible; c_mark.tm_typeID = tmType.SelectedValue; if (Session["logo_description"] != null) { c_mark.logo_descriptionID = Session["logo_description"].ToString(); Session["logo_descriptionxx"] = Session["logo_description"].ToString(); } else { c_mark.logo_descriptionID = logo_description.SelectedValue; } c_mark.product_title = title_of_product.Text; c_mark.nice_class = national_class.SelectedValue; c_mark.nice_class_desc = nice_class_desc.Text; c_mark.national_classID = national_class.SelectedValue; c_mark.disclaimer = txt_discalimer.Text; c_mark.log_staff = "0"; c_mark.reg_date = reg_date; c_mark.xvisible = visible; c_aos.stateID = aos_xselectState.Text; c_aos.city = ""; c_aos.street = aos_xaddress.Text; c_aos.telephone1 = aos_xtelephone.Text; c_aos.email1 = aos_xemail.Text; c_aos.log_staff = "0"; c_aos.reg_date = reg_date; c_aos.visible = visible; c_rep.agent_code = xcode.Text; c_rep.xname = rep_xname.Text; c_rep.nationality = rep_nationality.SelectedValue; c_rep.log_staff = "0"; c_rep.reg_date = reg_date; c_rep.visible = visible; c_rep_addy.countryID = rep_residence.SelectedValue; c_rep_addy.stateID = xselectRepState.SelectedValue; c_rep_addy.city = ""; c_rep_addy.street = rep_address.Text; c_rep_addy.telephone1 = rep_xtelephone.Text; c_rep_addy.email1 = rep_xemail.Text; c_rep_addy.log_staff = "0"; c_rep_addy.reg_date = reg_date; c_rep_addy.visible = visible; pwalletID = xpwalletID.Value; xmarkID.Value = t.addTrademarkTx(c_app, c_mark, c_aos, c_rep, c_app_addy, c_rep_addy, c_pwall, sl_docz, logo_pic, auth_doc, sup_doc1, sup_doc2, Server.MapPath("~/")); if (Convert.ToInt32(xmarkID.Value) > 0) { scope.Complete(); scope.Dispose(); } else { scope.Dispose(); Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } } catch (Exception exception) { exception.ToString(); scope.Dispose(); Response.Redirect("http://www.iponigeria.com/userarea/dashboard"); } finally { if (scope != null) { scope.Dispose(); } } Response.Redirect("./tm_acknowledgement.aspx"); } else { show_imageMsg = "PLEASE UPLOAD A VALID POWER OF ATTORNEY DOCUMENT!"; } } }
protected void SaveAll_Click(object sender, EventArgs e) { if (logo_description.SelectedValue != "2") { if ((logo_pic.HasFile) && (auth_doc.HasFile)) { TransactionOptions transactionOptions = new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted, Timeout = new TimeSpan(0, 15, 0) }; TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, transactionOptions); try { c_pwall.validationID = transID; c_pwall.amt = xamt.Value; c_pwall.applicantID = xcode.Text; c_pwall.log_officer = hwalletID; c_app.xname = xapplicantname.Value; c_app.nationality = nationality.Text; c_app.log_staff = "0"; c_app.reg_date = reg_date; c_app.visible = visible; c_app_addy.countryID = residence.Text; c_app_addy.stateID = xselectState.Text; c_app_addy.street = xaddress.Text; c_app_addy.telephone1 = xtelephone.Text; c_app_addy.email1 = xemail.Text; c_app_addy.log_staff = "0"; c_app_addy.reg_date = reg_date; c_app_addy.visible = visible; c_mark.tm_typeID = tmType.SelectedValue; c_mark.logo_descriptionID = logo_description.SelectedValue; c_mark.product_title = title_of_product.Text; c_mark.nice_class = national_class.SelectedValue; c_mark.nice_class_desc = nice_class_desc.Text; c_mark.national_classID = national_class.SelectedValue; c_mark.disclaimer = txt_discalimer.Text; c_mark.log_staff = "0"; c_mark.reg_date = reg_date; c_mark.xvisible = visible; c_aos.stateID = aos_xselectState.Text; c_aos.city = ""; c_aos.street = aos_xaddress.Text; c_aos.telephone1 = aos_xtelephone.Text; c_aos.email1 = aos_xemail.Text; c_aos.log_staff = "0"; c_aos.reg_date = reg_date; c_aos.visible = visible; c_rep.agent_code = xcode.Text; c_rep.xname = rep_xname.Text; c_rep.nationality = rep_nationality.SelectedValue; c_rep.log_staff = "0"; c_rep.reg_date = reg_date; c_rep.visible = visible; c_rep_addy.countryID = rep_residence.SelectedValue; c_rep_addy.stateID = xselectRepState.SelectedValue; c_rep_addy.city = ""; c_rep_addy.street = rep_address.Text; c_rep_addy.telephone1 = rep_xtelephone.Text; c_rep_addy.email1 = rep_xemail.Text; c_rep_addy.log_staff = "0"; c_rep_addy.reg_date = reg_date; c_rep_addy.visible = visible; pwalletID = xpwalletID.Value; if (Session["hwalletID"] != null) { hwalletID = Session["hwalletID"].ToString(); } xmarkID.Value = t.addTrademarkTx(c_app, c_mark, c_aos, c_rep, c_app_addy, c_rep_addy, c_pwall, sl_docz, logo_pic, auth_doc, sup_doc1, sup_doc2, Server.MapPath("~/")); // if (Convert.ToInt32(xmarkID.Value) > 0) { scope.Complete(); /*Response.Write(xmarkID.Value);*/ } if (Convert.ToInt32(xmarkID.Value) > 0) { ws_payx.payx ws_p = new ws_payx.payx(); status = ws_p.UpdateHwallet(hwalletID, "Used", reg_date, title_of_product.Text); if (status >= 0) { scope.Complete(); scope.Dispose(); } else { scope.Dispose(); Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]); } } else { scope.Dispose(); Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]); } ///// } catch (Exception exception) { exception.ToString(); scope.Dispose(); Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]); } finally { if (scope != null) { scope.Dispose(); } } if (Convert.ToInt32(xmarkID.Value) > 0) { Response.Redirect("./ntm_acknowledgement.aspx"); } } else { enable_RepSave = "1"; show_imageMsg = "PLEASE UPLOAD A VALID IMAGE AND POWER OF ATTORNEY DOCUMENT!!"; } } //////////No Logo else { if (auth_doc.HasFile) { TransactionOptions transactionOptions = new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted, Timeout = new TimeSpan(0, 15, 0) }; TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, transactionOptions); try { c_pwall.validationID = transID; c_pwall.amt = xamt.Value; c_pwall.applicantID = xcode.Text; c_pwall.log_officer = hwalletID; c_app.xname = xapplicantname.Value; c_app.nationality = nationality.Text; c_app.log_staff = "0"; c_app.reg_date = reg_date; c_app.visible = visible; c_app_addy.countryID = residence.Text; c_app_addy.stateID = xselectState.Text; c_app_addy.street = xaddress.Text; c_app_addy.telephone1 = xtelephone.Text; c_app_addy.email1 = xemail.Text; c_app_addy.log_staff = "0"; c_app_addy.reg_date = reg_date; c_app_addy.visible = visible; c_mark.tm_typeID = tmType.SelectedValue; c_mark.logo_descriptionID = logo_description.SelectedValue; c_mark.product_title = title_of_product.Text; c_mark.nice_class = national_class.SelectedValue; c_mark.nice_class_desc = nice_class_desc.Text; c_mark.national_classID = national_class.SelectedValue; c_mark.disclaimer = txt_discalimer.Text; c_mark.log_staff = "0"; c_mark.reg_date = reg_date; c_mark.xvisible = visible; c_aos.stateID = aos_xselectState.Text; c_aos.city = ""; c_aos.street = aos_xaddress.Text; c_aos.telephone1 = aos_xtelephone.Text; c_aos.email1 = aos_xemail.Text; c_aos.log_staff = "0"; c_aos.reg_date = reg_date; c_aos.visible = visible; c_rep.agent_code = xcode.Text; c_rep.xname = rep_xname.Text; c_rep.nationality = rep_nationality.SelectedValue; c_rep.log_staff = "0"; c_rep.reg_date = reg_date; c_rep.visible = visible; c_rep_addy.countryID = rep_residence.SelectedValue; c_rep_addy.stateID = xselectRepState.SelectedValue; c_rep_addy.city = ""; c_rep_addy.street = rep_address.Text; c_rep_addy.telephone1 = rep_xtelephone.Text; c_rep_addy.email1 = rep_xemail.Text; c_rep_addy.log_staff = "0"; c_rep_addy.reg_date = reg_date; c_rep_addy.visible = visible; pwalletID = xpwalletID.Value; if (Session["hwalletID"] != null) { hwalletID = Session["hwalletID"].ToString(); } xmarkID.Value = t.addTrademarkTx(c_app, c_mark, c_aos, c_rep, c_app_addy, c_rep_addy, c_pwall, sl_docz, logo_pic, auth_doc, sup_doc1, sup_doc2, Server.MapPath("~/")); if (Convert.ToInt32(xmarkID.Value) > 0) { ws_payx.payx ws_p = new ws_payx.payx(); status = ws_p.UpdateHwallet(hwalletID, "Used", reg_date, title_of_product.Text); if (status >= 0) { scope.Complete(); scope.Dispose(); } else { scope.Dispose(); Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]); } } else { scope.Dispose(); Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]); } } catch (Exception exception) { exception.ToString(); Response.Write("Single" + exception.ToString()); scope.Dispose(); Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]); } finally { if (scope != null) { scope.Dispose(); } } if (Convert.ToInt32(xmarkID.Value) > 0) { Response.Redirect("./ntm_acknowledgement.aspx"); } } else { enable_RepSave = "1"; show_imageMsg = "PLEASE UPLOAD A VALID POWER OF ATTORNEY DOCUMENT!"; } } }