Esempio n. 1
0
        public void query(user record)
        {
            ServiceUserClient client = new ServiceUserClient();

            client.queryCompleted += (sender, e) =>
            {
                ServicesEventArgs <user[]> arg = new ServicesEventArgs <user[]>();

                if (e.Error == null)
                {
                    arg.Result   = e.Result;
                    arg.Succesed = true;
                }
                else
                {
                    arg.Succesed = false;
                    arg.Error    = e.Error;
                }
                if (queryCompleted != null)
                {
                    queryCompleted.Invoke(this, arg);
                }
            };
            client.queryAsync(record);
        }