protected void LinkButton1_Click(object sender, EventArgs e) { this.c_reg = (XObjs.Registration)this.Session["c_reg"]; string[] words = this.c_reg.Sys_ID.Split('/'); Response.Redirect("http://88.150.164.30/IpoTest2/#/approvedbranchcollect/" + words[2]); }
public void loggin(string user,string vpassword) { string tt45 = ""; Session["agentType"] = "Agent"; ccode = ConfigurationManager.AppSettings["ccode"]; x_code = ConfigurationManager.AppSettings["xcode"]; if (vpassword != "") { // this.password_text = this.xpassword.Text; new_hash = hash.GetGetSHA512String(ccode + vpassword + x_code); } string agentType = ""; if ((Session["agentType"] != null) && (Session["agentType"].ToString() != "")) { agentType = Session["agentType"].ToString(); } //if (agentType == "Agent") //{ this.adminID = this.ret.getAgentLogDetails(user, new_hash); c_reg = ret.getRegistrationByID(adminID); Session["c_reg"] = c_reg; Session["logo"] = "../" + c_reg.logo; Session["pic"] = "../" + c_reg.Principal; //} //else //{ // this.adminID = this.ret.getSubAgentLogDetails(user, new_hash); // c_sub = ret.getSubAgentByID(adminID); Session["c_sub"] = c_sub; // c_sub_reg = ret.getRegistrationBySubagentRegistrationID(c_sub.RegistrationID); Session["c_sub_reg"] = c_sub_reg; // Session["logo"] = "../" + c_sub_reg.logo; // Session["pic"] = "../" + c_sub.AgentPassport; //} if (this.adminID != "0") { string succ = ret.addAdminLog(adminID, RemoteIP, remote_host, remote_user, server_name, server_url); if (succ != "") { TimeSpan tspan = new TimeSpan(9, 0, 0); DateTime prev_dt = DateTime.Now.Add(tspan); Session["pwalletID"] = this.adminID; Session["log_date"] = prev_dt.ToString("F"); Response.Redirect("./A/profile.aspx"); } else { base.Response.Redirect("./login.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { Session["Trademark_item"] = null; if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != "")) { adminID = Session["pwalletID"].ToString(); xadminID.Value = adminID; if (!IsPostBack) { Session["fee_detailsID"] = null; if ((Session["agentType"] != null) && (Session["agentType"].ToString() != "")) { agentType = Session["agentType"].ToString(); if (agentType == "Agent") { c_reg = ret.getRegistrationByID(adminID); Session["c_reg"] = c_reg; Session["coy_name"] = c_reg.CompanyName; Session["agentemail"] = c_reg.Email; Session["agentpnumber"] = c_reg.PhoneNumber; Session["Sys_ID"] = c_reg.Sys_ID; Session["cname"] = c_reg.CompanyName; } else { c_sub = ret.getSubAgentByID(adminID); Session["c_sub"] = c_sub; c_sub_reg = ret.getRegistrationBySubagentRegistrationID(c_sub.RegistrationID); Session["c_sub_reg"] = c_sub_reg; Session["coy_name"] = c_sub_reg.CompanyName; Session["agentemail"] = c_sub.Email; Session["agentpnumber"] = c_sub.Telephone; Session["Sys_ID"] = c_sub.Sys_ID; Session["cname"] = c_sub_reg.CompanyName; } // used_cnt = ret.getPaidUsedCntByCat(adminID, "tm", "1", agentType, "Used"); Session["used_cnt"] = used_cnt; lt_xdi = ret.GetXDisplayItem("tm", adminID, "1", "Used"); if (lt_xdi.Count > 0) { Session["used_cnt"] = lt_xdi.Count; foreach (Classes.XObjs.XDisplayItem x in lt_xdi) { if (x.item_code == "T001") { string sppp = ""; } lt_pw = t.getStageByUserIDAccTm(x.new_transID, Session["Sys_ID"].ToString()); if (lt_pw.Count == 0) { lt_pw = t.getStageByUserIDAccTm2(x.new_transID, Session["Sys_ID"].ToString()); } else { } if (lt_pw.Count > 0) { SortedList<string, string> sl_app_status = new SortedList<string, string>(); sl_app_status = app_status.showTmStatus(lt_pw[0].status, lt_pw[0].data_status); x.lbl_cur_office = sl_app_status["status"]; x.lbl_cur_status = sl_app_status["data_status"]; } else { string[] tm_trans_arr = x.new_transID.Split('-'); //if(Convert.ToInt32(tm_trans_arr[2].Trim())>0) //{ //int tm_hcount = reg.updateHwalletStatus(tm_trans_arr[2].Trim()); //if (tm_hcount > 0) { tm_vcount++; //} //} } } } if (tm_vcount > 0) { Response.Redirect("v_bask_tmu.aspx"); } else { Session["lt_xdi"] = lt_xdi; used_cnt = lt_xdi.Count; Session["used_cnt"] = used_cnt; gvTmUsed.DataSource = lt_xdi; gvTmUsed.DataBind(); } } else { Response.Redirect("../a_login.aspx"); } } else { if (Session["used_cnt"] != null) { used_cnt = Convert.ToInt32(Session["used_cnt"]); } } } else { Response.Redirect("../a_login.aspx"); } if ((Session["log_date"] != null) && (Session["log_date"].ToString() != "")) { log_date = Session["log_date"].ToString(); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/html"; try { if ( (context.Request.Form["email"] != null) && (context.Request.Form["email"] != "") && (context.Request.Form["xpass"] != null) && (context.Request.Form["xpass"] != "") && (context.Request.Form["isagent"] != null) && (context.Request.Form["isagent"] != "") ) { email = context.Request.Form["email"].ToString(); xpass = context.Request.Form["xpass"].ToString(); isagent = context.Request.Form["isagent"].ToString(); try { context.Session["agentType"] = isagent; if (isagent == "Agent") { xagent = ret.getRegistrationByLogin(email, xpass); if ((xagent.xid != null) && (xagent.xid != "")) { //context.Session["MemberInfo"] = mi; context.Session["agentID"] = xagent.xid; context.Session["agentEmail"] = email; context.Session["agentPin"] = xpass; json = js.Serialize(xagent); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } else { json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } } else { xsub_agent = ret.getSubAgentByLogin(email, xpass); if ((xsub_agent.xid != null) && (xsub_agent.xid != "")) { //context.Session["MemberInfo"] = mi; context.Session["agentID"] = xsub_agent.xid; context.Session["agentEmail"] = email; context.Session["agentPin"] = xpass; json = js.Serialize(xagent); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } else { json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } } } catch (Exception ex) { string ex1 = ex.ToString(); json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } } } catch (Exception ex) { string ex1 = ex.ToString(); json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } }
public List<XObjs.Registration> getAllRegistrations44() { List<XObjs.Registration> x_lt = new List<XObjs.Registration>(); SqlConnection connection = new SqlConnection(this.ConnectXhome()); SqlCommand command = new SqlCommand("SELECT * FROM registrations ", connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection); while (reader.Read()) { XObjs.Registration x = new XObjs.Registration(); x.xid = reader["xid"].ToString(); x.AccrediationType = reader["AccrediationType"].ToString(); x.Sys_ID = reader["Sys_ID"].ToString(); x.Firstname = reader["Firstname"].ToString(); x.Surname = reader["Surname"].ToString(); x.Email = reader["Email"].ToString(); x.xpassword = reader["xpassword"].ToString(); x.DateOfBrith = reader["DateOfBrith"].ToString(); x.IncorporatedDate = reader["IncorporatedDate"].ToString(); x.Nationality = reader["Nationality"].ToString(); x.PhoneNumber = reader["PhoneNumber"].ToString(); x.CompanyName = reader["CompanyName"].ToString(); x.CompanyAddress = reader["CompanyAddress"].ToString(); x.ContactPerson = reader["ContactPerson"].ToString(); x.ContactPersonPhone = reader["ContactPersonPhone"].ToString(); x.CompanyWebsite = reader["CompanyWebsite"].ToString(); x.Certificate = reader["Certificate"].ToString(); x.Introduction = reader["Introduction"].ToString(); x.Principal = reader["Principal"].ToString(); x.logo = reader["logo"].ToString(); x.xreg_date = reader["xreg_date"].ToString(); x.xstatus = reader["xstatus"].ToString(); x.xvisible = reader["xvisible"].ToString(); x.xsync = reader["xsync"].ToString(); x_lt.Add(x); } reader.Close(); return x_lt; }
public XObjs.Registration getRegistrationBySysID(string email, string sys_id) { XObjs.Registration x = new XObjs.Registration(); SqlConnection connection = new SqlConnection(this.ConnectXhome()); SqlCommand command = new SqlCommand("SELECT * FROM registrations WHERE Email='" + email + "' AND Sys_ID='" + sys_id + "' ", connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection); while (reader.Read()) { x.xid = reader["xid"].ToString(); x.AccrediationType = reader["AccrediationType"].ToString(); x.Sys_ID = reader["Sys_ID"].ToString(); x.Firstname = DecodeChar(reader["Firstname"].ToString()); x.Surname = DecodeChar(reader["Surname"].ToString()); x.Email = DecodeChar(reader["Email"].ToString()); x.xpassword = DecodeChar(reader["xpassword"].ToString()); x.DateOfBrith = reader["DateOfBrith"].ToString(); x.IncorporatedDate = reader["IncorporatedDate"].ToString(); x.Nationality = reader["Nationality"].ToString(); x.PhoneNumber = reader["PhoneNumber"].ToString(); x.CompanyName = DecodeChar(reader["CompanyName"].ToString()); x.CompanyAddress = DecodeChar(reader["CompanyAddress"].ToString()); x.ContactPerson = DecodeChar(reader["ContactPerson"].ToString()); x.ContactPersonPhone = reader["ContactPersonPhone"].ToString(); x.CompanyWebsite = DecodeChar(reader["CompanyWebsite"].ToString()); x.Certificate = reader["Certificate"].ToString(); x.Introduction = reader["Introduction"].ToString(); x.Principal = reader["Principal"].ToString(); x.logo = reader["logo"].ToString(); x.xreg_date = reader["xreg_date"].ToString(); x.xstatus = reader["xstatus"].ToString(); x.xvisible = reader["xvisible"].ToString(); x.xsync = reader["xsync"].ToString(); } reader.Close(); return x; }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/html"; ccode = ConfigurationManager.AppSettings["ccode"]; xcode = ConfigurationManager.AppSettings["xcode"]; try { new_hash = hash.GetGetSHA512String(ccode + context.Request.Form["xpass"] + xcode); try { context.Session["agentType"] = context.Request.Form["isagent"]; if (context.Request.Form["isagent"] == "Agent") { xagent = ret.getRegistrationByID(context.Request.Form["xid"].ToString()); if ((context.Request.Form["email"] != null) && (context.Request.Form["email"] != "")) { xagent.Email = context.Request.Form["email"].ToString(); } if ((context.Request.Form["sys_id"] != null) && (context.Request.Form["sys_id"] != "")) { xagent.Sys_ID = context.Request.Form["sys_id"].ToString(); } if ((context.Request.Form["isagent"] != null) && (context.Request.Form["isagent"] != "")) { isagent = context.Request.Form["isagent"].ToString(); } if ((context.Request.Form["firstname"] != null) && (context.Request.Form["firstname"] != "")) { xagent.Firstname = context.Request.Form["firstname"].ToString(); } if ((context.Request.Form["surname"] != null) && (context.Request.Form["surname"] != "")) { xagent.Surname = context.Request.Form["surname"].ToString(); } if ((context.Request.Form["mobile"] != null) && (context.Request.Form["mobile"] != "")) { xagent.PhoneNumber = context.Request.Form["mobile"].ToString(); } if ((context.Request.Form["dob"] != null) && (context.Request.Form["dob"] != "")) { xagent.DateOfBrith = context.Request.Form["dob"].ToString(); } if ((context.Request.Form["coy_name"] != null) && (context.Request.Form["coy_name"] != "")) { xagent.CompanyName = context.Request.Form["coy_name"].ToString(); } if ((context.Request.Form["coy_addy"] != null) && (context.Request.Form["coy_addy"] != "")) { xagent.CompanyAddress = context.Request.Form["coy_addy"].ToString(); } if ((context.Request.Form["coy_web"] != null) && (context.Request.Form["coy_web"] != "")) { xagent.CompanyWebsite = context.Request.Form["coy_web"].ToString(); } if ((context.Request.Form["doi"] != null) && (context.Request.Form["doi"] != "")) { xagent.IncorporatedDate = context.Request.Form["doi"].ToString(); } if ((context.Request.Form["cont_fullname"] != null) && (context.Request.Form["cont_fullname"] != "")) { xagent.ContactPerson = context.Request.Form["cont_fullname"].ToString(); } if ((context.Request.Form["cont_mobile"] != null) && (context.Request.Form["cont_mobile"] != "")) { xagent.ContactPersonPhone = context.Request.Form["cont_mobile"].ToString(); } if ((context.Request.Form["xid"] != null) && (context.Request.Form["xid"] != "")) { xagent.xid = context.Request.Form["xid"].ToString(); } xagent.xpassword = new_hash; xagent.xreg_date = DateTime.Now.ToString("yyyy-MM-dd"); succ = reg.updateRegistration(xagent); if (succ > 0) { context.Session["c_reg"] = xagent; context.Session["agentID"] = xagent.xid; context.Session["agentEmail"] = xagent.Email; context.Session["sys_id"] = xagent.Sys_ID; context.Session["coy_name"] = xagent.CompanyName; json = js.Serialize("updated"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } else { json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } } else { xsub_agent = ret.getSubAgentByID(context.Request.Form["xid"].ToString()); if ((context.Request.Form["email"] != null) && (context.Request.Form["email"] != "")) { xsub_agent.Email = context.Request.Form["email"].ToString(); } if ((context.Request.Form["sys_id"] != null) && (context.Request.Form["sys_id"] != "")) { xsub_agent.Sys_ID = context.Request.Form["sys_id"].ToString(); } if ((context.Request.Form["isagent"] != null) && (context.Request.Form["isagent"] != "")) { isagent = context.Request.Form["isagent"].ToString(); } if ((context.Request.Form["firstname"] != null) && (context.Request.Form["firstname"] != "")) { xsub_agent.Firstname = context.Request.Form["firstname"].ToString(); } if ((context.Request.Form["surname"] != null) && (context.Request.Form["surname"] != "")) { xsub_agent.Surname = context.Request.Form["surname"].ToString(); } if ((context.Request.Form["mobile"] != null) && (context.Request.Form["mobile"] != "")) { xsub_agent.Telephone = context.Request.Form["mobile"].ToString(); } if ((context.Request.Form["dob"] != null) && (context.Request.Form["dob"] != "")) { xsub_agent.DateOfBrith = context.Request.Form["dob"].ToString(); } if ((context.Request.Form["xid"] != null) && (context.Request.Form["xid"] != "")) { xsub_agent.xid = context.Request.Form["xid"].ToString(); } xsub_agent.xpassword = new_hash; xsub_agent.xreg_date = DateTime.Now.ToString("yyyy-MM-dd"); succ = reg.updateSubAgent(xsub_agent); if (succ > 0) { context.Session["c_sub"] = xsub_agent; context.Session["agentID"] = xsub_agent.xid; context.Session["agentEmail"] = xsub_agent.Email; context.Session["sys_id"] = xsub_agent.Sys_ID; context.Session["c_sub_reg"] = ret.getRegistrationBySubagentRegistrationID(xsub_agent.RegistrationID); json = js.Serialize("updated"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } else { json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } } } catch (Exception ex) { string ex1 = ex.ToString(); json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } } catch (Exception ex) { string ex1 = ex.ToString(); json = js.Serialize("Could not complete the process at this time!"); json = "{\"msg\":" + json + "}"; context.Response.Write(json); } }
protected void Page_Load(object sender, EventArgs e) { if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != "")) { this.adminID = this.Session["pwalletID"].ToString(); } else { base.Response.Redirect("../a_login.aspx"); } if ((this.Session["log_date"] != null) && (this.Session["log_date"].ToString() != "")) { this.log_date = this.Session["log_date"].ToString(); } if ((this.Session["agentType"] != null) && (this.Session["agentType"].ToString() != "")) { this.agentType = this.Session["agentType"].ToString(); if (this.agentType == "Agent") { if (this.Session["c_reg"] != null) { this.c_reg = (XObjs.Registration)this.Session["c_reg"]; this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname; this.coy_name = this.c_reg.CompanyName; this.cust_id = this.c_reg.Sys_ID; this.email = this.c_reg.Email; this.mobile = this.c_reg.PhoneNumber; this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = this.c_reg.CompanyAddress; } } else { XObjs.Registration registration = new XObjs.Registration(); if (this.Session["c_sub"] != null) { this.c_sub = (XObjs.Subagent)this.Session["c_sub"]; this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname; this.email = this.c_sub.Email; this.mobile = this.c_sub.Telephone; } if (this.Session["c_sub_reg"] != null) { registration = (XObjs.Registration)this.Session["c_sub_reg"]; this.coy_name = registration.CompanyName; this.cust_id = registration.Sys_ID + "_" + this.c_sub.AssignID; } this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = registration.CompanyAddress; } } if (!base.IsPostBack) { if ((base.Request.Form["x"] != null) && (base.Request.Form["x"].ToString() != "")) { this.xid = base.Request.Form["x"].ToString(); this.Session["new_ptID"] = base.Request.Form["x"].ToString(); } else { base.Response.Redirect("../A/profile.aspx"); } } this.btn_all_doc.Click += new EventHandler(this.upload_Clicked); this.serverpath = base.Server.MapPath("~/"); }
protected void Page_Load(object sender, EventArgs e) { if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != "")) { this.adminID = this.Session["pwalletID"].ToString(); } else { base.Response.Redirect("../a_login.aspx"); } if ((this.Session["log_date"] != null) && (this.Session["log_date"].ToString() != "")) { this.log_date = this.Session["log_date"].ToString(); } if ((this.Session["agentType"] != null) && (this.Session["agentType"].ToString() != "")) { this.agentType = this.Session["agentType"].ToString(); if (this.agentType == "Agent") { if (this.Session["c_reg"] != null) { this.c_reg = (XObjs.Registration)this.Session["c_reg"]; this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname; this.coy_name = this.c_reg.CompanyName; this.cust_id = this.c_reg.Sys_ID; this.email = this.c_reg.Email; this.mobile = this.c_reg.PhoneNumber; this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = this.c_reg.CompanyAddress; } } else { XObjs.Registration registration = new XObjs.Registration(); if (this.Session["c_sub"] != null) { this.c_sub = (XObjs.Subagent)this.Session["c_sub"]; this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname; this.email = this.c_sub.Email; this.mobile = this.c_sub.Telephone; } if (this.Session["c_sub_reg"] != null) { registration = (XObjs.Registration)this.Session["c_sub_reg"]; this.coy_name = registration.CompanyName; this.cust_id = registration.Sys_ID + "_" + this.c_sub.AssignID; } this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = registration.CompanyAddress; } } }
protected void btnConfirm_Click(object sender, EventArgs e) { if (((this.xtrans.Text == "") || (this.xmob.Text == "")) || (this.val.IsValidMobile(this.xmob.Text) > 0)) { if (this.xtrans.Text == "") { this.xtrans.BorderColor = Color.Red; } else { this.xtrans.BorderColor = Color.Green; } if (this.xmob.Text == "") { this.xmob.BorderColor = Color.Red; } else { this.xmob.BorderColor = Color.Green; } base.Response.Write("<script language=JavaScript type='text/javascript'>alert('PLEASE BE SURE TO FILL IN ALL THE ENTRIES MARKED WITH A RED STAR!!'); </script>"); } else if (((this.xtrans.Text != "") && (this.xmob.Text != "")) && (this.val.IsValidMobile(this.xmob.Text) == 0)) { if ((this.Session["agentType"] != null) && (this.Session["agentType"].ToString() != "")) { this.agentType = this.Session["agentType"].ToString(); } if (this.agentType == "Agent") { this.c_reg = this.ret.getRegistrationByPhoneNumber(this.xmob.Text); this.Session["c_reg"] = this.c_reg; this.Session["RegID"] = this.c_reg.xid; this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname; this.coy_name = this.c_reg.CompanyName; this.cust_id = this.c_reg.Sys_ID; this.email = this.c_reg.Email; this.mobile = this.c_reg.PhoneNumber; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = this.c_reg.CompanyAddress; } else { if (this.Session["c_sub"] != null) { this.c_sub = this.ret.getSubAgentByPhoneNumber(this.xmob.Text); this.Session["c_sub"] = this.c_sub; this.Session["RegID"] = this.c_sub.xid; this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname; this.Session["fullname"] = this.fullname; this.email = this.c_sub.Email; this.Session["email"] = this.email; this.mobile = this.c_sub.Telephone; this.Session["mobile"] = this.mobile; } if (this.Session["c_sub_reg"] != null) { this.c_sub_reg = this.ret.getRegistrationBySubagentRegistrationID(this.c_sub.RegistrationID); this.Session["c_sub_reg"] = this.c_sub_reg; this.coy_name = this.c_sub_reg.CompanyName; this.cust_id = this.c_sub_reg.Sys_ID + "_" + this.c_sub.AssignID; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = this.c_sub_reg.CompanyAddress; } } string xmemberID = ""; if ((this.Session["RegID"] != null) && (this.Session["RegID"].ToString() != "")) { xmemberID = this.Session["RegID"].ToString(); } if ((xmemberID != null) && (xmemberID != "")) { this.lt_twall = this.ret.getValidatedTwalletByMemberID(xmemberID, this.xtrans.Text); if (this.lt_twall.Count > 0) { this.paid_status_msg = this.lt_twall[0].xpay_status; if (this.paid_status_msg == "1") { this.paid_status_msg = "PAID"; this.btnValidate.Visible = false; } else { this.paid_status_msg = "NOT PAID"; this.btnValidate.Visible = true; } this.lt_fdets = this.ret.getFee_detailsByTwalletID(this.lt_twall[0].xid); this.Session["transID"] = this.xtrans.Text; this.Session["memberID"] = xmemberID; this.show_inv = 1; } else { this.status_msg = "COULD NOT FIND THE TRANSACTION ON THE SYSTEM!!"; } } } }
protected void Page_Load(object sender, EventArgs e) { this.adminID = this.Session["pwalletID"].ToString(); this.log_date = this.Session["log_date"].ToString(); if (this.Session["log_date"] != null && this.Session["log_date"].ToString() != "" && this.Session["exp_date"] != null && this.Session["exp_date"].ToString() != "") { if (!this.ret.DoLogOutTimer(Convert.ToDateTime(this.Session["exp_date"].ToString()))) { this.Session["pwalletID"] = null; base.Response.Redirect("../a_login.aspx"); } else { this.adminID = this.Session["pwalletID"].ToString(); this.log_date = this.Session["log_date"].ToString(); } } this.xadminID.Value = this.adminID; if (this.Session["agentType"] != null && this.Session["agentType"].ToString() != "") { this.agentType = this.Session["agentType"].ToString(); this.tm_cnt = this.ret.getPaidFee_detail_ItemsCntByCatBk(this.adminID, "ag", "2", this.agentType); if (!(this.agentType == "Agent")) { XObjs.Registration registration = new XObjs.Registration(); if (this.Session["c_sub"] != null) { this.c_sub = (XObjs.Subagent)this.Session["c_sub"]; this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname; this.email = this.c_sub.Email; this.mobile = this.c_sub.Telephone; } if (this.Session["c_sub_reg"] != null) { registration = (XObjs.Registration)this.Session["c_sub_reg"]; this.coy_name = registration.CompanyName; this.cust_id = registration.Sys_ID + "_" + this.c_sub.AssignID; } this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = registration.CompanyAddress; return; } if (this.Session["c_reg"] != null) { this.c_reg = (XObjs.Registration)this.Session["c_reg"]; this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname; this.coy_name = this.c_reg.CompanyName; this.cust_id = this.c_reg.Sys_ID; this.email = this.c_reg.Email; this.mobile = this.c_reg.PhoneNumber; this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = this.c_reg.CompanyAddress; return; } } else { base.Response.Redirect("../a_login.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { Session["Trademark_item"] = null; if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != "")) { adminID = Session["pwalletID"].ToString(); Session["pwalletID2"] = adminID; xadminID.Value = adminID; if (!IsPostBack) { Session["fee_detailsID"] = null; if ((Session["agentType"] != null) && (Session["agentType"].ToString() != "")) { agentType = Session["agentType"].ToString(); unused_cnt = ret.getPaidUsedCntByCat(adminID, "tm", "1", agentType, "Not Used"); Session["unused_cnt"] =unused_cnt; if (agentType == "Agent") { c_reg = ret.getRegistrationByID(adminID); Session["c_reg"] = c_reg; Session["coy_name"] = c_reg.CompanyName; Session["agentemail"] = c_reg.Email; Session["agentpnumber"] = c_reg.PhoneNumber; Session["Sys_ID"] = c_reg.Sys_ID; Session["cname"] = c_reg.CompanyName; } else { c_sub = ret.getSubAgentByID(adminID); Session["c_sub"] = c_sub; c_sub_reg = ret.getRegistrationBySubagentRegistrationID(c_sub.RegistrationID); Session["c_sub_reg"] = c_sub_reg; Session["coy_name"] = c_sub_reg.CompanyName; Session["agentemail"] = c_sub.Email; Session["agentpnumber"] = c_sub.Telephone; Session["Sys_ID"] = c_sub.Sys_ID; Session["cname"] = c_sub_reg.CompanyName; } } else { Response.Redirect("../a_login.aspx"); } } else { if (Session["unused_cnt"] != null) { unused_cnt = Convert.ToInt32(Session["unused_cnt"]); } } } else { Response.Redirect("../a_login.aspx"); } if ((Session["log_date"] != null) && (Session["log_date"].ToString() != "")) { log_date = Session["log_date"].ToString(); } }
protected void Save_Click(object sender, EventArgs e) { ccode = ConfigurationManager.AppSettings["ccode"]; x_code = ConfigurationManager.AppSettings["xcode"]; if (this.xpassword.Text != "") { this.password_text = this.xpassword.Text; new_hash = hash.GetGetSHA512String(ccode + this.password_text + x_code); } string agentType = ""; if ((Session["agentType"] != null) && (Session["agentType"].ToString() != "")) { agentType = Session["agentType"].ToString(); } if (agentType == "Agent") { this.adminID = this.ret.getAgentLogDetails(this.xemail.Text, new_hash); c_reg = ret.getRegistrationByID(adminID); Session["c_reg"] = c_reg; Session["logo"] = "../"+c_reg.logo; Session["pic"] = "../" + c_reg.Principal; } else { this.adminID = this.ret.getSubAgentLogDetails(this.xemail.Text, new_hash); c_sub = ret.getSubAgentByID(adminID); Session["c_sub"] = c_sub; c_sub_reg = ret.getRegistrationBySubagentRegistrationID(c_sub.RegistrationID); Session["c_sub_reg"] = c_sub_reg; Session["logo"] = "../" + c_sub_reg.logo; Session["pic"] = "../" + c_sub.AgentPassport; } if (this.adminID != "0") { string succ = ret.addAdminLog(adminID, RemoteIP, remote_host, remote_user, server_name, server_url); if (succ != "") { TimeSpan tspan=new TimeSpan(9,0,0); DateTime prev_dt = DateTime.Now.Add(tspan); Session["pwalletID"] = this.adminID; Session["log_date"] = prev_dt.ToString("F"); Response.Redirect("./A/profile.aspx"); } else { base.Response.Redirect("./login.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != "")) { adminID = Session["pwalletID"].ToString(); } else { base.Response.Redirect("../a_login.aspx"); } if ((Session["log_date"] != null) && (Session["log_date"].ToString() != "")) { log_date = Session["log_date"].ToString(); } if ((Session["agentType"] != null) && (Session["agentType"].ToString() != "")) { agentType = Session["agentType"].ToString(); if (agentType == "Agent") { if (Session["c_reg"] != null) { c_reg = (XObjs.Registration)Session["c_reg"]; fullname = c_reg.Firstname + " " + c_reg.Surname; coy_name = c_reg.CompanyName; cust_id = c_reg.Sys_ID; email = c_reg.Email; mobile = c_reg.PhoneNumber; Session["coy_name"] = coy_name; Session["fullname"] = fullname; Session["email"] = email; Session["mobile"] = mobile; Session["c_addy"] = c_reg.CompanyAddress; } } else { XObjs.Registration registration = new XObjs.Registration(); if (Session["c_sub"] != null) { c_sub = (XObjs.Subagent)Session["c_sub"]; fullname = c_sub.Firstname + " " + c_sub.Surname; email = c_sub.Email; mobile = c_sub.Telephone; } if (Session["c_sub_reg"] != null) { registration = (XObjs.Registration)Session["c_sub_reg"]; coy_name = registration.CompanyName; cust_id = registration.Sys_ID + "_" + c_sub.AssignID; } Session["coy_name"] = coy_name; Session["fullname"] = fullname; Session["email"] = email; Session["mobile"] = mobile; Session["c_addy"] = registration.CompanyAddress; } /// if ((Session["Trademark_item"] != null) && (Session["Trademark_item"].ToString() != "")) { ti = (XObjs.Trademark_item)Session["Trademark_item"]; if (ti.item_code.ToUpper().Contains("T") && ((ti.item_code.ToUpper() == "T002") || (ti.item_code.ToUpper() == "T102"))) { ti.xurl = ConfigurationManager.AppSettings["new2_t002"]; } else if ((ti.item_code.ToUpper().Contains("T") && (ti.item_code.ToUpper() != "T002")) && (ti.item_code.ToUpper() != "T102")) { ti.xurl = ConfigurationManager.AppSettings["new2_t003"]; } else if (this.ti.item_code.ToUpper().Contains("P") && ((this.ti.item_code.ToUpper() == "P001") || (this.ti.item_code.ToUpper() == "P002") || (this.ti.item_code.ToUpper() == "P102"))) { ti.xurl = ConfigurationManager.AppSettings["new2_p001"]; } else if (this.ti.item_code.ToUpper().Contains("P") && ((this.ti.item_code.ToUpper() != "P001") && (this.ti.item_code.ToUpper() != "P002") && (this.ti.item_code.ToUpper() != "P102"))) { ti.xurl = ConfigurationManager.AppSettings["new2_p003"]; } else if (this.ti.item_code.ToUpper().Contains("D") && ((this.ti.item_code.ToUpper() == "D002") || (this.ti.item_code.ToUpper() == "D003") || (this.ti.item_code.ToUpper() == "D102"))) { ti.xurl = ConfigurationManager.AppSettings["new2_d002"]; } else if (this.ti.item_code.ToUpper().Contains("D") && ((this.ti.item_code.ToUpper() != "D002") && (this.ti.item_code.ToUpper() != "D003") && (this.ti.item_code.ToUpper() != "D102"))) { ti.xurl = ConfigurationManager.AppSettings["new2_d004"]; } } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/html"; ccode = ConfigurationManager.AppSettings["ccode"]; x_code = ConfigurationManager.AppSettings["xcode"]; JavaScriptSerializer ser = new JavaScriptSerializer(); var pp = context.Request["vv"]; Logins dd = ser.Deserialize<Logins>(pp); if (dd.request == "vlogin") { try { if ( (dd.email != null) && (dd.xpass != "") ) { email = dd.email; xpass = dd.xpass; try { // context.Session["agentType"] = "isagent"; new_hash = hash.GetGetSHA512String(ccode + xpass + x_code); // xagent = ret.getRegistrationByLogin(email, xpass); xagent = ret.getRegistrationByLogin(email, new_hash); if ((xagent.xid != null) && (xagent.xid != "")) { //context.Session["MemberInfo"] = mi; UserSession.ID = "agentID"; context.Session["agentID"] = xagent.xid; HttpContext.Current.Session["agentID2"] = xagent.xid; context.Session["agentEmail"] = email; context.Session["agentPin"] = xpass; json2 = js.Serialize(xagent); // json2 = js.Serialize("true"); context.Response.ContentType = "application/json"; // json = "{\"msg\":" + json + "}"; context.Response.Write(json2); } else { json2 = js.Serialize("false"); // json = "{\"msg\":" + json + "}"; context.Response.ContentType = "application/json"; context.Response.Write(json2); } } catch (Exception ex) { string ex1 = ex.ToString(); json2 = js.Serialize("Could not complete the process at this time!"); context.Response.ContentType = "application/json"; // json = "{\"msg\":" + json + "}"; context.Response.Write(json2); } } } catch (Exception ex) { string ex1 = ex.ToString(); json2 = js.Serialize("Could not complete the process at this time!"); context.Response.ContentType = "application/json"; // json = "{\"msg\":" + json + "}"; context.Response.Write(json2); } } else if (dd.request == "vlogin3") { string newpass = "******"; new_hash = hash.GetGetSHA512String(ccode + newpass + x_code); string xid = ret.getAgentLogDetails2(dd.email); if (xid != null || xid != "") { int vnum = ret.updateRegistrationSysID3(xid, new_hash); if (vnum > 0) { xagent = ret.getRegistrationByLogin(dd.email, new_hash); sendemail(dd.email, xagent.Surname); json2 = js.Serialize(vnum); // json = "{\"msg\":" + json + "}"; context.Response.ContentType = "application/json"; context.Response.Write(json2); } else { json2 = js.Serialize("false"); // json = "{\"msg\":" + json + "}"; context.Response.ContentType = "application/json"; context.Response.Write(json2); } } else { json2 = js.Serialize("false"); // json = "{\"msg\":" + json + "}"; context.Response.ContentType = "application/json"; context.Response.Write(json2); } } else { string vgent = UserSession.ID; if (HttpContext.Current.Session["agentID2"] != null) { string json2 = js.Serialize("true"); context.Response.ContentType = "application/json"; // json = "{\"msg\":" + json + "}"; context.Response.Write(json2); } else { string json2 = js.Serialize("false"); context.Response.ContentType = "application/json"; // json = "{\"msg\":" + json + "}"; context.Response.Write(json2); } } }
protected void Page_Load(object sender, EventArgs e) { if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != "")) { this.adminID = this.Session["pwalletID"].ToString(); Retriever ret3 = new Retriever(); Classes.XObjs.Registration c_reg2 = ret3.getRegistrationByID(adminID); xname.Value = c_reg2.Sys_ID; } else { base.Response.Redirect("../a_login.aspx"); } if ((this.Session["log_date"] != null) && (this.Session["log_date"].ToString() != "")) { this.log_date = this.Session["log_date"].ToString(); } if ((this.Session["agentType"] != null) && (this.Session["agentType"].ToString() != "")) { this.agentType = this.Session["agentType"].ToString(); } else { base.Response.Redirect("../a_login.aspx"); // base.Response.Redirect("http://88.150.164.30/IpoNigeria"); } if ((this.Session["agentType"] != null) && (this.Session["agentType"].ToString() != "")) { this.agentType = this.Session["agentType"].ToString(); if (this.agentType == "Agent") { if (this.Session["c_reg"] != null) { this.c_reg = (XObjs.Registration)this.Session["c_reg"]; this.fullname = this.c_reg.Firstname + " " + this.c_reg.Surname; this.coy_name = this.c_reg.CompanyName; this.cust_id = this.c_reg.Sys_ID; hfImage1.Value = this.cust_id; hfImage2.Value = this.c_reg.xid; this.email = this.c_reg.Email; this.mobile = this.c_reg.PhoneNumber; this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = this.c_reg.CompanyAddress; } } else { if (this.Session["c_sub"] != null) { this.c_sub = (XObjs.Subagent)this.Session["c_sub"]; this.fullname = this.c_sub.Firstname + " " + this.c_sub.Surname; this.email = this.c_sub.Email; this.mobile = this.c_sub.Telephone; } if (this.Session["c_sub_reg"] != null) { this.c_sub_reg = (XObjs.Registration)this.Session["c_sub_reg"]; this.coy_name = this.c_sub_reg.CompanyName; this.cust_id = this.c_sub_reg.Sys_ID + "_" + this.c_sub.AssignID; } this.Session["coy_name"] = this.coy_name; this.Session["fullname"] = this.fullname; this.Session["email"] = this.email; this.Session["mobile"] = this.mobile; this.Session["c_addy"] = this.c_sub_reg.CompanyAddress; } } }
protected void Page_Load(object sender, EventArgs e) { if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != "")) { adminID = Session["pwalletID"].ToString(); } else { base.Response.Redirect("../a_login.aspx"); } if ((Session["log_date"] != null) && (Session["log_date"].ToString() != "")) { log_date = Session["log_date"].ToString(); } if ((Session["agentType"] != null) && (Session["agentType"].ToString() != "")) { agentType = Session["agentType"].ToString(); if (agentType == "Agent") { if (Session["c_reg"] != null) { c_reg = (XObjs.Registration)Session["c_reg"]; fullname = c_reg.Firstname + " " + c_reg.Surname; coy_name = c_reg.CompanyName; cust_id = c_reg.Sys_ID; email = c_reg.Email; mobile = c_reg.PhoneNumber; Session["coy_name"] = coy_name; Session["fullname"] = fullname; Session["email"] = email; Session["mobile"] = mobile; Session["c_addy"] = c_reg.CompanyAddress; } } else { XObjs.Registration registration = new XObjs.Registration(); if (Session["c_sub"] != null) { c_sub = (XObjs.Subagent)Session["c_sub"]; fullname = c_sub.Firstname + " " + c_sub.Surname; email = c_sub.Email; mobile = c_sub.Telephone; } if (Session["c_sub_reg"] != null) { registration = (XObjs.Registration)Session["c_sub_reg"]; coy_name = registration.CompanyName; cust_id = registration.Sys_ID + "_" + c_sub.AssignID; } Session["coy_name"] = coy_name; Session["fullname"] = fullname; Session["email"] = email; Session["mobile"] = mobile; Session["c_addy"] = registration.CompanyAddress; } } }
protected void Page_Load(object sender, EventArgs e) { if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != "")) { adminID = Session["pwalletID"].ToString(); } else { base.Response.Redirect("../a_login.aspx"); } if ((Session["log_date"] != null) && (Session["log_date"].ToString() != "")) { log_date = Session["log_date"].ToString(); } if ((Session["agentType"] != null) && (Session["agentType"].ToString() != "")) { agentType = Session["agentType"].ToString(); if (agentType == "Agent") { if (Session["c_reg"] != null) { c_reg = (XObjs.Registration)Session["c_reg"]; fullname = c_reg.Firstname + " " + c_reg.Surname; coy_name = c_reg.CompanyName; cust_id = c_reg.Sys_ID; email = c_reg.Email; mobile = c_reg.PhoneNumber; Session["coy_name"] = coy_name; Session["fullname"] = fullname; Session["email"] = email; Session["mobile"] = mobile; Session["c_addy"] = c_reg.CompanyAddress; } } else { XObjs.Registration registration = new XObjs.Registration(); if (Session["c_sub"] != null) { c_sub = (XObjs.Subagent)Session["c_sub"]; fullname = c_sub.Firstname + " " + c_sub.Surname; email = c_sub.Email; mobile = c_sub.Telephone; } if (Session["c_sub_reg"] != null) { registration = (XObjs.Registration)Session["c_sub_reg"]; coy_name = registration.CompanyName; cust_id = registration.Sys_ID + "_" + c_sub.AssignID; } Session["coy_name"] = coy_name; Session["fullname"] = fullname; Session["email"] = email; Session["mobile"] = mobile; Session["c_addy"] = registration.CompanyAddress; } /// if ((Session["Trademark_item"] != null) && (Session["Trademark_item"].ToString() != "")) { ti = (XObjs.Trademark_item)Session["Trademark_item"]; if (ti.item_code.ToUpper().Contains("T") && ((ti.item_code.ToUpper() == "T002") || (ti.item_code.ToUpper() == "T102"))) { ti.xurl = ConfigurationManager.AppSettings["new_t002"]; } else if ((ti.item_code.ToUpper().Contains("T") && (ti.item_code.ToUpper() != "T002")) && (ti.item_code.ToUpper() != "T102")) { ti.xurl = ConfigurationManager.AppSettings["new_t003"]; } else if (this.ti.item_code.ToUpper().Contains("P") && ((this.ti.item_code.ToUpper() == "P001") || (this.ti.item_code.ToUpper() == "P002") || (this.ti.item_code.ToUpper() == "P102"))) { ti.xurl = ConfigurationManager.AppSettings["new_p001"]; } else if (this.ti.item_code.ToUpper().Contains("P") && ((this.ti.item_code.ToUpper() != "P001") && (this.ti.item_code.ToUpper() != "P002") && (this.ti.item_code.ToUpper() != "P102") && (this.ti.item_code.ToUpper() != "P016") && (this.ti.item_code.ToUpper() != "P015") && (this.ti.item_code.ToUpper() != "P014"))) { ti.xurl = ConfigurationManager.AppSettings["new_p003"]; } else if (this.ti.item_code.ToUpper().Contains("D") && ((this.ti.item_code.ToUpper() == "D002") || (this.ti.item_code.ToUpper() == "D003") || (this.ti.item_code.ToUpper() == "D102"))) { ti.xurl = ConfigurationManager.AppSettings["new_d002"]; } else if (this.ti.item_code.ToUpper().Contains("D") && ((this.ti.item_code.ToUpper() != "D002") && (this.ti.item_code.ToUpper() != "D003") && (this.ti.item_code.ToUpper() != "D102"))) { ti.xurl = ConfigurationManager.AppSettings["new_d004"]; } else { ti.xurl = ConfigurationManager.AppSettings["new_p0016"]; /// base.Response.Write("<script language=JavaScript>alert('Application url is not Available')</script>"); // return; } xurl.Value = ti.xurl; xtransid.Value = ti.transID; xamt.Value = ti.amt; xagent.Value = ti.agent; xgt.Value = ti.xgt; xapplicant_name.Value = ti.applicant_name; xapplicant_email.Value = ti.applicant_email; xapplicant_no.Value = ti.applicant_no; xapplicant_addy.Value = ti.applicant_addy; xagent2.Value = ti.agent; xagentname.Value = ti.agentname; xagentemail.Value = ti.agentemail; xagentpnumber.Value = ti.agentpnumber; xproduct_title.Value = ti.product_title; xitem_code.Value = ti.item_code; xpc.Value = ti.pc; xhwalletID.Value = ti.hwalletID; xfee_detailsID.Value = ti.fee_detailsID; } } }