protected void OnOpenNote(object sender, EventArgs arg)
    {
        CalendarItem item    = (CalendarItem)sender;
        NoteDlg      frmNote = new NoteDlg(item.id);

        frmNote.Show();
        if ((ResponseType)frmNote.Run() == ResponseType.Ok)
        {
            item.Calendar.RefreshOrders();
        }
        frmNote.Destroy();
    }
    protected void OnNewNote(object sender, NewNoteEventArgs arg)
    {
        NoteDlg frmNote = new NoteDlg(arg.PointNumber, arg.CalendarNumber, arg.Date);

        frmNote.Show();
        int result = frmNote.Run();

        if (result == (int)ResponseType.Ok)
        {
            ((OrdersCalendar)sender).RefreshOrders();
        }
        frmNote.Destroy();
    }