public TiuNoteResult GetNoteWithData(string ien)
        {
            TiuNoteResult result = new TiuNoteResult();

            result = GetNote(ien);

            if (result.Success)
            {
                //DsioGetNoteElementCommand command = new DsioGetNoteElementCommand(this.broker);
                DsioDdcsGetControlValue command = new DsioDdcsGetControlValue(this.broker);

                command.AddCommandArguments(ien);

                RpcResponse response = command.Execute();

                result.Success = (response.Status == RpcResponseStatus.Success);
                result.Message = response.InformationalMessage;

                if (result.Success)
                {
                    result.Note.NoteData = command.NoteData;
                }
            }

            return(result);
        }
        private TiuNoteResult GetDashboardNote(string ien, DsioGetRecordTextMode mode)
        {
            // TODO: Get header information also...

            TiuNoteResult result = new TiuNoteResult();

            if (this.broker != null)
            {
                DsioGetRecordTextCommand command = new DsioGetRecordTextCommand(this.broker);

                command.AddCommandArgument(ien, mode);

                RpcResponse response = command.Execute();

                result.Success = (response.Status == RpcResponseStatus.Success);
                result.Message = response.InformationalMessage;

                if (result.Success)
                {
                    result.Note = new TiuNote()
                    {
                        NoteText = command.RecordText, Ien = ien
                    }
                }
                ;
            }

            return(result);
        }
        public TiuNoteResult GetNoteHeader(string dfn, string noteIen)
        {
            TiuNoteResult result = new TiuNoteResult();

            List <string> titles = new List <string>();

            foreach (object val in Enum.GetValues(typeof(TiuNoteTitle)))
            {
                string title = TiuNoteTitleInfo.TiuNoteTitleText[(int)val];

                if (!string.IsNullOrWhiteSpace(title))
                {
                    titles.Add(title);
                }
            }

            DsioGetTiuNotesCommand command = new DsioGetTiuNotesCommand(this.broker);

            command.AddCommandArguments(dfn, titles.ToArray(), "", "", 1, 1000, false, noteIen, "");

            RpcResponse response = command.Execute();

            result.SetResult(response.Status == RpcResponseStatus.Success, response.InformationalMessage);

            if (result.Success)
            {
                if (command.Notes != null)
                {
                    if (command.Notes.Count > 0)
                    {
                        result.Note = this.GetDashboardNote(command.Notes[0]);
                    }
                }
            }

            return(result);
        }