Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.cmdSignOut.ServerClick += new System.EventHandler(this.cmdSignOut_ServerClick);

            tempUserList = new List<String>();
            tempController = new Controller.Controller();

            //Hämtar username från session och skriver ut username.
            userN = (string)(Session["userName"]);

            LoggedInUser.Text = "Logged in: " + userN.Remove(1).ToUpper() + userN.Substring(1) + " >> " + tempController.GetUserRole(userN);

            //Hämtar userID från session.

            userID = (int)(Session["userID"]);

            Session["SelectedDrop"] = DropDownListReceivers.SelectedIndex;

            FillDropDownUsers();

            if (!Page.IsPostBack) {
                TextBoxSubject.Text = "Subject..";
            }

            CheckIfReply();
            CheckIfForward();
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.cmdSignOut.ServerClick += new System.EventHandler(this.cmdSignOut_ServerClick);
            tempController = new Controller.Controller();

            //Hämtar username från session och skriver ut username.
            userN = (string)(Session["userName"]);

            LoggedInUser.Text = "Logged in: " + userN.Remove(1).ToUpper() + userN.Substring(1) + " >> " + tempController.GetUserRole(userN);

            userID = tempController.GetUserID(userN);

            Session["userID"] = userID;

            LinkbuttonNewMail.Text = "You have " + CountNewMail().ToString() + " new mail(s).";
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.cmdSignOut.ServerClick += new System.EventHandler(this.cmdSignOut_ServerClick);

            tempController = new Controller.Controller();

            //Hämtar username från session och skriver ut username.
            userN = (string)(Session["userName"]);

            LoggedInUser.Text = "Logged in: " + userN.Remove(1).ToUpper() + userN.Substring(1) + " >> " + tempController.GetUserRole(userN);// tempLoginDB.GetUserRole(userN);

            //Hämtar userID från session.
            userID = (int)(Session["userID"]);
            if (!Page.IsPostBack)
            {
                ShowUserInfo();
            }
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tempCommentDB = new IntranetLibrary.CommentDB();
            tempController = new Controller.Controller();
            tempListComments = new List<IntranetLibrary.Comment>();
            tempListSubcomments = new List<IntranetLibrary.Subcomment>();

            //Hämtar username från session och skriver ut username.
            userN = (string)(Session["userName"]);

            this.Master.SetLoggedIn = "Logged in: " + userN.Remove(1).ToUpper() + userN.Substring(1) + " >> " + tempController.GetUserRole(userN);
            this.Master.SetHeader = "Comments";

            //Hämtar userID från session.
            userID = (int)(Session["userID"]);

            FillGridViewComments();
        }
Пример #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.cmdSignOut.ServerClick += new System.EventHandler(this.cmdSignOut_ServerClick);
            tempController = new Controller.Controller();

            tempSentMailList = new List<IntranetLibrary.Mail>();
            tempMessageIdList = new List<int>();

            //Hämtar username från session och skriver ut username.
            userN = (string)(Session["userName"]);

            LoggedInUser.Text = "Logged in: " + userN.Remove(1).ToUpper() + userN.Substring(1) + " >> " + tempController.GetUserRole(userN);// tempLoginDB.GetUserRole(userN);

            //Hämtar userID från session.
            userID = (int)(Session["userID"]);

            FillGridViewWithSentMail(userN);

            CheckIfDBReturnsSentMail();

            selectedIndexMail = GridView1.SelectedIndex;

            if (Request["DeletedSucessfully"] == "Yes")
            {
                LabelEmptyInbox.Visible = true;
                LabelEmptyInbox.Text = "Your message was sucessfully deleted.";
            }
            else {

            }
        }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.cmdSignOut.ServerClick += new System.EventHandler(this.cmdSignOut_ServerClick);

            tempMailList = new List<IntranetLibrary.Mail>();
            tempController = new Controller.Controller();

            //Hämtar username från session och skriver ut username.
            userN = (string)(Session["userName"]);

            LoggedInUser.Text = "Logged in: " + userN.Remove(1).ToUpper() + userN.Substring(1) + " >> " + tempController.GetUserRole(userN);// tempLoginDB.GetUserRole(userN);

            //Hämtar userID från session.
            userID = (int)(Session["userID"]);

            FillGridViewWithMail(userN);

            CheckIfDBReturnsMail();
            DisplayNewMailMessage();
        }