gov.va.medora.mdws.OrdersLib.getOrderDialogItems C# (CSharp) Method

getOrderDialogItems() public method

public getOrderDialogItems ( string dialogId ) : OrderDialogItemArray
dialogId string
return gov.va.medora.mdws.dto.OrderDialogItemArray
        public OrderDialogItemArray getOrderDialogItems(string dialogId)
        {
            OrderDialogItemArray result = new OrderDialogItemArray();

            if (!(MdwsUtils.isAuthorizedConnection(mySession) == "OK"))
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (String.IsNullOrEmpty(dialogId))
            {
                result.fault = new FaultTO("Empty Dialog ID");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                List<OrderDialogItem> lst = Order.getOrderDialogItems(mySession.ConnectionSet.BaseConnection, dialogId);
                if (lst == null || lst.Count == 0)
                {
                    return result;
                }
                result.items = new OrderDialogItemTO[lst.Count];
                for (int i = 0; i < lst.Count; i++)
                {
                    result.items[i] = new OrderDialogItemTO(lst[i]);
                }
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }
            return result;
        }