예제 #1
0
        protected override void OnLoad(EventArgs e)
        {
            if (!IsPostBack){

                enterAddress.Visible = true;
                confirmAddress.Visible = false;

                ProcessFlow.AccountController accountController = new ProcessFlow.AccountController();

                AccountInfo myAccount = accountController.GetAccountInfo(true);

                if (myAccount != null){
                    Account account = new Account();
                    billAddr.Address = account.GetAddress(myAccount.UserId);
                }
            }
        }
예제 #2
0
        override protected void OnLoad(EventArgs e)
        {
            if (!IsPostBack)
            {
                enterAddress.Visible   = true;
                confirmAddress.Visible = false;

                ProcessFlow.AccountController accountController = new ProcessFlow.AccountController();

                AccountInfo myAccount = accountController.GetAccountInfo(true);

                if (myAccount != null)
                {
                    AccountBO account = new AccountBO();
                    billAddr.Address = account.GetAddress(myAccount.UserId);
                }
            }
        }
예제 #3
0
        override protected void OnLoad(EventArgs e)
        {
            if (!IsPostBack)
            {
                ProcessFlow.AccountController accountController = new ProcessFlow.AccountController();

                // Retrieve the account information from the account controller
                AccountInfo myAccount = accountController.GetAccountInfo(true);

                lblUserId.Text        = myAccount.UserId;
                txtEmail.Text         = myAccount.Email;
                addr.Address          = myAccount.Address;
                prefs.Language        = myAccount.Language;
                prefs.Category        = myAccount.Category;
                prefs.IsShowBanners   = myAccount.IsShowBanners;
                prefs.IsShowFavorites = myAccount.IsShowFavorites;
            }
        }
예제 #4
0
        protected override void OnLoad(EventArgs e)
        {
            if (!IsPostBack) {

                ProcessFlow.AccountController accountController = new ProcessFlow.AccountController();

                // Retrieve the account information from the account controller
                AccountInfo myAccount = accountController.GetAccountInfo(true);

                lblUserId.Text = myAccount.UserId;
                txtEmail.Text = myAccount.Email;
                addr.Address = myAccount.Address;
                prefs.Language = myAccount.Language;
                prefs.Category = myAccount.Category;
                prefs.IsShowBanners = myAccount.IsShowBanners;
                prefs.IsShowFavorites = myAccount.IsShowFavorites;
            }
        }
예제 #5
0
        protected void SubmitClicked(object sender, ImageClickEventArgs e)
        {
            if (Page.IsValid)
            {
                ProcessFlow.AccountController accountController = new ProcessFlow.AccountController();

                // Retrieve the account information from the account controller
                AccountInfo myAccount = accountController.GetAccountInfo(true);

                // Merge in the changes
                string      email         = WebComponents.CleanString.InputText(txtEmail.Text, 50);
                AddressInfo address       = addr.Address;
                string      language      = prefs.Language;
                string      favCategory   = prefs.Category;
                bool        showFavorites = prefs.IsShowFavorites;
                bool        showBanners   = prefs.IsShowBanners;

                AccountInfo updatedAccountInfo = new AccountInfo(myAccount.UserId, myAccount.Password, email, address, language, favCategory, showFavorites, showBanners);

                // Submit the changes back to the controller
                accountController.UpdateAccount(updatedAccountInfo);
            }
        }
예제 #6
0
        protected void SubmitClicked(object sender, ImageClickEventArgs e)
        {
            if (Page.IsValid) {

                ProcessFlow.AccountController accountController = new ProcessFlow.AccountController();

                // Retrieve the account information from the account controller
                AccountInfo myAccount = accountController.GetAccountInfo(true);

                // Merge in the changes
                string email = WebComponents.CleanString.InputText(txtEmail.Text, 50);
                AddressInfo address = addr.Address;
                string language = prefs.Language;
                string favCategory = prefs.Category;
                bool showFavorites = prefs.IsShowFavorites;
                bool showBanners = prefs.IsShowBanners;

                AccountInfo updatedAccountInfo = new AccountInfo(myAccount.UserId, myAccount.Password, email, address, language, favCategory, showFavorites, showBanners);

                // Submit the changes back to the controller
                accountController.UpdateAccount(updatedAccountInfo);
            }
        }