protected void Page_Load(object sender, EventArgs e)
        {
            SL_User serviceUser = new SL_User();

            serviceUser.SetUserTokens();

            Response.Redirect("http://www.snipeagent.com/UserDetails.aspx?authRes=true");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userService"] == null)
                Session["userService"] = new SL_User();

            this.serviceUser = (SL_User)Session["userService"];

            presenter.Initialize(IsPostBack);
        }
 public void GetActiveSnipesTest()
 {
     SL_User target = new SL_User(); // TODO: Initialize to an appropriate value
     List<Snipe> expected = null; // TODO: Initialize to an appropriate value
     List<Snipe> actual;
     actual = target.GetActiveSnipes();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
        public void GetAllSnipesTest()
        {
            SL_User target = new SL_User(); // TODO: Initialize to an appropriate value
            List<Snipe> expected = null; // TODO: Initialize to an appropriate value
            List<Snipe> actual;

            target.UserLogin("Test", "Test", false,0);
            try
            {
                actual = target.GetAllSnipes();
                Assert.AreEqual(true, true);
            }
            catch
            { Assert.AreEqual(false, true);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userService"] == null)
                Session["userService"] = new SL_User();

            userService = (SL_User)Session["userService"];

            if (!Page.IsPostBack)
            {
                foreach (CultureInfo culture in LanguageManager.AvailableCultures)
                {
                    DropDownListLanguages.Items.Add(new System.Web.UI.WebControls.ListItem(culture.NativeName, culture.Name));
                }

                if (DropDownListLanguages.Items.Count == 1)
                    DropDownListLanguages.Items.Add(new System.Web.UI.WebControls.ListItem("Coming soon...", "NA"));

                DropDownListLanguages.SelectedValue = LanguageManager.CurrentCulture.Name;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userService"] == null)
                Session["userService"] = new SL_User();

            this.serviceUser = (SL_User)Session["userService"];

            presenter.Initialize(IsPostBack);

            this.lblComments.Text = String.Empty;

            // Not clean!
            try
            {
                this.GrdVwSnipeList.DataSource = this.userService.GetActiveSnipes();
                this.GrdVwSnipeList.DataBind();

                if (this.GrdVwSnipeList.Rows.Count == 0)
                    this.lblComments.Text = "No snipe to be displayed.<br/>";
            }
            catch
            {
                Navigation navigation = new Navigation();
                navigation.Page = this;
                navigation.NavigateToPage(EnumView.Error, null);
            }
        }
 public void SnipeCreateTest()
 {
     SL_User target = new SL_User(); // TODO: Initialize to an appropriate value
     Snipe _snipe = null; // TODO: Initialize to an appropriate value
     Snipe expected = null; // TODO: Initialize to an appropriate value
     Snipe actual;
     actual = target.SnipeCreate(_snipe);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void UserUpdateTest()
 {
     SL_User target = new SL_User(); // TODO: Initialize to an appropriate value
     User user = null; // TODO: Initialize to an appropriate value
     target.UserSave(user);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void UserLoginTest()
 {
     SL_User target = new SL_User(); // TODO: Initialize to an appropriate value
     string userName = string.Empty; // TODO: Initialize to an appropriate value
     string userPassword = string.Empty; // TODO: Initialize to an appropriate value
     target.UserLogin(userName, userPassword, false, 0);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
 public void UserCreateTest()
 {
     SL_User target = new SL_User(); // TODO: Initialize to an appropriate value
     User user = null; // TODO: Initialize to an appropriate value
     User expected = null; // TODO: Initialize to an appropriate value
     User actual;
     actual = target.UserCreate(user);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void SnipeUpdateTest()
 {
     SL_User target = new SL_User(); // TODO: Initialize to an appropriate value
     Snipe snipe = null; // TODO: Initialize to an appropriate value
     target.SnipeUpdate(snipe);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Exemple #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userService"] == null)
                Session["userService"] = new SL_User();

            userService = (SL_User)Session["userService"];

            presenter.Initialize(IsPostBack);

            this.lblComments.Text = string.Empty;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userService"] == null)
                Session["userService"] = new SL_User();

            this.serviceUser = (SL_User)Session["userService"];

            presenter.Initialize(IsPostBack);
            //this.showSnipeDetails = false;

            //if (Session["SnipeFirstLaunch"] == null)
            //{
            //    presenter.RefreshList();
            //    Session["SnipeFirstLaunch"] = false;
            //}
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["userService"] == null)
                Session["userService"] = new SL_User();

            this.serviceUser = (SL_User)Session["userService"];

            if (this.serviceUser.IsUserLoggedIn && !Page.IsPostBack)
                btnRedirect.Attributes.Add("onclick", "window.open('" + this.presenter.GetTokenUrl() + "');");

            this.txtBoxUserName.Enabled = !this.serviceUser.IsUserLoggedIn;

            string auth = Request.Params["authRes"];

            if (!string.IsNullOrEmpty(auth))
                presenter.SetUserToken(auth);

            string randSubHex = Request.Params["randSubHex"];

            if (!string.IsNullOrEmpty(randSubHex))
                presenter.AddUserSubscription(randSubHex);

            this.btnDisable.Visible = this.serviceUser.IsUserLoggedIn;
            this.lblEBayUserTokenExpirationDate.Visible = this.serviceUser.IsUserLoggedIn;
            this.lblActivityDate.Visible = this.serviceUser.IsUserLoggedIn;
            this.lblEBayUserTokenExpirationDate.Visible = this.serviceUser.IsUserLoggedIn;
            this.lblActivityDateExplaination.Visible = this.serviceUser.IsUserLoggedIn;
            this.lblOptionsExplained.Visible = !this.serviceUser.IsUserLoggedIn;
            this.pnlExtendOptions.Visible = this.serviceUser.IsUserLoggedIn;
            this.lblUserOptionPackEndDate.Visible = this.serviceUser.IsUserLoggedIn;
            this.lblUserOptionPackEndDateExplaination.Visible = this.serviceUser.IsUserLoggedIn;

            if (!IsPostBack)
            {
                btnDisable.Attributes.Add("onclick", string.Format("if(confirm('{0}')){{}}else{{return false}}", Resources.lang.UserDetails_ConfirmDisable));

                this.drpDwnCurrency.DataSource = this.serviceUser.GetCurrencyList();
                this.drpDwnCurrency.DataBind();

                this.DrpDwnSiteID.Items.Clear();

                this.DrpDwnSiteID.DataSource = this.serviceUser.GetSiteList();
                this.DrpDwnSiteID.DataTextField = "Value";
                this.DrpDwnSiteID.DataValueField = "Key";
                this.DrpDwnSiteID.DataBind();
            }

            presenter.Initialize(IsPostBack);

            string reg = Request.Params["reg"];

            if (!string.IsNullOrEmpty(reg))
            {
                this.ConfirmationRegistration = true;
                //this.GetToken = true;
            }

            imgSiteIDHelp.Attributes.Add("title", Resources.lang.UserDetails_SiteIDHelp);
            imgRedirectHelp.Attributes.Add("title", Resources.lang.UserDetails_RedirectHelpHelp);
            imgUpdateHelp.Attributes.Add("title", Resources.lang.UserDetails_UpdateHelpHelp);
        }