Exemplo n.º 1
0
        private void getUserInfo(Guid guid, Panel TaskContent)
        {
            var userBusinessObj = new BusinessLayer.UserBusinessObjects();

            _user = userBusinessObj.GetUserById(guid);
            System.Diagnostics.Debug.Write("User Info:" + _user.firstName + _user.lastName + _user.email + _user.image);
            Image TaskCreatorImage = new Image();

            TaskCreatorImage.CssClass = "place-right";
            TaskCreatorImage.Attributes.Add("style", "background-color:#fff;");
            TaskCreatorImage.Height   = 80;
            TaskCreatorImage.Width    = 80;
            TaskCreatorImage.ImageUrl = _user.image;
            TaskContent.Controls.Add(TaskCreatorImage);

            Literal userNameText = new Literal();

            userNameText.Text = "<h4 class=\"fg-color-white\">" + _user.firstName + " " + _user.lastName + "</h4>";
            TaskContent.Controls.Add(userNameText);

            Literal descTask = new Literal();

            descTask.Text = "<p class=\"fg-color-white\">" + taskDescription + "</p>";
            TaskContent.Controls.Add(descTask);

            Literal userEmail = new Literal();

            userEmail.Text = "<h5 class=\"fg-color-white\">" + _user.email + "</h5>";
            TaskContent.Controls.Add(userEmail);
        }
Exemplo n.º 2
0
 void Page_PreInit(object sender, EventArgs e)
 {
     if (Session["LoggedIn"] != null)
     {
         userId = (Guid)Session["UserId"];
         var userobj = new BusinessLayer.UserBusinessObjects();
         _currentUser = userobj.GetUserById(userId);
     }
     else
     {
         MasterPageFile = "~/uBuoyMasterNA.Master";
     }
 }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["LoggedIn"] != null)
            {
                var userId  = (Guid)Session["UserId"];
                var userobj = new BusinessLayer.UserBusinessObjects();
                _currentUser = userobj.GetUserById(userId);

                // to get users information in profile page
                //userInfoForProfile();

                //to get users information for users own information
                //userInfo();

                //constructor for user project business object
                var userProject = new BusinessLayer.UserProjectBusinessObjects();

                //constructor for user Module business object
                var userModule = new BusinessLayer.UserModulesBusinessObjects();

                //for getting projects in which a user is involved
                userProjects = userProject.GetUserProjectsById(_currentUser.userId);

                // for getting all projects in which user is involved
                getUserProject(userProjects);

                //for creating panel for Add a project
                //tileGroupProject.Controls.Add(projDynamicCreation.addProject());

                //for getting modules in which a user is involved
                userModules = userModule.GetUserModuleByUserId(_currentUser.userId);

                //for getting individual module of user
                getUserModule(userModules);


                Page.Title = _currentUser.firstName + " " + _currentUser.lastName;
            }
            else
            {
                Response.Redirect("~/Login.aspx");
            }
        }