コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string returnUrl = Request["ReturnUrl"];
                if (!string.IsNullOrEmpty(returnUrl))
                {
                    if (returnUrl == "/Views/Referred.aspx")
                    {
                        FormsAuthentication.RedirectFromLoginPage("", false);
                        Response.Redirect("Referred.aspx");
                    }
                }


                Session.Contents.RemoveAll();
                FormsAuthentication.SignOut();
                Session.Clear();
                Session["StatusExonerar"] = 0;
                Session["link"]           = "";
                string afiliate = Request["afiliate"];
                string upliner  = Request["upliner"];
                if (!string.IsNullOrEmpty(afiliate) && !string.IsNullOrEmpty(upliner))
                {
                    string data      = afiliate + "|" + upliner;
                    BrUser brUser    = new BrUser();
                    int    idUpliner = brUser.ExistAccountLink(data);
                    if (idUpliner > 0)
                    {
                        Session["Referido"] = afiliate;
                        Session["auxRef"]   = "1";
                        Session["link"]     = data + "|" + idUpliner;
                        FormsAuthentication.RedirectFromLoginPage(afiliate, chkPersistCookie.Checked);
                        Response.Redirect("Register.aspx");
                    }
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BrUser brUser    = new BrUser();
                string returnUrl = Request["ReturnUrl"];

                if (!string.IsNullOrEmpty(returnUrl))
                {
                    this.ReturnUrl = returnUrl;
                }

                if (!string.IsNullOrEmpty(returnUrl))
                {
                    if (returnUrl == "/Views/Referred.aspx")
                    {
                        FormsAuthentication.RedirectFromLoginPage("", false);
                        Response.Redirect("Referred.aspx");
                    }
                }


                Session.Contents.RemoveAll();
                FormsAuthentication.SignOut();
                Session.Clear();
                Session["StatusExonerar"] = 0;
                Session["link"]           = "";
                string afiliate = Request["afiliate"];
                string upliner  = Request["upliner"];

                if (string.IsNullOrEmpty(upliner))
                {
                    upliner = "0";
                }

                if (!string.IsNullOrEmpty(afiliate) && !string.IsNullOrEmpty(upliner))
                {
                    string data = afiliate + "|" + upliner;

                    int idUpliner = brUser.ExistAccountLink(data);
                    if (idUpliner >= 0)
                    {
                        Session["Referido"] = afiliate;
                        Session["auxRef"]   = "1";
                        Session["link"]     = data + "|" + idUpliner;
                        FormsAuthentication.RedirectFromLoginPage(afiliate, chkPersistCookie.Checked);
                        Response.Redirect("Register.aspx");
                    }
                }


                //contador
                BrFundation brFundation = new BrFundation();
                int         contador    = int.Parse(brFundation.GetCount());

                foundingPartners.Text = contador.ToString();
                //foundingPartners2.Text = contador.ToString();



                BrAccount brAccount = new BrAccount();

                bool isRealize = brAccount.DeleteAccountUnconfirmed();
                if (isRealize)
                {
                    Email email = new Email();
                }
            }
        }