예제 #1
0
파일: xind3.aspx.cs 프로젝트: ozotony/Cldx
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Session["fee_detailsID"]          = null;
                Session["item_code"]              = null;
                Session["hwalletID"]              = null;
                Session["vid"]                    = null;
                Session["amt"]                    = null;
                Session["aid"]                    = null;
                Session["pc"]                     = null;
                Session["agentemail"]             = null;
                Session["agentpnumber"]           = null;
                Session["applicantname"]          = null;
                Session["applicant_addy"]         = null;
                Session["applicantemail"]         = null;
                Session["applicant_no"]           = null;
                Session["product_title"]          = null;
                Session["xapplication"]           = null;
                Session["pwalletID"]              = null;
                Session["log_staffID"]            = null;
                Session["xapplication"]           = null;
                Session["new_miID"]               = null;
                Session["pwalletID"]              = null;
                Session["logo_desc"]              = null;
                Session["app_succID"]             = null;
                Session["applicant_succID"]       = null;
                Session["agent_succID"]           = null;
                Session["assID"]                  = null;
                Session["app_type"]               = null;
                Session["mergerID"]               = null;
                Session["certID"]                 = null;
                Session["vid"]                    = null;
                Session["amt"]                    = null;
                Session["agt"]                    = null;
                Session["xgt"]                    = null;
                Session["agentname"]              = null;
                Session["agentemail"]             = null;
                Session["agentpnumber"]           = null;
                Session["applicantname"]          = null;
                Session["applicantemail"]         = null;
                Session["applicantpnumber"]       = null;
                Session["product_title"]          = null;
                Session["item_code"]              = null;
                Session["cert_doc_newfilename"]   = null;
                Session["ass_doc_newfilename"]    = null;
                Session["merger_doc_newfilename"] = null;
                Session["logo_pic_newfilename"]   = null;
                Session["app_doc_newfilename"]    = null;
                Session["pub_doc_newfilename"]    = null;
                Session["sup_doc_newfilename"]    = null;
                Session["hwalletID"]              = null;
                string serverpath = Server.MapPath("~/");

                if (Request.Form["item_code"] != null)
                {
                    this.item_code = Request.Form["item_code"];
                }
                if (Request.Form["fee_detailsID"] != null)
                {
                    this.fee_detailsID = Request.Form["fee_detailsID"];
                }
                if (Request.Form["hwalletID"] != null)
                {
                    this.hwalletID = Request.Form["hwalletID"];
                }
                if (Request.Form["transID"] != null)
                {
                    this.transID = Request.Form["transID"];
                }
                if (Request.Form["amt"] != null)
                {
                    this.amt = Request.Form["amt"];
                }
                if (Request.Form["agent"] != null)
                {
                    this.agent = Request.Form["agent"];
                }
                if (Request.Form["agentemail"] != null)
                {
                    this.agentemail = Request.Form["agentemail"];
                }
                if (Request.Form["agentpnumber"] != null)
                {
                    this.agentpnumber = Request.Form["agentpnumber"];
                }
                if (Request.Form["applicantemail"] != null)
                {
                    this.applicantemail = Request.Form["applicantemail"];
                }
                if (Request.Form["applicantpnumber"] != null)
                {
                    this.applicantpnumber = Request.Form["applicantpnumber"];
                }
                if (Request.Form["applicant_addy"] != null)
                {
                    if (Request.Form["applicant_addy"].ToString().Contains("%26"))
                    {
                        this.applicant_addy = Request.Form["applicant_addy"].Replace("%26", "&");
                    }
                    else
                    {
                        this.applicant_addy = Request.Form["applicant_addy"];
                    }
                }
                if (Request.Form["agentname"] != null)
                {
                    if (Request.Form["agentname"].ToString().Contains("%26"))
                    {
                        this.agentname = Request.Form["agentname"].Replace("%26", "&");
                    }
                    else
                    {
                        this.agentname = Request.Form["agentname"];
                    }
                }

                if (Request.Form["applicantname"] != null)
                {
                    if (Request.Form["applicantname"].ToString().Contains("%26"))
                    {
                        this.applicantname = Request.Form["applicantname"].Replace("%26", "&");
                    }
                    else
                    {
                        this.applicantname = Request.Form["applicantname"];
                    }
                }

                if (Request.Form["product_title"] != null)
                {
                    if (Request.Form["product_title"].ToString().Contains("%26"))
                    {
                        this.product_title = Request.Form["product_title"].Replace("%26", "&");
                    }
                    else
                    {
                        this.product_title = Request.Form["product_title"];
                    }
                }

                if (
                    (this.item_code != "") &&
                    (this.fee_detailsID != "") &&
                    (this.hwalletID != "") &&
                    (this.transID != "") &&
                    (this.amt != "") &&
                    (this.agent != "") &&
                    (this.agentname != "") &&
                    (this.agentemail != "") &&
                    (this.agentpnumber != "") &&
                    (this.applicantname != "") &&
                    (this.applicant_addy != "") &&
                    (this.applicantemail != "") &&
                    (this.applicantpnumber != "") &&
                    (this.product_title != "")
                    )
                {
                    if (Session["xapplication"] != null)
                    {
                        this.xapplication = Session["xapplication"].ToString();
                        if (this.xapplication != this.transID)
                        {
                            if (Session["Trademark_item"] == null)
                            {
                                Response.Redirect("../a_violation.aspx");
                            }
                            else
                            {
                                Response.Redirect("../a_violation.aspx");
                            }
                        }
                    }
                    else
                    {
                        Session["xapplication"] = this.transID;
                    }
                    Session["item_code"]        = this.item_code;
                    Session["fee_detailsID"]    = this.fee_detailsID;
                    Session["hwalletID"]        = this.hwalletID;
                    Session["vid"]              = this.transID;
                    Session["amt"]              = this.amt;
                    Session["aid"]              = this.agent;
                    Session["agentemail"]       = this.agentemail;
                    Session["agentname"]        = this.agentname;
                    Session["agentpnumber"]     = this.agentpnumber;
                    Session["applicantname"]    = this.applicantname;
                    Session["applicant_addy"]   = this.applicant_addy;
                    Session["applicantemail"]   = this.applicantemail;
                    Session["applicantpnumber"] = this.applicantpnumber;
                    Session["product_title"]    = this.product_title;

                    tm.Stage        s   = this.t.getStageBy_G_ValidationID(this.transID.Trim());
                    Retriever       ret = new  Retriever();
                    XObjs.G_Tm_info m   = new XObjs.G_Tm_info();
                    if ((s.ID != null) && (Convert.ToInt32(s.ID) > 0))
                    {
                        m = ret.getG_Tm_infoByPwalletID(s.ID);

                        if ((m.xid != null) && (Convert.ToInt32(m.xid) > 0))
                        {
                            ws_payx.payx ws_p = new ws_payx.payx();
                            status = ws_p.UpdateHwallet(hwalletID, "Used", s.reg_date, m.tm_title);
                            Response.Redirect("./xxreturn.aspx");
                        }
                        else
                        {
                            int del = t.deleteGPwallet(s.ID);
                            //delete pwallet
                        }
                    }
                }
                else
                {
                    Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]);
                }
            }
        }
