Exemple #1
0
        public void TestCreateAddendum()
        {
            using (RpcBroker broker = GetConnectedBroker())
            {
                this.SignonToBroker(broker, 2);

                DsioCreateANoteCommand commandCreate = new DsioCreateANoteCommand(broker);

                commandCreate.AddCommandArguments(patDfn, "MCC DASHBOARD NOTE", "Note text for Friday", "test subject", new DsioNoteData(), "");

                RpcResponse response = commandCreate.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);

                DsioMakeAddendumCommand command = new DsioMakeAddendumCommand(broker);

                command.AddCommandArguments(commandCreate.Ien, "This is an addendum for Saturday", "test subject", new DsioNoteData());

                response = command.Execute();

                Assert.AreEqual(RpcResponseStatus.Success, response.Status);
            }
        }
        public BrokerOperationResult CreateAddendum(string ien, string noteText, string subject, Dictionary <string, string> noteData)
        {
            BrokerOperationResult returnResult = new BrokerOperationResult();

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

                command.AddCommandArguments(ien, noteText, subject, noteData);

                RpcResponse response = command.Execute();

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

                if (response.InformationalMessage.Equals("Unable to assemble XWB broker message: Attempted to L-Pack a string longer than 999 characters.", StringComparison.CurrentCultureIgnoreCase))
                {
                    returnResult.Message = "Individual lines within a note must be less than 1000 characters.";
                }
            }

            return(returnResult);
        }