protected void SearchApplicant_Click(object sender, EventArgs e) { if (txt_search.Text != "") { try { succ_msg = "0"; string c_id = t.getPwalletID(txt_search.Text); if (Convert.ToInt32(c_id) > 0) { c_pwall = t.getStageClassByUserID(c_id); int vstatus = Convert.ToInt32(c_pwall.status); if (c_pwall.data_status == "Fresh" || c_pwall.data_status == "Valid" || c_pwall.data_status == "Re-conduct search" || c_pwall.data_status == "Search Conducted" || c_pwall.data_status == "Search 2 Conducted" || c_pwall.data_status == "Re-examine" || c_pwall.data_status == "Registrable" || vstatus <= 5 || ((c_pwall.data_status == "Kiv") && (Convert.ToInt32(c_pwall.status) == 14))) { } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "showDialogue", "showDialogue('" + "Sorry You Cannot Edit Application At this Stage" + "');", true); return; } if (Convert.ToInt32(c_pwall.ID) > 0) { Session["c_pwall"] = c_pwall; c_app = t.getApplicantClassByID(c_id); Session["c_app"] = c_app; c_mark = t.getMarkInfoClassByUserID(c_id); Session["c_mark"] = c_mark; c_aos = t.getAddressServiceByID(c_id); Session["c_aos"] = c_aos; c_rep = t.getRepClassByUserID(c_id); Session["c_rep"] = c_rep; if (Convert.ToInt32(c_app.ID) > 0) { c_app_addy = t.getAddressClassByID(c_app.addressID); Session["c_app_addy"] = c_app_addy; } if (Convert.ToInt32(c_rep.ID) > 0) { c_rep_addy = t.getAddressClassByID(c_rep.addressID); Session["c_rep_addy"] = c_rep_addy; } xname.Text = c_app.xname; xaddress.Text = c_app_addy.street; xtelephone.Text = c_app_addy.telephone1; xemail.Text = c_app_addy.email1; try { nationality.SelectedIndex = Convert.ToInt32(c_app.nationality) - 1; } catch (Exception ee) { } try { residence.SelectedIndex = Convert.ToInt32(c_app_addy.countryID) - 1; } catch (Exception ee) { } try { xselectState.SelectedIndex = Convert.ToInt32(c_app_addy.stateID) - 1; } catch (Exception ee) { } txt_rtm.Text = c_pwall.rtm; curtime.Value = c_pwall.reg_date; title_of_product.Text = c_mark.product_title; nice_class_desc.Text = c_mark.nice_class_desc; txt_discalimer.Text = c_mark.disclaimer; TextBox1.Text = c_mark.reg_number; tmType.SelectedIndex = Convert.ToInt32(c_mark.tm_typeID) - 1; logo_description.SelectedIndex = Convert.ToInt32(c_mark.logo_descriptionID) - 1; national_class.SelectedIndex = Convert.ToInt32(c_mark.national_classID) - 1; aos_xaddress.Text = c_aos.street; aos_xtelephone.Text = c_aos.telephone1; aos_xemail.Text = c_aos.email1; try { aos_xselectState.SelectedIndex = Convert.ToInt32(c_aos.stateID) - 1; } catch (Exception ee) { } xcode.Text = c_rep.agent_code; rep_xname.Text = c_rep.xname; rep_address.Text = c_rep_addy.street; rep_xtelephone.Text = c_rep_addy.telephone1; rep_xemail.Text = c_rep_addy.email1; try { rep_nationality.SelectedIndex = Convert.ToInt32(c_rep.nationality) - 1; } catch (Exception ee) { } try { xselectRepState.SelectedIndex = Convert.ToInt32(c_rep_addy.stateID) - 1; } catch (Exception ee) { } ///application Session["showsearch"] = 1; showsearch = 1; if (logo_description.SelectedItem.Value != "2") { logo_pic_text = "1"; } else { logo_pic_text = "0"; } } } } catch (Exception ee) { } } }
protected void SearchApplicant_Click(object sender, EventArgs e) { if (txt_search.Text != "") { try { succ_msg = "0"; string c_id = t.getPwalletID(txt_search.Text); if (Convert.ToInt32(c_id) > 0) { c_pwall = t.getStageClassByUserID(c_id); if (Convert.ToInt32(c_pwall.ID) > 0) { Session["c_pwall"] = c_pwall; c_app = t.getApplicantClassByID(c_id); Session["c_app"] = c_app; c_mark = t.getMarkInfoClassByUserID(c_id); Session["c_mark"] = c_mark; c_aos = t.getAddressServiceByID(c_id); Session["c_aos"] = c_aos; c_rep = t.getRepClassByUserID(c_id); Session["c_rep"] = c_rep; if (Convert.ToInt32(c_app.ID) > 0) { c_app_addy = t.getAddressClassByID(c_app.addressID); Session["c_app_addy"] = c_app_addy; } if (Convert.ToInt32(c_rep.ID) > 0) { c_rep_addy = t.getAddressClassByID(c_rep.addressID); Session["c_rep_addy"] = c_rep_addy; } xname.Text = c_app.xname; xaddress.Text = c_app_addy.street; xtelephone.Text = c_app_addy.telephone1; xemail.Text = c_app_addy.email1; try { nationality.SelectedIndex = Convert.ToInt32(c_app.nationality) - 1; } catch (Exception ee) { } try { residence.SelectedIndex = Convert.ToInt32(c_app_addy.countryID) - 1; } catch (Exception ee) { } try { xselectState.SelectedIndex = Convert.ToInt32(c_app_addy.stateID) - 1; } catch (Exception ee) { } txt_rtm.Text = c_pwall.rtm; curtime.Value = c_pwall.reg_date; title_of_product.Text = c_mark.product_title; nice_class_desc.Text = c_mark.nice_class_desc; txt_discalimer.Text = c_mark.disclaimer; TextBox1.Text = c_mark.reg_number; tmType.SelectedIndex = Convert.ToInt32(c_mark.tm_typeID) - 1; logo_description.SelectedIndex = Convert.ToInt32(c_mark.logo_descriptionID) - 1; national_class.SelectedIndex = Convert.ToInt32(c_mark.national_classID) - 1; aos_xaddress.Text = c_aos.street; aos_xtelephone.Text = c_aos.telephone1; aos_xemail.Text = c_aos.email1; try { aos_xselectState.SelectedIndex = Convert.ToInt32(c_aos.stateID) - 1; } catch (Exception ee) { } xcode.Text = c_rep.agent_code; rep_xname.Text = c_rep.xname; rep_address.Text = c_rep_addy.street; rep_xtelephone.Text = c_rep_addy.telephone1; rep_xemail.Text = c_rep_addy.email1; try { rep_nationality.SelectedIndex = Convert.ToInt32(c_rep.nationality) - 1; } catch (Exception ee) { } try { xselectRepState.SelectedIndex = Convert.ToInt32(c_rep_addy.stateID) - 1; } catch (Exception ee) { } ///application Session["showsearch"] = 1; showsearch = 1; if (logo_description.SelectedItem.Value != "2") { logo_pic_text = "1"; } else { logo_pic_text = "0"; } } } } catch (Exception ee) { } } }
protected void Page_Load(object sender, EventArgs e) { serverpath = base.Server.MapPath("~/"); if (Session["vid"] != null) { vid = Session["vid"].ToString(); } if (Session["amt"] != null) { amt = Session["amt"].ToString(); } if (Session["aid"] != null) { aid = Session["aid"].ToString(); } if (Session["gt"] != null) { gt = Session["gt"].ToString(); } pwalletID = t.getPwalletID(vid); if (pwalletID != "") { c_mark = t.getMarkInfoClassByUserID(pwalletID); c_rep = t.getRepClassByUserID(pwalletID); c_stage = t.getStageClassByUserID(pwalletID); c_app = t.getApplicantClassByID(pwalletID); c_app_addy = t.getAddressClassByID(c_app.addressID); if (c_mark.logo_pic != "") { tm_img.ImageUrl = "./admin/tm/" + c_mark.logo_pic; if (File.Exists(serverpath + "\\admin\\tm\\" + c_mark.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\\" + c_mark.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; } } Session["xserviceaddress"] = null; Session["xrepresentative"] = null; Session["xmarkinfo"] = null; Session["xapplication"] = null; Session["vid"] = null; Session["amt"] = null; Session["aid"] = null; Session["g"] = null; Session["pc"] = null; } }