예제 #2
0
        protected void SaveAll_Click(object sender, EventArgs e)
        {
            if (logo_desc == "yes")
            {
                if ((fu_logo_pic.HasFile) && (fu_app_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.twalletID    = "0";
                        c_pwall.validationID = vid;
                        c_pwall.applicantID  = agt;
                        c_pwall.log_officer  = item_code;
                        c_pwall.amt          = amt;

                        g_app_info.filing_date    = txt_application_date.Text;
                        g_app_info.application_no = txt_application_no.Text;
                        g_app_info.rtm_number     = txt_rtm_no.Text;
                        g_app_info.item_code      = item_code;
                        g_app_info.log_staff      = "0";
                        g_app_info.reg_no         = "";
                        g_app_info.reg_date       = xreg_date;
                        g_app_info.visible        = xvisible;

                        g_applicant_info.trading_as  = txt_trading_as.Text;
                        g_applicant_info.visible     = xvisible;
                        g_applicant_info.address     = txt_applicant_address.Text;
                        g_applicant_info.xemail      = txt_applicant_email.Text;
                        g_applicant_info.xmobile     = txt_applicant_mobile.Text;
                        g_applicant_info.xname       = txt_applicant_name.Text;
                        g_applicant_info.nationality = select_applicant_nationality.SelectedValue;
                        g_applicant_info.log_staff   = "0";

                        g_tm_info.disclaimer  = txt_discalimer.Text;
                        g_tm_info.tm_class    = select_class_of_trademark.SelectedValue;
                        g_tm_info.tm_desc     = txt_goods_desc.Text;
                        g_tm_info.tm_title    = txt_title_of_trademark.Text;
                        g_tm_info.xtype       = tmType.SelectedValue;
                        g_tm_info.reg_number  = "";
                        g_tm_info.logo_descID = logo_description.SelectedValue;
                        if (g_tm_info.logo_descID != "WORD MARK")
                        {
                            Session["logo_desc"] = "yes";
                        }
                        else
                        {
                            Session["logo_desc"] = "no";
                        }
                        g_tm_info.logo_pic       = "";
                        g_tm_info.auth_doc       = "";
                        g_tm_info.sup_doc1       = "";
                        g_tm_info.app_letter_doc = "";
                        g_tm_info.log_staff      = "0";
                        g_tm_info.reg_date       = xreg_date;
                        g_tm_info.visible        = xvisible;

                        g_agent_info.code        = agt;
                        g_agent_info.xname       = rep_xname.Text;
                        g_agent_info.xpassword   = "";
                        g_agent_info.nationality = txt_rep_nationality.Text;
                        g_agent_info.country     = txt_rep_country.Text;
                        g_agent_info.state       = selectRepState.SelectedValue;
                        g_agent_info.address     = txt_rep_address.Text;
                        g_agent_info.telephone   = txt_rep_telephone.Text;
                        g_agent_info.email       = txt_rep_email.Text;
                        g_agent_info.log_staff   = "0";
                        g_agent_info.xsync       = "0";

                        if ((ass_show > 0) && (select_merger_ass.SelectedValue == "Assignment"))
                        {
                            g_ass_info.assignee_address     = txt_assignee_address.Text;
                            g_ass_info.assignee_name        = txt_assignee_name.Text;
                            g_ass_info.assignor_address     = txt_assignor_address.Text;
                            g_ass_info.assignee_nationality = select_assignee_nationality.SelectedValue;
                            g_ass_info.assignor_name        = txt_assignor_name.Text;
                            g_ass_info.date_of_assignment   = txt_assignment_date.Text;
                            g_ass_info.assignor_nationality = select_assignor_nationality.SelectedValue;
                            g_ass_info.log_staff            = "0";
                            g_ass_info.xvisible             = xvisible;
                            g_ass_info.ass_doc = "";
                        }
                        else if ((merger_show > 0) && (select_merger_ass.SelectedValue == "Merger"))
                        {
                            g_merger_info.original_name    = txt_original_name.Text;
                            g_merger_info.original_address = txt_original_address.Text;
                            g_merger_info.merging_name     = txt_merging_name.Text;
                            g_merger_info.merging_address  = txt_merging_address.Text;
                            g_merger_info.merged_coy_name  = txt_merged_coy_name.Text;
                            g_merger_info.merger_date      = txt_merger_date.Text;
                            g_merger_info.visible          = xvisible;
                            g_merger_info.log_staff        = "0";
                            g_merger_info.merger_doc       = "";
                        }
                        else if (cert_show > 0)
                        {
                            g_cert_info.log_staff   = "0";
                            g_cert_info.reg_date    = xreg_date;
                            g_cert_info.xvisible    = xvisible;
                            g_cert_info.pub_date    = txt_cert_publicationdate.Text;
                            g_cert_info.pub_details = txt_cert_details.Text;
                            g_cert_info.cert_doc    = "";
                            g_cert_info.pub_doc     = "";
                        }
                        else if (change_show > 0)
                        {
                            g_change_info.new_name    = txt_new_applicant_trademark.Text;
                            g_change_info.new_address = txt_new_applicant_address.Text;
                            g_change_info.old_name    = txt_old_applicant_trademark.Text;
                            g_change_info.old_address = txt_old_applicant_address.Text;
                            g_change_info.reg_date    = xreg_date;
                            g_change_info.visible     = xvisible;
                            g_change_info.log_staff   = "0";
                        }
                        else if (renewal_show > 0)
                        {
                            g_renewal_info.prev_renewal_date = txt_renewal_date.Text;
                            g_renewal_info.renewal_type      = select_renewal_type.SelectedValue;
                            g_renewal_info.visible           = xvisible;
                            g_renewal_info.log_staff         = "0";
                            g_renewal_info.reg_date          = xreg_date;
                        }
                        else if (prelim_show > 0)
                        {
                            g_prelim_search_info.xtitle      = txt_prelim_title.Text;
                            g_prelim_search_info.xclass      = select_prelim_class.SelectedValue;
                            g_prelim_search_info.xclass_desc = txt_prelim_desc.Text;
                            g_prelim_search_info.visible     = xvisible;
                            g_prelim_search_info.log_staff   = "0";
                            g_prelim_search_info.reg_date    = xreg_date;
                        }
                        else if (others_show > 0)
                        {
                            g_other_items_info.req_details = txt_details_of_request.Text;
                            g_other_items_info.visible     = xvisible;
                            g_other_items_info.log_staff   = "0";
                            g_other_items_info.reg_date    = xreg_date;
                        }
                        if (Session["hwalletID"] != null)
                        {
                            hwalletID = Session["hwalletID"].ToString();
                        }
                        x_succ = reg.addGenericTx(serverpath, c_pwall, g_app_info, g_applicant_info, g_tm_info, g_agent_info, g_ass_info, g_merger_info, g_cert_info, g_change_info, g_renewal_info,
                                                  g_prelim_search_info, g_other_items_info, fu_logo_pic, fu_sup_doc, fu_app_doc, fu_merger_doc, fu_ass_doc, fu_pub_doc, fu_cert_doc);

                        // if (x_succ > 0) {scope.Complete();}
                        if (x_succ > 0)
                        {
                            ws_payx.payx ws_p = new ws_payx.payx();
                            status = ws_p.UpdateHwallet(hwalletID, "Used", xreg_date, txt_title_of_trademark.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 (x_succ > 0)
                    {
                        base.Response.Redirect("./g_nack.aspx?0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD");
                    }
                }
                else
                {
                    show_imageMsg = "PLEASE UPLOAD A VALID IMAGE AND POWER OF ATTORNEY DOCUMENT!!";
                }
            }
            else
            {
                if (fu_app_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.twalletID    = "0";
                        c_pwall.validationID = vid;
                        c_pwall.applicantID  = agt;
                        c_pwall.log_officer  = item_code;
                        c_pwall.amt          = amt;

                        g_app_info.filing_date    = txt_application_date.Text;
                        g_app_info.application_no = txt_application_no.Text;
                        g_app_info.rtm_number     = txt_rtm_no.Text;
                        g_app_info.item_code      = item_code;
                        g_app_info.log_staff      = "0";
                        g_app_info.reg_no         = "";
                        g_app_info.reg_date       = xreg_date;
                        g_app_info.visible        = xvisible;

                        g_applicant_info.trading_as  = txt_trading_as.Text;
                        g_applicant_info.visible     = xvisible;
                        g_applicant_info.address     = txt_applicant_address.Text;
                        g_applicant_info.xemail      = txt_applicant_email.Text;
                        g_applicant_info.xmobile     = txt_applicant_mobile.Text;
                        g_applicant_info.xname       = txt_applicant_name.Text;
                        g_applicant_info.nationality = select_applicant_nationality.SelectedValue;
                        g_applicant_info.log_staff   = "0";

                        g_tm_info.disclaimer  = txt_discalimer.Text;
                        g_tm_info.tm_class    = select_class_of_trademark.SelectedValue;
                        g_tm_info.tm_desc     = txt_goods_desc.Text;
                        g_tm_info.tm_title    = txt_title_of_trademark.Text;
                        g_tm_info.xtype       = tmType.SelectedValue;
                        g_tm_info.reg_number  = "";
                        g_tm_info.logo_descID = logo_description.SelectedValue;
                        if (g_tm_info.logo_descID != "WORD MARK")
                        {
                            Session["logo_desc"] = "yes";
                        }
                        else
                        {
                            Session["logo_desc"] = "no";
                        }
                        g_tm_info.logo_pic       = "";
                        g_tm_info.auth_doc       = "";
                        g_tm_info.sup_doc1       = "";
                        g_tm_info.app_letter_doc = "";
                        g_tm_info.log_staff      = "0";
                        g_tm_info.reg_date       = xreg_date;
                        g_tm_info.visible        = xvisible;

                        g_agent_info.code        = agt;
                        g_agent_info.xname       = rep_xname.Text;
                        g_agent_info.xpassword   = "";
                        g_agent_info.nationality = txt_rep_nationality.Text;
                        g_agent_info.country     = txt_rep_country.Text;
                        g_agent_info.state       = selectRepState.SelectedValue;
                        g_agent_info.address     = txt_rep_address.Text;
                        g_agent_info.telephone   = txt_rep_telephone.Text;
                        g_agent_info.email       = txt_rep_email.Text;
                        g_agent_info.log_staff   = "0";
                        g_agent_info.xsync       = "0";

                        if ((ass_show > 0) && (select_merger_ass.SelectedValue == "Assignment"))
                        {
                            g_ass_info.assignee_address     = txt_assignee_address.Text;
                            g_ass_info.assignee_name        = txt_assignee_name.Text;
                            g_ass_info.assignor_address     = txt_assignor_address.Text;
                            g_ass_info.assignee_nationality = select_assignee_nationality.SelectedValue;
                            g_ass_info.assignor_name        = txt_assignor_name.Text;
                            g_ass_info.date_of_assignment   = txt_assignment_date.Text;
                            g_ass_info.assignor_nationality = select_assignor_nationality.SelectedValue;
                            g_ass_info.log_staff            = "0";
                            g_ass_info.xvisible             = xvisible;
                            g_ass_info.ass_doc = "";
                        }
                        else if ((merger_show > 0) && (select_merger_ass.SelectedValue == "Merger"))
                        {
                            g_merger_info.original_name    = txt_original_name.Text;
                            g_merger_info.original_address = txt_original_address.Text;
                            g_merger_info.merging_name     = txt_merging_name.Text;
                            g_merger_info.merging_address  = txt_merging_address.Text;
                            g_merger_info.merged_coy_name  = txt_merged_coy_name.Text;
                            g_merger_info.merger_date      = txt_merger_date.Text;
                            g_merger_info.visible          = xvisible;
                            g_merger_info.log_staff        = "0";
                            g_merger_info.merger_doc       = "";
                        }
                        else if (cert_show > 0)
                        {
                            g_cert_info.log_staff   = "0";
                            g_cert_info.reg_date    = xreg_date;
                            g_cert_info.xvisible    = xvisible;
                            g_cert_info.pub_date    = txt_cert_publicationdate.Text;
                            g_cert_info.pub_details = txt_cert_details.Text;
                            g_cert_info.cert_doc    = "";
                            g_cert_info.pub_doc     = "";
                        }
                        else if (change_show > 0)
                        {
                            g_change_info.new_name    = txt_new_applicant_trademark.Text;
                            g_change_info.new_address = txt_new_applicant_address.Text;
                            g_change_info.old_name    = txt_old_applicant_trademark.Text;
                            g_change_info.old_address = txt_old_applicant_address.Text;
                            g_change_info.reg_date    = xreg_date;
                            g_change_info.visible     = xvisible;
                            g_change_info.log_staff   = "0";
                        }
                        else if (renewal_show > 0)
                        {
                            g_renewal_info.prev_renewal_date = txt_renewal_date.Text;
                            g_renewal_info.renewal_type      = select_renewal_type.SelectedValue;
                            g_renewal_info.visible           = xvisible;
                            g_renewal_info.log_staff         = "0";
                            g_renewal_info.reg_date          = xreg_date;
                        }
                        else if (prelim_show > 0)
                        {
                            g_prelim_search_info.xtitle      = txt_prelim_title.Text;
                            g_prelim_search_info.xclass      = select_prelim_class.SelectedValue;
                            g_prelim_search_info.xclass_desc = txt_prelim_desc.Text;
                            g_prelim_search_info.visible     = xvisible;
                            g_prelim_search_info.log_staff   = "0";
                            g_prelim_search_info.reg_date    = xreg_date;
                        }
                        else if (others_show > 0)
                        {
                            g_other_items_info.req_details = txt_details_of_request.Text;
                            g_other_items_info.visible     = xvisible;
                            g_other_items_info.log_staff   = "0";
                            g_other_items_info.reg_date    = xreg_date;
                        }
                        if (Session["hwalletID"] != null)
                        {
                            hwalletID = Session["hwalletID"].ToString();
                        }
                        x_succ = reg.addGenericTx(serverpath, c_pwall, g_app_info, g_applicant_info, g_tm_info, g_agent_info, g_ass_info, g_merger_info, g_cert_info, g_change_info, g_renewal_info,
                                                  g_prelim_search_info, g_other_items_info, fu_logo_pic, fu_sup_doc, fu_app_doc, fu_merger_doc, fu_ass_doc, fu_pub_doc, fu_cert_doc);
                        if (x_succ > 0)
                        {
                            ws_payx.payx ws_p = new ws_payx.payx();
                            status = ws_p.UpdateHwallet(hwalletID, "Used", xreg_date, txt_title_of_trademark.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 (x_succ > 0)
                    {
                        base.Response.Redirect("./g_nack.aspx?0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD");
                    }
                }

                else
                {
                    // enable_RepSave = "1";
                    show_imageMsg = "PLEASE UPLOAD A VALID POWER OF ATTORNEY DOCUMENT!!";
                }
            }
        }