コード例 #1
0
ファイル: UserX.master.cs プロジェクト: justsilencia/folio
    protected void Page_Load(object sender, EventArgs e)
    {
        ThisUserName.Text          = Profile.UserName;
        MenuLinkHome.NavigateUrl   = "~/MyProfile/MyProfile.aspx";
        MenuLinkSearch.NavigateUrl = "~/Search/SearchHome.aspx";
        if (Profile.IsValidated != true)
        {
            UserControl ucx = (UserControl)LoadControl("~/Controls/ProfileIncomplete.ascx");
            cpMainContent.Controls.AddAt(0, ucx);
        }

        MessageClass mc     = new MessageClass();
        int          msgNum = mc.CheckNewMessages(Profile.UserName);

        if (msgNum > 0)
        {
            MsgNumNotice.Visible     = true;
            MsgNumNotice.Text        = msgNum.ToString();
            MobMsgNumNotice1.Visible = true;
            MobMsgNumNotice1.Text    = " " + msgNum.ToString();
            MobMsgNumNotice2.Visible = true;
            MobMsgNumNotice2.Text    = msgNum.ToString();
        }

        YearLabel.Text  = Convert.ToString(DateTime.Now.Year);
        EmailLabel.Text = Profile.EMail;
    }
コード例 #2
0
    public int CheckMessages(string user)
    {
        int          msgNum;
        MessageClass mc = new MessageClass();

        msgNum = mc.CheckNewMessages(user);
        return(msgNum);
    }