protected void loadNewSelection(object sender, EventArgs e) { if (theList.SelectedItem.Value.Length > 1) { Session["dropDownIndex"] = theList.SelectedIndex; } else { //set it back to whatever it was because we are not allowed to pick 0 on the drop down list, that is reserved for Select Store To Manage theList.SelectedIndex = Convert.ToInt16(Session["dropDownIndex"]); } StoreInformationServer l_Store = null; if (Convert.ToInt16(Session["dropDownIndex"].ToString()) == 1) { if (c_Children.Count >= 1) { l_Store = c_Parent; } else { l_Store = (StoreInformationServer)c_Children[Convert.ToInt16(Session["dropDownIndex"].ToString()) - 1]; } } else { l_Store = (StoreInformationServer)c_Children[Convert.ToInt16(Session["dropDownIndex"].ToString()) - 2]; } //select the correct picked index from the drop down list theList.SelectedIndex = Convert.ToInt16(Session["dropDownIndex"]); c_CurrentStore = l_Store; g_istoreid = c_CurrentStore.StoreID; }
protected void Page_Load(object sender, EventArgs e) { CBQ.Globals.StoreInfo.StoreID = 1234; //98704079;// 1234;// 95465330;//1234; CBQ.Globals.StoreInfo.StorePassword = "******"; //"z253d7xgt9";//"5678";// "965833X5U3";//"5678"; DMP.Secure.HideMessages = true; if (Session["parent"] == null) { //Lost session state, go back to login Response.Redirect("loginnew.aspx"); } else { //load session data into class objects c_Parent = global.GetParent(); c_Children = global.GetChildren(); } if (c_CurrentStore == null) { handleMultiAccountLogin(); } if (c_CurrentStore != null) { lbl_Merch_Name.Text = c_CurrentStore.StoreName; g_istoreid = c_CurrentStore.StoreID; } if (!IsPostBack) { } }
protected void Page_Load(object sender, EventArgs e) { CBQ.Globals.StoreInfo.StoreID = 1234; //98704079;// 1234;// 95465330;//1234; CBQ.Globals.StoreInfo.StorePassword = "******"; //"z253d7xgt9";//"5678";// "965833X5U3";//"5678"; DMP.Secure.HideMessages = true; if (Session["parent"] == null) { //Lost session state, go back to login Response.Redirect("loginnew.aspx"); } else { //load session data into class objects c_Parent = global.GetParent(); c_Children = global.GetChildren(); } if (c_CurrentStore == null) { handleMultiAccountLogin(); } if (c_CurrentStore != null) { g_StoreID = Convert.ToUInt32(c_CurrentStore.StoreID); if (!IsPostBack) { lbl_Merch_Name.Text = c_CurrentStore.StoreName; Session["CampaignID"] = -1; } } if (Session["CloverToken"] != null) { hl_signout.Visible = false; hl_RegisterCustomer.Visible = true; hl_redeem.Visible = false; } GetCampaigns(); }
protected void loadNewSelection(object sender, EventArgs e) { if (theList.SelectedItem.Value.Length > 1) { Session["dropDownIndex"] = theList.SelectedIndex; } else { //set it back to whatever it was because we are not allowed to pick 0 on the drop down list, that is reserved for Select Store To Manage theList.SelectedIndex = Convert.ToInt16(Session["dropDownIndex"]); } StoreInformationServer l_Store = null; if (Convert.ToInt16(Session["dropDownIndex"].ToString()) == 1) { if (c_Children.Count >= 1) { l_Store = c_Parent; } else { l_Store = (StoreInformationServer)c_Children[Convert.ToInt16(Session["dropDownIndex"].ToString()) - 1]; } } else { //This used to just be the below, but now we have this whole construct to handle what if the parent is selected //minus 2 because we put one more item in this list, the parent. l_Store = (StoreInformationServer)c_Children[Convert.ToInt16(Session["dropDownIndex"].ToString()) - 2]; } //select the correct picked index from the drop down list theList.SelectedIndex = Convert.ToInt16(Session["dropDownIndex"]); c_CurrentStore = l_Store; lbl_Merch_Name.Text = c_CurrentStore.StoreName; GetCampaigns(); }
protected void handleMultiAccountLogin() { // This code is handled centrally in the global.cs class. c_CurrentStore = global.StoreDropDownList_Populate(theList, c_Parent, c_Children); }
void getStoreInfo() { //server side field validation totr ensure not too long or \ //pw not over 25, greater than 5 characters, alphanumberic only letter and number plus string l_strEmail = usernamefield.Text; string l_strPassword = passwordfield.Text; string l_strError = ""; errorLabel.Text = ""; bool l_bValid = false; if (CyberpassReg.VerifyEmail(l_strEmail, out l_strError)) { if (CyberpassReg.VerifyPassword(l_strPassword, out l_strError)) { l_bValid = true; } } if (l_bValid) { //login in the member. If they don't have a parent store, create one. Then save the ManageStore object to the session if (c_ManageStore.Login(usernamefield.Text, passwordfield.Text) == true) { Session["UserNameField"] = usernamefield.Text; Session["PasswordField"] = passwordfield.Text; // Initialize the BrandBuilder object for use with the Subscription Plan code <CarlB 08-01-2018> BackOffice l_BackOffice = new BackOffice(""); if (l_BackOffice.Login(Session["UserNameField"].ToString(), Session["PasswordField"].ToString()) == true) { Session["BackOffice"] = l_BackOffice.BrandBuilderInfo.Serialize(); } else { Session["BackOffice"] = null; } c_Parents = c_ManageStore.StoreInfo.StoreInfoList; if (c_Parents.Count > 0) { //It worked if (c_Parents.Count > 1) { //they need to pick what parent they would like to manage global.SaveManageStore(c_ManageStore.StoreInfo); } else { StoreInformationServer l_Parent = (CBQ.StoreInformationServer)c_Parents[0]; Session["parent"] = l_Parent.Serialize(); //might be a better place for this. This should be the only place this happens, but might want to put this out at global //this really needs to pull from the database so we will do that instead, using parameterized queries of course if (l_Parent.SalesAgentID == "palmetto01") { Session["partnerID"] = "1"; handleBrand(); } else if (l_Parent.SalesAgentID == "ignite01") { Session["partnerID"] = "2"; handleBrand(); } else if (l_Parent.SalesAgentID == "cbq") { Session["partnerID"] = "0"; handleBrand(); } else if (l_Parent.SalesAgentID == "blackstone01") { Session["partnerID"] = "3"; handleBrand(); } else if (l_Parent.SalesAgentID == "vantiv01") { Session["partnerID"] = "4"; handleBrand(); } else if (l_Parent.SalesAgentID == "globalpayments01") { Session["partnerID"] = "5"; handleBrand(); } else if (l_Parent.SalesAgentID == "usacard01") { Session["partnerID"] = "6"; handleBrand(); } global.SaveManageStore(c_ManageStore.StoreInfo); } } else { l_strError = "Your Login Is Correct But There Was An Error Generating Your Store. Please Contact Us."; showError(l_strError); } } else { l_strError = "Your Login Information is Incorrect. Please Try Again."; showError(l_strError); } } else { //display an error. message is in l_strError showError(l_strError); } }