gov.va.medora.mdws.ConnectionLib.siteHasPatch C# (CSharp) Method

siteHasPatch() public method

public siteHasPatch ( string patchId ) : TaggedText
patchId string
return gov.va.medora.mdws.dto.TaggedText
        public TaggedText siteHasPatch(string patchId)
        {
            TaggedText result = new TaggedText();
            if (mySession.ConnectionSet.Count == 0 || !mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO(NO_CONNECTIONS);
            }
            else if (String.IsNullOrEmpty(patchId))
            {
                result.fault = new FaultTO("Missing patchId");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                bool f = mySession.ConnectionSet.BaseConnection.hasPatch(patchId);
                result = new TaggedText(mySession.ConnectionSet.BaseConnection.DataSource.SiteId.Id,
                    f == true ? "Y" : "N");
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }