示例#1
0
        private int LoadPerson()
        {
            PrivilegeService proxy = Common.Util.CreateProxy();

            try
            {
                IList <string> keys;
                using (proxy as IDisposable)
                {
                    keys = proxy.QueryAppID();
                    foreach (string _key in keys)
                    {
                        IList <Person> collection = proxy.QueryPerson(_key);
                        foreach (Person person in collection)
                        {
                            persons.Add(person);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "提示");
                return(-1);
            }

            return(0);
        }