Пример #1
0
        /// <summary>
        /// Handles the Click event of the Submit control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Submit_Click(object sender, EventArgs e)
        {
            if (!IsValid)
            {
                return;
            }

            //store new user information to database
            UserService service = new UserService();
            User        user    = service.GetByID(UserID);

            ProfileControl1.FillUser(user);
            service.Update(user);
        }
Пример #2
0
        /// <summary>
        /// Handles the Click event of the SubmitButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            StatusLabel.Visible = false;
            if (!Page.IsValid)
            {
                return;
            }

            ProfileControl1.FillUser(Global.LoggedInUser);

            UserService service = new UserService();

            service.Update(Global.LoggedInUser);

            StatusLabel.Text    = "Your profile has been updated.";
            StatusLabel.Visible = true;
        }
Пример #3
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            if (!IsValid)
            {
                return;
            }

            UserRole role = (UserRole)Enum.Parse(typeof(UserRole), ProfileControl1.Security);
            User     user = new User(role, ProfileControl1.Username, ProfileControl1.NewPassword1);

            ProfileControl1.FillUser(user);

            UserService userService = new UserService();

            userService.Insert(user);

            RegisterPanel.Visible = false;

            StatusLabel.Text = "Thank you for registering.  Your account will be reviewed soon.";
        }