Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.serverpath = base.Server.MapPath("~/");
            fee_list        = ret.getFee_listByCat("tm");

            if (!Page.IsPostBack)
            {
                if ((this.Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"] != null) &&
                    (this.Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"] != "")
                    )
                {
                    vid = Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"];

                    g_pwallet = ret.getG_PwalletByValidationID(vid);
                    if ((g_pwallet.xid != null) && (g_pwallet.xid != ""))
                    {
                        g_tm_info            = ret.getG_Tm_infoByPwalletID(g_pwallet.xid);
                        g_app_info           = ret.getG_App_infoByPwalletID(g_pwallet.xid);
                        g_applicant_info     = ret.getG_Applicant_infoByPwalletID(g_pwallet.xid);
                        g_agent_info         = ret.getGenAgentByPwalletID(g_pwallet.xid);
                        g_ass_info           = ret.getG_Ass_infoByPwalletID(g_pwallet.xid);
                        g_cert_info          = ret.getG_Cert_infoByPwalletID(g_pwallet.xid);
                        g_change_info        = ret.getG_Change_infoByPwalletID(g_pwallet.xid);
                        g_merger_info        = ret.getG_Merger_infoByPwalletID(g_pwallet.xid);
                        g_renewal_info       = ret.getG_Renewal_infoByPwalletID(g_pwallet.xid);
                        g_prelim_search_info = ret.getG_Prelim_search_infoByPwalletID(g_pwallet.xid);
                        g_other_items_info   = ret.getG_Other_items_infoByPwalletID(g_pwallet.xid);

                        if (g_tm_info.logo_pic != "")
                        {
                            tm_img.ImageUrl = "../../../../admin/tm/gf/" + g_tm_info.logo_pic;

                            if (File.Exists(serverpath + "\\admin\\tm\\gf\\" + g_tm_info.logo_pic))
                            {
                                tm_img.Height = new Unit(120, UnitType.Pixel);
                                tm_img.Width  = new Unit(120, UnitType.Pixel);
                                try
                                {
                                    FileStream           st      = new FileStream(serverpath + "\\admin\\tm\\gf\\" + g_tm_info.logo_pic, FileMode.Open, FileAccess.Read);
                                    System.Drawing.Image new_img = System.Drawing.Image.FromStream(st);
                                    string ht = new_img.Height.ToString();
                                    string wt = new_img.Width.ToString();
                                    if ((ht != "") && (wt != "") && (ht != null) && (wt != null))
                                    {
                                        if (Convert.ToInt32(ht) > Convert.ToInt32(wt))
                                        {
                                            tm_img.Height = new Unit(320, UnitType.Pixel);
                                            tm_img.Width  = new Unit(240, UnitType.Pixel);
                                        }
                                        else
                                        {
                                            tm_img.Height = new Unit(240, UnitType.Pixel);
                                            tm_img.Width  = new Unit(320, UnitType.Pixel);
                                        }
                                    }
                                    else
                                    {
                                        // tm_img.Height = new Unit(120, UnitType.Pixel);
                                        // tm_img.Width = new Unit(120, UnitType.Pixel);
                                        tm_img.Visible = false;
                                    }
                                }
                                catch (Exception ex)
                                {
                                    tm_img.Visible = false;
                                }
                            }
                            else
                            {
                                // tm_img.Height = new Unit(120, UnitType.Pixel);
                                // tm_img.Width = new Unit(120, UnitType.Pixel);
                                tm_img.Visible = false;
                            }
                        }

                        foreach (Classes.XObjs.Fee_list item in fee_list)
                        {
                            if (item.item_code == g_pwallet.log_officer)
                            {
                                lbl_type.Text = item.item.ToUpper();
                            }
                        }

                        ShowSection(g_pwallet.log_officer);
                    }
                }
            }
            else
            {
                if (Session["pwalletID"] != null)
                {
                    pwalletID = Session["pwalletID"].ToString();
                }
            }
        }
Ejemplo n.º 2
0
        protected void Save_Click(object sender, EventArgs e)
        {
            if (this.xref.Text != "")
            {
                if (this.xref.Text.Contains("TM/GF/"))
                {
                    this.xref.Text = this.xref.Text.Replace("TM/GF/", "");
                }
                g_pwallet = ret.getG_PwalletByValidationID(xref.Text.Trim());
                if ((g_pwallet.xid != null) && (g_pwallet.xid != ""))
                {
                    this.showt           = 1;
                    Session["g_pwallet"] = g_pwallet;
                    g_tm_info            = ret.getG_Tm_infoByPwalletID(g_pwallet.xid);
                    g_app_info           = ret.getG_App_infoByPwalletID(g_pwallet.xid);
                    g_applicant_info     = ret.getG_Applicant_infoByPwalletID(g_pwallet.xid);
                    g_agent_info         = ret.getGenAgentByPwalletID(g_pwallet.xid);
                    g_ass_info           = ret.getG_Ass_infoByPwalletID(g_pwallet.xid);
                    g_cert_info          = ret.getG_Cert_infoByPwalletID(g_pwallet.xid);
                    g_change_info        = ret.getG_Change_infoByPwalletID(g_pwallet.xid);
                    g_merger_info        = ret.getG_Merger_infoByPwalletID(g_pwallet.xid);
                    g_renewal_info       = ret.getG_Renewal_infoByPwalletID(g_pwallet.xid);
                    g_prelim_search_info = ret.getG_Prelim_search_infoByPwalletID(g_pwallet.xid);
                    g_other_items_info   = ret.getG_Other_items_infoByPwalletID(g_pwallet.xid);

                    if (
                        (Convert.ToInt32(g_pwallet.status) == 1) &&
                        (g_tm_info.xid != null) && (g_app_info.id != null) &&
                        (g_applicant_info.id != null) && (g_agent_info.xid != null) &&
                        (
                            (g_ass_info.xid != null) || (g_cert_info.xid != null) || (g_cert_info.xid != null) ||
                            (g_change_info.xid != null) || (g_merger_info.xid != null) || (g_renewal_info.xid != null) ||
                            (g_prelim_search_info.xid != null) || (g_other_items_info.xid != null)
                        )
                        )
                    {
                        if (t.getLogoDescriptionID(g_tm_info.logo_descID) != "2")
                        {
                            if (g_tm_info.logo_pic != "")
                            {
                                refill = 0;
                                showStatus(g_pwallet);
                            }
                            else
                            {
                                status = "Filing"; data_status = "Uncompleted";
                                refill = 1;
                            }
                        }
                        else
                        {
                            refill = 0;
                            showStatus(g_pwallet);
                        }
                    }
                    else if (
                        (Convert.ToInt32(g_pwallet.status) == 1)
                        &&
                        (
                            (g_tm_info.xid == null) || (g_app_info.id == null) ||
                            (g_applicant_info.id == null) || (g_agent_info.xid == null)
                        )
                        &&
                        (
                            (g_ass_info.xid == null) || (g_cert_info.xid == null) || (g_cert_info.xid == null) ||
                            (g_change_info.xid == null) || (g_merger_info.xid != null) || (g_renewal_info.xid == null) ||
                            (g_prelim_search_info.xid == null) || (g_other_items_info.xid == null)
                        )
                        )
                    {
                        status = "Filing"; data_status = "Uncompleted";
                        refill = 1;
                    }
                    else if (Convert.ToInt32(g_pwallet.status) > 1)
                    {
                        refill = 0;
                        if (g_pwallet.xid != null)
                        {
                            Session["xvid"] = this.xref.Text;
                            g_tm_info       = ret.getG_Tm_infoByPwalletID(g_pwallet.xid);
                            g_agent_info    = ret.getGenAgentByPwalletID(g_pwallet.xid);
                            showStatus(g_pwallet);
                        }
                        else
                        {
                            this.status = "N/A";
                        }
                    }
                }
            }
            else
            {
                base.Response.Write("<script language=JavaScript>alert('PLEASE ENTER A VALID REFERENCE NUMBER')</script>");
            }
        }
Ejemplo n.º 3
0
        protected void SearchApplicant_Click(object sender, EventArgs e)
        {
            if (xref.Text != "")
            {
                if (xref.Text.Contains("OAI/TM/"))
                {
                    xref.Text = xref.Text.Replace("OAI/TM/", "");
                }
                Session["edit_transID"] = xref.Text;
                g_pwallet = ret.getG_PwalletByValidationID(xref.Text.Trim());
                if ((g_pwallet.xid != null) && (g_pwallet.xid != ""))
                {
                    Session["g_pwallet"] = g_pwallet; Session["g_pwalletID"] = g_pwallet.xid;
                    g_tm_info            = ret.getG_Tm_infoByPwalletID(g_pwallet.xid);
                    g_app_info           = ret.getG_App_infoByPwalletID(g_pwallet.xid);
                    g_applicant_info     = ret.getG_Applicant_infoByPwalletID(g_pwallet.xid);
                    g_agent_info         = ret.getGenAgentByPwalletID(g_pwallet.xid);
                    g_ass_info           = ret.getG_Ass_infoByPwalletID(g_pwallet.xid);
                    g_cert_info          = ret.getG_Cert_infoByPwalletID(g_pwallet.xid);
                    g_change_info        = ret.getG_Change_infoByPwalletID(g_pwallet.xid);
                    g_merger_info        = ret.getG_Merger_infoByPwalletID(g_pwallet.xid);
                    g_renewal_info       = ret.getG_Renewal_infoByPwalletID(g_pwallet.xid);
                    g_prelim_search_info = ret.getG_Prelim_search_infoByPwalletID(g_pwallet.xid);
                    g_other_items_info   = ret.getG_Other_items_infoByPwalletID(g_pwallet.xid);


                    foreach (Classes.XObjs.Fee_list item in fee_list)
                    {
                        if (item.item_code == g_pwallet.log_officer)
                        {
                            lbl_type.Text = item.item.ToUpper();
                        }
                    }

                    if (g_app_info.id != null)
                    {
                        Session["g_app_info"]     = g_app_info;
                        txt_rtm_no.Text           = g_app_info.rtm_number;
                        txt_application_no.Text   = g_app_info.application_no;
                        txt_application_date.Text = g_app_info.filing_date;
                    }

                    if (g_applicant_info.id != null)
                    {
                        Session["g_applicant_info"] = g_applicant_info;
                        txt_applicant_name.Text     = g_applicant_info.xname;
                        txt_applicant_address.Text  = g_applicant_info.address;
                        txt_applicant_email.Text    = g_applicant_info.xemail;
                        txt_applicant_mobile.Text   = g_applicant_info.xmobile;
                        txt_trading_as.Text         = g_applicant_info.trading_as;
                        select_applicant_nationality.SelectedIndex = Convert.ToInt32(t.getCountryIDByName(g_applicant_info.nationality)) - 1;
                    }

                    if (g_tm_info.xid != null)
                    {
                        Session["g_tm_info"]                    = g_tm_info;
                        txt_title_of_trademark.Text             = g_tm_info.tm_title;
                        txt_goods_desc.Text                     = g_tm_info.tm_desc;
                        txt_discalimer.Text                     = g_tm_info.disclaimer;
                        logo_description.SelectedIndex          = Convert.ToInt32(t.getLogoDescriptionID(g_tm_info.logo_descID)) - 1;
                        select_class_of_trademark.SelectedIndex = Convert.ToInt32(g_tm_info.tm_class) - 1;
                        tmType.SelectedIndex                    = Convert.ToInt32(t.getTmTypeID(g_tm_info.xtype)) - 1;
                    }
                    if (g_agent_info.xid != null)
                    {
                        Session["g_agent_info"]      = g_agent_info;
                        rep_xname.Text               = g_agent_info.xname;
                        rep_code.Text                = g_agent_info.code;
                        txt_rep_address.Text         = g_agent_info.address;
                        txt_rep_email.Text           = g_applicant_info.xemail;  // g_agent_info.email;
                        txt_rep_telephone.Text       = g_applicant_info.xmobile; // g_agent_info.telephone;
                        selectRepState.SelectedIndex = Convert.ToInt32(ret.getStateIDByName(g_agent_info.state)) - 1;
                    }

                    if (g_cert_info.xid != null)
                    {
                        Session["g_cert_info"]        = g_cert_info;
                        txt_cert_publicationdate.Text = g_cert_info.pub_date;
                        txt_cert_details.Text         = g_cert_info.pub_details;
                    }
                    if (g_ass_info.xid != null)
                    {
                        Session["g_ass_info"]                     = g_ass_info;
                        select_merger_ass.SelectedIndex           = 0;
                        txt_assignee_name.Text                    = g_ass_info.assignee_name;
                        txt_assignee_address.Text                 = g_ass_info.assignee_address;
                        txt_assignor_name.Text                    = g_ass_info.assignor_name;
                        txt_assignor_address.Text                 = g_ass_info.assignor_address;
                        txt_assignment_date.Text                  = g_ass_info.date_of_assignment;
                        select_assignee_nationality.SelectedIndex = Convert.ToInt32(g_ass_info.assignee_nationality) - 1;
                        select_assignor_nationality.SelectedIndex = Convert.ToInt32(g_ass_info.assignor_nationality) - 1;
                    }
                    if (g_merger_info.xid != null)
                    {
                        Session["g_merger_info"]        = g_merger_info;
                        select_merger_ass.SelectedIndex = 1;
                        txt_original_name.Text          = g_merger_info.original_name;
                        txt_original_address.Text       = g_merger_info.original_address;
                        txt_merging_name.Text           = g_merger_info.merging_name;
                        txt_merging_address.Text        = g_merger_info.merging_address;
                        txt_merged_coy_name.Text        = g_merger_info.merged_coy_name;
                        txt_merger_date.Text            = g_merger_info.merger_date;
                    }

                    if (g_change_info.xid != null)
                    {
                        Session["g_change_info"]         = g_change_info;
                        txt_old_applicant_trademark.Text = g_change_info.old_name;
                        txt_old_applicant_address.Text   = g_change_info.old_address;
                        txt_new_applicant_trademark.Text = g_change_info.new_name;
                        txt_new_applicant_address.Text   = g_change_info.new_address;
                    }

                    if (g_prelim_search_info.xid != null)
                    {
                        Session["g_prelim_search_info"]   = g_prelim_search_info;
                        txt_prelim_title.Text             = g_prelim_search_info.xtitle;
                        select_prelim_class.SelectedIndex = Convert.ToInt32(g_prelim_search_info.xclass) - 1;
                        txt_prelim_desc.Text = g_prelim_search_info.xclass_desc;
                    }

                    if (g_renewal_info.xid != null)
                    {
                        Session["g_renewal_info"] = g_renewal_info;
                        txt_renewal_date.Text     = g_renewal_info.prev_renewal_date;
                        try
                        {
                            select_renewal_type.SelectedIndex = Convert.ToInt32(g_renewal_info.renewal_type) - 1;
                        }
                        catch (Exception ee)
                        {
                        }
                    }
                    if (g_other_items_info.xid != null)
                    {
                        Session["g_other_items_info"] = g_other_items_info;
                        txt_details_of_request.Text   = g_other_items_info.req_details;
                    }

                    ShowSection(g_pwallet.log_officer);
                    showt = 1; Session["showt"] = showt;
                }
                else
                {
                    Response.Write("<script language=JavaScript>alert('PLEASE ENTER A VALID REFERENCE NUMBER')</script>");
                }
            }
            else
            {
                Response.Write("<script language=JavaScript>alert('PLEASE ENTER A VALID REFERENCE NUMBER')</script>");
            }
        }
        public void vupdate()
        {
            if ((this.Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"] != null) &&
                (this.Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"] != "")
                )
            {
                vid = Request.QueryString["0001234445XXX43943OPFDSMZXUHSJFDSKFGKSDKGFSDKFSKFDKFD"];

                g_pwallet = ret.getG_PwalletByValidationID(vid);
                if ((g_pwallet.xid != null) && (g_pwallet.xid != ""))
                {
                    g_tm_info = ret.getG_Tm_infoByPwalletID(g_pwallet.xid);

                    g_app_info = ret.getG_App_infoByPwalletID(g_pwallet.xid);

                    g_applicant_info     = ret.getG_Applicant_infoByPwalletID(g_pwallet.xid);
                    g_agent_info         = ret.getGenAgentByPwalletID(g_pwallet.xid);
                    g_ass_info           = ret.getG_Ass_infoByPwalletID(g_pwallet.xid);
                    g_cert_info          = ret.getG_Cert_infoByPwalletID(g_pwallet.xid);
                    g_change_info        = ret.getG_Change_infoByPwalletID(g_pwallet.xid);
                    g_merger_info        = ret.getG_Merger_infoByPwalletID(g_pwallet.xid);
                    g_renewal_info       = ret.getG_Renewal_infoByPwalletID(g_pwallet.xid);
                    g_prelim_search_info = ret.getG_Prelim_search_infoByPwalletID(g_pwallet.xid);
                    g_other_items_info   = ret.getG_Other_items_infoByPwalletID(g_pwallet.xid);


                    this.lt_tm_office = this.z.getG_TmOfficeDetailsByID(g_pwallet.xid);
                    for (int i = 0; i < this.lt_tm_office.Count; i++)
                    {
                        this.xcomments          = this.xcomments + "<tr>";
                        this.xcomments          = this.xcomments + "<td align=\"center\" colspan=\"2\">";
                        this.xcomments          = this.xcomments + "<strong>" + this.lt_tm_office[i].xcomment.ToUpper() + "</strong><br />";
                        this.lt_x_admin_details = this.z.getTmAdminDetailsByID(this.lt_tm_office[i].xofficer);
                        string xcomments = this.xcomments;
                        this.xcomments = xcomments + "COMMENT BY: <strong>" + this.lt_x_admin_details.xname.ToUpper() + "( " + this.z.getRoleNameByID(this.lt_x_admin_details.xroleID).ToUpper() + " UNIT)</strong><br />   Date: <strong>" + this.lt_tm_office[i].reg_date.ToUpper() + "</strong>";
                        this.xcomments = this.xcomments + "</td>";
                        this.xcomments = this.xcomments + "</tr>";
                        if (lt_tm_office[i].xdoc1 != "")
                        {
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td colspan=\"2\" align=\"center\">";
                            this.xcomments = this.xcomments + "View Document 1: <a href=" + lt_tm_office[i].xdoc1 + " target='_blank'>View</a>";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                        }

                        if (lt_tm_office[i].xdoc2 != "")
                        {
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td colspan=\"2\" align=\"center\">";
                            this.xcomments = this.xcomments + "View Document 2: <a href=" + lt_tm_office[i].xdoc2 + " target='_blank'>View</a>";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                        }

                        if (lt_tm_office[i].xdoc3 != "")
                        {
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td colspan=\"2\" align=\"center\">";
                            this.xcomments = this.xcomments + "View Document 3: <a href=" + lt_tm_office[i].xdoc3 + " target='_blank'>View</a>";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                        }
                        this.xcomments = this.xcomments + "<tr>";
                        this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">";
                        this.xcomments = this.xcomments + "&nbsp;";
                        this.xcomments = this.xcomments + "</td>";
                        this.xcomments = this.xcomments + "</tr>";
                        if (this.lt_tm_office[i].admin_status == "3")
                        {
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">";
                            this.xcomments = this.xcomments + "--- SUPPORTING SEARCH DOCUMENTS ---";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td align=\"right\">";
                            this.xcomments = this.xcomments + "Attached Document:";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "<td>";
                            //if ((this.swallet.search_str != "") && (this.swallet.search_str != null))
                            //{
                            //    this.xcomments = this.xcomments + "<a href=view_searcho.aspx?x=" + this.pID + " target='_blank'>View</a>";
                            //}
                            //else
                            //{
                            //    this.xcomments = this.xcomments + "NONE";
                            //}
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">";
                            this.xcomments = this.xcomments + "&nbsp;";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                        }

                        //////////
                        if (this.lt_tm_office[i].admin_status == "33")
                        {
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">";
                            this.xcomments = this.xcomments + "--- SUPPORTING SEARCH 2 DOCUMENTS ---";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td align=\"right\">";
                            this.xcomments = this.xcomments + "Attached Document:";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "<td>";
                            //if ((this.swallet2.search_str != "") && (this.swallet2.search_str != null))
                            //{
                            //    this.xcomments = this.xcomments + "<a href=view_searcho2.aspx?x=" + this.pID + " target='_blank'>View</a>";
                            //}
                            //else
                            //{
                            //    this.xcomments = this.xcomments + "NONE";
                            //}

                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";

                            this.xcomments = this.xcomments + "<tr>";
                            this.xcomments = this.xcomments + "<td class=\"coltbbg\" colspan=\"2\" align=\"center\">";
                            this.xcomments = this.xcomments + "&nbsp;";
                            this.xcomments = this.xcomments + "</td>";
                            this.xcomments = this.xcomments + "</tr>";
                        } //////////
                    }

                    //if (g_tm_info.logo_pic != "")
                    //{
                    //    tm_img.ImageUrl = "../admin/tm/gf/" + g_tm_info.logo_pic;

                    //    if (File.Exists(serverpath + "\\admin\\tm\\gf\\" + g_tm_info.logo_pic))
                    //    {
                    //        tm_img.Height = new Unit(120, UnitType.Pixel);
                    //        tm_img.Width = new Unit(120, UnitType.Pixel);
                    //        try
                    //        {
                    //            FileStream st = new FileStream(serverpath + "\\admin\\tm\\gf\\" + g_tm_info.logo_pic, FileMode.Open, FileAccess.Read);
                    //            System.Drawing.Image new_img = System.Drawing.Image.FromStream(st);
                    //            string ht = new_img.Height.ToString();
                    //            string wt = new_img.Width.ToString();
                    //            if ((ht != "") && (wt != "") && (ht != null) && (wt != null))
                    //            {

                    //                if (Convert.ToInt32(ht) > Convert.ToInt32(wt))
                    //                {
                    //                    tm_img.Height = new Unit(320, UnitType.Pixel);
                    //                    tm_img.Width = new Unit(240, UnitType.Pixel);
                    //                }
                    //                else
                    //                {
                    //                    tm_img.Height = new Unit(240, UnitType.Pixel);
                    //                    tm_img.Width = new Unit(320, UnitType.Pixel);
                    //                }
                    //            }
                    //            else
                    //            {
                    //                // tm_img.Height = new Unit(120, UnitType.Pixel);
                    //                // tm_img.Width = new Unit(120, UnitType.Pixel);
                    //                tm_img.Visible = false;
                    //            }
                    //        }
                    //        catch (Exception ex)
                    //        {
                    //            tm_img.Visible = false;
                    //        }
                    //    }
                    //    else
                    //    {
                    //        // tm_img.Height = new Unit(120, UnitType.Pixel);
                    //        // tm_img.Width = new Unit(120, UnitType.Pixel);
                    //        tm_img.Visible = false;
                    //    }
                    //}

                    //foreach (Classes.XObjs.Fee_list item in fee_list)
                    //{
                    //    if (item.item_code == g_pwallet.log_officer)
                    //    {
                    //        lbl_type.Text = item.item.ToUpper();
                    //    }
                    //}

                    //ShowSection(g_pwallet.log_officer);
                }
            }
        }
Ejemplo n.º 5
0
        protected void SaveEdit_Click(object sender, EventArgs e)
        {
            if (Session["item_code"] != null)
            {
                item_code = Session["item_code"].ToString();
            }
            if (Session["g_pwallet"] != null)
            {
                g_pwallet = (Classes.XObjs.G_Pwallet)Session["g_pwallet"];
            }
            if (Session["g_app_info"] != null)
            {
                g_app_info = (Classes.XObjs.G_App_info)Session["g_app_info"];
            }
            if (Session["g_applicant_info"] != null)
            {
                g_applicant_info = (Classes.XObjs.G_Applicant_info)Session["g_applicant_info"];
            }
            if (Session["g_tm_info"] != null)
            {
                g_tm_info = (Classes.XObjs.G_Tm_info)Session["g_tm_info"];
            }
            if (Session["g_agent_info"] != null)
            {
                g_agent_info = (Classes.XObjs.Gen_Agent_info)Session["g_agent_info"];
            }
            if (Session["g_ass_info"] != null)
            {
                g_ass_info = (Classes.XObjs.G_Ass_info)Session["g_ass_info"];
            }
            if (Session["g_cert_info"] != null)
            {
                g_cert_info = (Classes.XObjs.G_Cert_info)Session["g_cert_info"];
            }
            if (Session["g_change_info"] != null)
            {
                g_change_info = (Classes.XObjs.G_Change_info)Session["g_change_info"];
            }
            if (Session["g_merger_info"] != null)
            {
                g_merger_info = (Classes.XObjs.G_Merger_info)Session["g_merger_info"];
            }
            if (Session["g_renewal_info"] != null)
            {
                g_renewal_info = (Classes.XObjs.G_Renewal_info)Session["g_renewal_info"];
            }
            if (Session["g_prelim_search_info"] != null)
            {
                g_prelim_search_info = (Classes.XObjs.G_Prelim_search_info)Session["g_prelim_search_info"];
            }
            if (Session["g_other_items_info"] != null)
            {
                g_other_items_info = (Classes.XObjs.G_Other_items_info)Session["g_other_items_info"];
            }

            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.reg_no         = "";
            g_app_info.log_staff      = g_pwallet.xid;

            if (txt_new_date.Text != "")
            {
                g_pwallet.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_pwallet.reg_date == null) || (g_pwallet.reg_date == ""))
                {
                    g_pwallet.reg_date = xreg_date;
                }
            }
            if (g_app_info.id != null)
            {
                reg.update_G_Pwallet(g_pwallet);
            }


            if (txt_new_date.Text != "")
            {
                g_app_info.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_app_info.reg_date == null) || (g_app_info.reg_date == ""))
                {
                    g_app_info.reg_date = xreg_date;
                }
            }
            g_app_info.visible = xvisible;



            if (g_app_info.id != null)
            {
                app_succ = reg.update_App_info(g_app_info); Session["app_succID"] = app_succ;
            }
            else
            {
                app_succ = reg.addG_App_info(g_app_info); Session["app_succID"] = app_succ;
            }

            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   = g_pwallet.xid;

            if (g_applicant_info.id != null)
            {
                applicant_succ = reg.update_Applicant_info(g_applicant_info); Session["applicant_succID"] = applicant_succ;
            }
            else
            {
                applicant_succ = reg.addG_Applicant_info(g_applicant_info); Session["applicant_succID"] = applicant_succ;
            }

            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;
            if ((g_tm_info.reg_number == null) || (g_tm_info.reg_number == ""))
            {
                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";
            }
            if ((g_tm_info.logo_pic == null) || (g_tm_info.logo_pic == ""))
            {
                g_tm_info.logo_pic = "";
            }
            if ((g_tm_info.auth_doc == null) || (g_tm_info.auth_doc == ""))
            {
                g_tm_info.auth_doc = "";
            }
            if ((g_tm_info.sup_doc1 == null) || (g_tm_info.sup_doc1 == ""))
            {
                g_tm_info.sup_doc1 = "";
            }
            if ((g_tm_info.app_letter_doc == null) || (g_tm_info.app_letter_doc == ""))
            {
                g_tm_info.app_letter_doc = "";
            }
            g_tm_info.log_staff = g_pwallet.xid;
            if (txt_new_date.Text != "")
            {
                g_tm_info.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_tm_info.reg_date == null) || (g_tm_info.reg_date == ""))
                {
                    g_tm_info.reg_date = xreg_date;
                }
            }
            g_tm_info.visible = xvisible;

            if (g_tm_info.xid != null)
            {
                Session["new_miID"] = g_tm_info.xid;
                tm_info_succ        = reg.update_Tm_info(g_tm_info);
            }
            else
            {
                tm_info_succ = reg.addG_Tm_info(g_tm_info);  Session["new_miID"] = tm_info_succ;
            }

            g_agent_info.code        = rep_code.Text;
            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   = g_pwallet.xid;
            g_agent_info.xsync       = "0";

            if (g_agent_info.xid != null)
            {
                agent_info_succ = reg.update_Gen_Agent_info(g_agent_info); Session["agent_info_succID"] = agent_info_succ;
            }
            else
            {
                agent_info_succ = reg.addGen_Agent_info(g_agent_info); Session["agent_info_succID"] = agent_info_succ;
            }

            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            = g_pwallet.xid;
            g_ass_info.xvisible             = xvisible;
            if ((g_ass_info.ass_doc == null) || (g_ass_info.ass_doc == ""))
            {
                g_ass_info.ass_doc = "";
            }

            if (g_ass_info.xid != null)
            {
                x_succ = reg.update_G_Ass_info(g_ass_info); Session["assID"] = x_succ; Session["app_type"] = "ass";
            }
            else
            {
                if (app_type == "ass/merger")
                {
                    if ((ass_show > 0) && (select_merger_ass.SelectedValue == "Assignment"))
                    {
                        x_succ = reg.addG_Ass_info(g_ass_info); Session["assID"] = x_succ; Session["app_type"] = "ass";
                    }
                }
            }

            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        = g_pwallet.xid;
            if ((g_merger_info.merger_doc == null) || (g_merger_info.merger_doc == ""))
            {
                g_merger_info.merger_doc = "";
            }

            if (g_merger_info.xid != null)
            {
                x_succ = reg.update_G_Merger_info(g_merger_info); Session["mergerID"] = x_succ; Session["app_type"] = "merger";
            }
            else
            {
                if (app_type == "ass/merger")
                {
                    if ((merger_show > 0) && (select_merger_ass.SelectedValue == "Merger"))
                    {
                        x_succ = reg.addG_Merger_info(g_merger_info); Session["mergerID"] = x_succ; Session["app_type"] = "merger";
                    }
                }
            }

            g_cert_info.log_staff = g_pwallet.xid;
            if (txt_new_date.Text != "")
            {
                g_cert_info.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_cert_info.reg_date == null) || (g_cert_info.reg_date == ""))
                {
                    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;
            if ((g_cert_info.cert_doc == null) || (g_cert_info.cert_doc == ""))
            {
                g_cert_info.cert_doc = "";
            }
            if ((g_cert_info.pub_doc == null) || (g_cert_info.pub_doc == ""))
            {
                g_cert_info.pub_doc = "";
            }

            if (g_cert_info.xid != null)
            {
                x_succ = reg.update_G_Cert_info(g_cert_info); Session["certID"] = x_succ; Session["app_type"] = "cert";
            }
            else
            {
                if (app_type == "cert")
                {
                    x_succ = reg.addG_Cert_info(g_cert_info); Session["certID"] = x_succ; Session["app_type"] = "cert";
                }
            }

            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;
            if (txt_new_date.Text != "")
            {
                g_change_info.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_change_info.reg_date == null) || (g_change_info.reg_date == ""))
                {
                    g_change_info.reg_date = xreg_date;
                }
            }
            g_change_info.visible   = xvisible;
            g_change_info.log_staff = g_pwallet.xid;

            if (g_change_info.xid != null)
            {
                x_succ = reg.update_G_Change_info(g_change_info); Session["app_type"] = "change";
            }
            else
            {
                if (app_type == "change")
                {
                    x_succ = reg.addG_Change_info(g_change_info); Session["app_type"] = "change";
                }
            }
            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         = g_pwallet.xid;
            if (txt_new_date.Text != "")
            {
                g_renewal_info.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_renewal_info.reg_date == null) || (g_renewal_info.reg_date == ""))
                {
                    g_renewal_info.reg_date = xreg_date;
                }
            }

            if (g_renewal_info.xid != null)
            {
                x_succ = reg.update_G_Renewal_info(g_renewal_info); Session["app_type"] = "renewal";
            }
            else
            {
                if (app_type == "renewal")
                {
                    x_succ = reg.addG_Renewal_info(g_renewal_info); Session["app_type"] = "renewal";
                }
            }

            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   = g_pwallet.xid;
            if (txt_new_date.Text != "")
            {
                g_prelim_search_info.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_prelim_search_info.reg_date == null) || (g_prelim_search_info.reg_date == ""))
                {
                    g_prelim_search_info.reg_date = xreg_date;
                }
            }

            if (g_prelim_search_info.xid != null)
            {
                x_succ = reg.update_G_Prelim_search_info(g_prelim_search_info); Session["app_type"] = "prelim";
            }
            else
            {
                if (app_type == "prelim")
                {
                    x_succ = reg.addG_Prelim_search_info(g_prelim_search_info); Session["app_type"] = "prelim";
                }
            }

            g_other_items_info.req_details = txt_details_of_request.Text;
            g_other_items_info.visible     = xvisible;
            g_other_items_info.log_staff   = g_pwallet.xid;
            if (txt_new_date.Text != "")
            {
                g_other_items_info.reg_date = txt_new_date.Text;
            }
            else
            {
                if ((g_other_items_info.reg_date == null) || (g_other_items_info.reg_date == ""))
                {
                    g_other_items_info.reg_date = xreg_date;
                }
            }

            if (g_other_items_info.xid != null)
            {
                x_succ = reg.update_G_Other_items_info(g_other_items_info); Session["app_type"] = "others";
            }
            else
            {
                if (app_type == "others")
                {
                    x_succ = reg.addG_Other_items_info(g_other_items_info); Session["app_type"] = "others";
                }
            }
            if (x_succ > 0)
            {
                //Session["x_succ"] = null;
                Response.Redirect("./edit_forms_docs.aspx");
            }
        }