Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //Response.AddHeader("Refresh", "9000");
     if (Session["LoginUser"] == null)
     {
         Response.Redirect("frmLogin.aspx");
     }
     if (!IsPostBack)
     {
         lblUserName.Text = "WELCOME " + LoginUser.FirstName + " " + LoginUser.LastName;
         MenuLIVisibility();
         User objUser = UserProfileController.GetUserByID(LoginUser.ID);
         imgProfileImage.ImageUrl = objUser.ProfilePicture;
         //LiVisibility();
     }
 }
 private void BindUserValues()
 {
     try
     {
         User objUser = UserProfileController.GetUserByID(LoginUser.ID);
         imgProfileImageChange.ImageUrl = objUser.ProfilePicture;
         txtFirstName.Text = objUser.FirstName;
         txtLastName.Text  = objUser.LastName;
         txtUsername.Text  = objUser.UserName;
         txtEmail.Text     = objUser.Email;
         txtPassword.Text  = objUser.Password;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.AddHeader("Refresh", "9000");
            if (Session["LoginUser"] == null)
            {
                Response.Redirect("frmLogin.aspx");
            }
            if (!IsPostBack)
            {
                lblUserName.Text = "WELCOME " + LoginUser.FirstName + " " + LoginUser.LastName;

                User objUser = UserProfileController.GetUserByID(LoginUser.ID);
                imgProfileImage.ImageUrl = objUser.ProfilePicture;
                //LiVisibility();
                BindAppoinments();
                BindBirthday();
                BindAnniversary();
                //     BindPresentation();
                BindFollowup();
                //Calendar1.SelectedDate = DateTime.Now;
            }
        }
        private void UpdateUser()
        {
            try
            {
                User objUser = UserProfileController.GetUserByID(LoginUser.ID);
                objUser.FirstName = txtFirstName.Text;
                objUser.LastName  = txtLastName.Text;
                // objUser.username = txtUsername.Text;
                objUser.Email    = txtEmail.Text;
                objUser.Password = txtPassword.Text;
                if (FileUploadControl.HasFile)
                {
                    objUser.ProfilePicture = "~/ProfileImage/" + Path.GetFileName(FileUploadControl.FileName);
                }

                new UsersController().UpdateUser(objUser);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }