protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["User"] == null) Response.Redirect("Default.aspx");
        this.user = (Person)Session["User"];
        SQLDB sql = new SQLDB();

        if (Request.QueryString["eid"] != null) employee_id = Convert.ToInt32(Request.QueryString["eid"].ToString());
        if (Request.QueryString["rid"] != null) role_id = Convert.ToInt32(Request.QueryString["rid"]);

        string employee_fio = sql.getFIO(employee_id);
        lbTitle.Text = employee_fio + "  " + employee_id;

        string html = "<table class='notes-table'>";

        List<Note> notes = sql.getNotes(employee_id);
        int k = 0;

        foreach (Note note in notes)
        {
            k++;
            string role = "";
            switch (note.RoleID)
            {
                case 1:
                    role = "Табельщик";
                    break;
                case 2:
                    role = "HR";
                    break;
                case 3:
                    role = "Бухгалтер";
                    break;
                default:
                    role = "нет";
                    break;
            }
            html += "<tr><td class='notes-field-num'>" + k.ToString() + "</td><td class='notes-field-fio'><div style='width: 200px; overflow: hidden;'>" + sql.getFIO(Convert.ToInt32(user.TabNum)) + "</div></td><td class='notes-field-date-record'>" + note.DateNote.ToString() + "</td></tr><tr><td class='notes-field-num'>&nbsp;</td><td class='notes-field-fio'>Роль:&nbsp;" + role + "</td><td class='notes-field-date-record'>Срок:&nbsp;" + note.DateExpire.ToString("dd.MM.yyyy") + "</td></tr><tr><td class='notes-field-text' colspan='3'><div>" + note.Text + "</div></td></tr>";
        }

        html += "</table>";

        lbNotes.Text = html;

        string cbReference = Page.ClientScript.GetCallbackEventReference(this, "arg", "ClientBookmarkCallback", "context");
        string func_name = "BookmarkCallback";
        string cbScript = "function " + func_name + "(arg, context)" + "{" + cbReference + ";" + "}";
        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), func_name, cbScript, true);
    }