コード例 #1
0
        public TaggedUserArrays getStaffByCriteria(string siteCode, string searchTerm, string firstName, string lastName, string type)
        {
            TaggedUserArrays result = new TaggedUserArrays();

            if (!mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connection not established or authorized");
            }
            else if (String.IsNullOrEmpty(type))
            {
                result.fault = new FaultTO("Missing type of search {email, phone, firstAndLast, firstOrLast}");
            }
            else if (String.IsNullOrEmpty(siteCode))
            {
                result.fault = new FaultTO("Missing siteCode");
            }
            if (result.fault != null)
            {
                return(result);
            }

            try
            {
                IndexedHashtable ht = ClinicalApi.getStaffByCriteria(mySession.ConnectionSet, siteCode, searchTerm, firstName, lastName, type);
                result = new TaggedUserArrays(ht);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }

            return(result);
        }
コード例 #2
0
ファイル: UserLib.cs プロジェクト: govtmirror/RAPTOR-1
        // DON'T SEE A USERLOOKUPBYNAME FUNCTION ON USERAPI
        public TaggedUserArrays lookupMS(string target, string maxRex)
        {
            TaggedUserArrays result = new TaggedUserArrays();
            string           msg    = MdwsUtils.isAuthorizedConnection(mySession);

            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            else if (target == "")
            {
                result.fault = new FaultTO("Missing target");
            }
            //else if (!StringUtils.isNumeric(maxRex))
            //{
            //    result.fault = new FaultTO("Non-numeric maxRex");
            //}
            if (result.fault != null)
            {
                return(result);
            }

            try
            {
                KeyValuePair <string, string> kvp = new KeyValuePair <string, string>("NAME", target);
                UserApi          api = new UserApi();
                IndexedHashtable t   = api.userLookup(mySession.ConnectionSet, kvp, maxRex);
                result = new TaggedUserArrays(t);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return(result);
        }
コード例 #3
0
ファイル: UserLib.cs プロジェクト: OSEHRA/mdws
        // DON'T SEE A USERLOOKUPBYNAME FUNCTION ON USERAPI
        public TaggedUserArrays lookupMS(string target, string maxRex)
        {
            TaggedUserArrays result = new TaggedUserArrays();
            string msg = MdwsUtils.isAuthorizedConnection(mySession);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            else if (target == "")
            {
                result.fault = new FaultTO("Missing target");
            }
            //else if (!StringUtils.isNumeric(maxRex))
            //{
            //    result.fault = new FaultTO("Non-numeric maxRex");
            //}
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                KeyValuePair<string, string> kvp = new KeyValuePair<string, string>("NAME",target);
                UserApi api = new UserApi();
                IndexedHashtable t = api.userLookup(mySession.ConnectionSet, kvp, maxRex);
                result = new TaggedUserArrays(t);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }