Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            show_image_section = "1";   SaveExit.Visible = false;
            serverpath         = Server.MapPath("~/");
            if (Session["agt"] != null)
            {
                agt        = Session["agt"].ToString();
                xcode.Text = Session["agt"].ToString();
            }
            if (Session["vid"] != null)
            {
                xvid.Value = Session["vid"].ToString();
            }
            else
            {
                Response.Redirect("http://www.iponigeria.com/userarea/dashboard");
            }
            if (Session["amt"] != null)
            {
                xamt.Value = Session["amt"].ToString();
            }
            if (Session["gt"] != null)
            {
                xgt.Value = Session["gt"].ToString();
            }
            if (Session["pc"] != null)
            {
                xpc.Value = Session["pc"].ToString();
            }
            if (Session["pwalletID"] != null)
            {
                xpwalletID.Value = Session["pwalletID"].ToString();
            }
            if (Session["agentemail"] != null)
            {
                rep_xemail.Text = Session["agentemail"].ToString();
            }
            if (Session["agentname"] != null)
            {
                rep_xname.Text = Session["agentname"].ToString();
            }
            if (Session["agentpnumber"] != null)
            {
                rep_xtelephone.Text = Session["agentpnumber"].ToString();
            }
            if (Session["applicantname"] != null)
            {
                xname.Text = Session["applicantname"].ToString();
            }
            if (Session["applicantemail"] != null)
            {
                xemail.Text = Session["applicantemail"].ToString();
            }
            if (Session["applicantpnumber"] != null)
            {
                xtelephone.Text = Session["applicantpnumber"].ToString();
            }
            if (Session["product_title"] != null)
            {
                title_of_product.Text = Session["product_title"].ToString();
            }
            if (Session["log_staffID"] != null)
            {
                log_staffID = Session["log_staffID"].ToString();
            }
            if (IsPostBack)
            {
                lt_state = t.getState(residence.SelectedValue);
                if (lt_state.Count == 0)
                {
                    state_row     = "1";
                    state_visible = "1";
                }
                lt_rep_state = t.getState(rep_residence.SelectedValue);
                if (lt_rep_state.Count == 0)
                {
                    rep_state_row = "1";
                    state_visible = "1";
                }
                national_class_desc.Text = t.getNationalClassDesc((national_class.SelectedIndex + 1).ToString());
                if (Session["agt"] != null)
                {
                    xcode.Text = Session["agt"].ToString();
                }
                if (Session["vid"] != null)
                {
                    xvid.Value = Session["vid"].ToString();
                }
                if (Session["amt"] != null)
                {
                    xamt.Value = Session["amt"].ToString();
                }
                if (Session["gt"] != null)
                {
                    xgt.Value = Session["gt"].ToString();
                }
                if (Session["pc"] != null)
                {
                    xpc.Value = Session["pc"].ToString();
                }
                if (Session["pwalletID"] != null)
                {
                    xpwalletID.Value = Session["pwalletID"].ToString();
                }
                if (Session["agentemail"] != null)
                {
                    rep_xemail.Text = Session["agentemail"].ToString();
                }
                if (Session["agentname"] != null)
                {
                    rep_xname.Text = Session["agentname"].ToString();
                }
                if (Session["agentpnumber"] != null)
                {
                    rep_xtelephone.Text = Session["agentpnumber"].ToString();
                }
                if (Session["applicantname"] != null)
                {
                    xname.Text = Session["applicantname"].ToString();
                }
                if (Session["applicantemail"] != null)
                {
                    xemail.Text = Session["applicantemail"].ToString();
                }
                if (Session["applicantpnumber"] != null)
                {
                    xtelephone.Text = Session["applicantpnumber"].ToString();
                }
                if (Session["product_title"] != null)
                {
                    title_of_product.Text = Session["product_title"].ToString();
                }
            }
            else
            {
                nationality.SelectedIndex     = 0x9f;
                rep_nationality.SelectedIndex = 0x9f;
                residence.SelectedIndex       = 0x9f;
                rep_residence.SelectedIndex   = 0x9f;
                lt_nclass = t.getJNationalClasses();
                national_class_desc.Text = lt_nclass[0].xdescription.ToString();
            }
            transID         = Session["vid"].ToString();
            Session["xref"] = Convert.ToInt32(Session["xref"]) + 1;
            bool flag1 = Session["xref"].ToString() != "1";

            if ((Session["xapplication"] != null) && (Session["xapplication"].ToString() != ""))
            {
                bool flag2 = transID != Session["xapplication"].ToString();
            }
            xdesc_national_class = "1";
            if (rbDisclaimer.SelectedValue == "YES")
            {
                disclaimer_text = "1";
            }
            else
            {
                disclaimer_text = "0";
            }
            if (logo_description.SelectedValue != "2")
            {
                logo_text = "1";
            }
            else
            {
                logo_text = "";
            }
            Session["logo_description"] = logo_description.SelectedValue;
            if ((Session["logo_pic"] == null) && logo_pic.HasFile)
            {
                Session["logo_pic"] = logo_pic;
                lblLogoPic.Text     = logo_pic.FileName;
            }
            else if ((Session["logo_pic"] != null) && !logo_pic.HasFile)
            {
                logo_pic        = (FileUpload)Session["logo_pic"];
                lblLogoPic.Text = logo_pic.FileName;
            }
            else if (logo_pic.HasFile)
            {
                Session["logo_pic"] = logo_pic;
                lblLogoPic.Text     = logo_pic.FileName;
            }
            if ((Session["auth_doc"] == null) && auth_doc.HasFile)
            {
                Session["auth_doc"] = auth_doc;
                lblPoa.Text         = auth_doc.FileName;
            }
            else if ((Session["auth_doc"] != null) && !auth_doc.HasFile)
            {
                auth_doc    = (FileUpload)Session["auth_doc"];
                lblPoa.Text = auth_doc.FileName;
            }
            else if (auth_doc.HasFile)
            {
                Session["auth_doc"] = auth_doc;
                lblPoa.Text         = auth_doc.FileName;
            }
            if ((Session["sup_doc1"] == null) && sup_doc1.HasFile)
            {
                Session["sup_doc1"] = sup_doc1;
                lblDoc1.Text        = sup_doc1.FileName;
            }
            else if ((Session["sup_doc1"] != null) && !sup_doc1.HasFile)
            {
                sup_doc1     = (FileUpload)Session["sup_doc1"];
                lblDoc1.Text = sup_doc1.FileName;
            }
            else if (sup_doc1.HasFile)
            {
                Session["sup_doc1"] = sup_doc1;
                lblDoc1.Text        = sup_doc1.FileName;
            }
            if ((Session["sup_doc2"] == null) && sup_doc2.HasFile)
            {
                Session["sup_doc2"] = sup_doc2;
                lblDoc2.Text        = sup_doc2.FileName;
            }
            else if ((Session["sup_doc2"] != null) && !sup_doc2.HasFile)
            {
                sup_doc2     = (FileUpload)Session["sup_doc2"];
                lblDoc2.Text = sup_doc2.FileName;
            }
            else if (sup_doc2.HasFile)
            {
                Session["sup_doc2"] = sup_doc2;
                lblDoc2.Text        = sup_doc2.FileName;
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            serverpath = base.Server.MapPath("~/");
            if (Session["vid"] != null)
            {
                xvid.Value = reg.DecodeChar(Session["vid"].ToString()); transID = reg.DecodeChar(Session["vid"].ToString());
            }
            else
            {
                base.Response.Redirect(ConfigurationManager.AppSettings["ipo_profile_page"]);
            }
            if (Session["aid"] != null)
            {
                xaid.Value = reg.DecodeChar(Session["aid"].ToString());
            }
            if (Session["amt"] != null)
            {
                xamt.Value = reg.DecodeChar(Session["amt"].ToString());
            }
            if (Session["xgt"] != null)
            {
                xgt.Value = reg.DecodeChar(Session["xgt"].ToString());
            }
            if (Session["item_code"] != null)
            {
                xpc.Value = reg.DecodeChar(Session["item_code"].ToString());
            }
            if (Session["pwalletID"] != null)
            {
                xpwalletID.Value = reg.DecodeChar(Session["pwalletID"].ToString());
            }
            if (Session["hwalletID"] != null)
            {
                hwalletID = reg.DecodeChar(Session["hwalletID"].ToString());
            }
            if (Session["agentemail"] != null)
            {
                agent_email.Value = reg.DecodeChar(Session["agentemail"].ToString());
            }
            if (Session["agentname"] != null)
            {
                xcname.Value = reg.DecodeChar(Session["agentname"].ToString());
            }
            if (Session["agentpnumber"] != null)
            {
                agent_no.Value = reg.DecodeChar(Session["agentpnumber"].ToString());
            }
            if (Session["applicantname"] != null)
            {
                xapplicantname.Value = reg.DecodeChar(Session["applicantname"].ToString());
            }
            if (Session["applicant_addy"] != null)
            {
                xapplicant_addy.Value = reg.DecodeChar(Session["applicant_addy"].ToString());
            }
            if (Session["applicantemail"] != null)
            {
                xapplicant_email.Value = reg.DecodeChar(Session["applicantemail"].ToString());
            }
            if (Session["applicantpnumber"] != null)
            {
                xapplicant_no.Value = reg.DecodeChar(Session["applicantpnumber"].ToString());
            }
            if (Session["product_title"] != null)
            {
                xproduct_title.Value = reg.DecodeChar(Session["product_title"].ToString());
            }
            if (Session["log_staffID"] != null)
            {
                log_staffID = reg.DecodeChar(Session["log_staffID"].ToString());
            }
            title_of_product.Text    = xproduct_title.Value;
            xname.Text               = xapplicantname.Value;
            xaddress.Text            = xapplicant_addy.Value;
            xtelephone.Text          = xapplicant_no.Value;
            xemail.Text              = xapplicant_email.Value;
            xcode.Text               = xaid.Value;
            rep_xname.Text           = xcname.Value;
            rep_xemail.Text          = agent_email.Value;
            rep_xtelephone.Text      = agent_no.Value;
            national_class_desc.Text = t.getNationalClassDesc((national_class.SelectedIndex + 1).ToString());
            xdesc_national_class     = "1";
            if (rbDisclaimer.SelectedValue == "YES")
            {
                disclaimer_text = "1";
            }
            else
            {
                disclaimer_text = "0";
            }
            Session["logo_description"] = logo_description.SelectedValue;
            if (base.IsPostBack)
            {
                lt_state = t.getState(residence.SelectedValue);
                if (lt_state.Count == 0)
                {
                    state_row     = "1";
                    state_visible = "1";
                }
                lt_rep_state = t.getState(rep_residence.SelectedValue);
                if (lt_rep_state.Count == 0)
                {
                    rep_state_row = "1";
                    state_visible = "1";
                }
            }
            else
            {
                nationality.SelectedIndex     = 0x9f;
                rep_nationality.SelectedIndex = 0x9f;
                residence.SelectedIndex       = 0x9f;
                rep_residence.SelectedIndex   = 0x9f;
                national_class_desc.Text      = t.getNationalClassDesc("1");
            }
            Session["xref"] = Convert.ToInt32(Session["xref"]) + 1;
            bool flag1 = Session["xref"].ToString() != "1";

            if ((Session["xapplication"] != null) && (Session["xapplication"].ToString() != ""))
            {
                bool flag2 = transID != Session["xapplication"].ToString();
            }
            if ((Session["logo_pic"] == null) && logo_pic.HasFile)
            {
                Session["logo_pic"] = logo_pic;
                lblLogoPic.Text     = logo_pic.FileName;
            }
            else if ((Session["logo_pic"] != null) && !logo_pic.HasFile)
            {
                logo_pic        = (FileUpload)Session["logo_pic"];
                lblLogoPic.Text = logo_pic.FileName;
            }
            else if (logo_pic.HasFile)
            {
                Session["logo_pic"] = logo_pic;
                lblLogoPic.Text     = logo_pic.FileName;
            }
            if ((Session["auth_doc"] == null) && auth_doc.HasFile)
            {
                Session["auth_doc"] = auth_doc;
                lblPoa.Text         = auth_doc.FileName;
            }
            else if ((Session["auth_doc"] != null) && !auth_doc.HasFile)
            {
                auth_doc    = (FileUpload)Session["auth_doc"];
                lblPoa.Text = auth_doc.FileName;
            }
            else if (auth_doc.HasFile)
            {
                Session["auth_doc"] = auth_doc;
                lblPoa.Text         = auth_doc.FileName;
            }
            if ((Session["sup_doc1"] == null) && sup_doc1.HasFile)
            {
                Session["sup_doc1"] = sup_doc1;
                lblDoc1.Text        = sup_doc1.FileName;
            }
            else if ((Session["sup_doc1"] != null) && !sup_doc1.HasFile)
            {
                sup_doc1     = (FileUpload)Session["sup_doc1"];
                lblDoc1.Text = sup_doc1.FileName;
            }
            else if (sup_doc1.HasFile)
            {
                Session["sup_doc1"] = sup_doc1;
                lblDoc1.Text        = sup_doc1.FileName;
            }
            if ((Session["sup_doc2"] == null) && sup_doc2.HasFile)
            {
                Session["sup_doc2"] = sup_doc2;
                lblDoc2.Text        = sup_doc2.FileName;
            }
            else if ((Session["sup_doc2"] != null) && !sup_doc2.HasFile)
            {
                sup_doc2     = (FileUpload)Session["sup_doc2"];
                lblDoc2.Text = sup_doc2.FileName;
            }
            else if (sup_doc2.HasFile)
            {
                Session["sup_doc2"] = sup_doc2;
                lblDoc2.Text        = sup_doc2.FileName;
            }
        }