public virtual async Task<StatusData<string>> RespondEmploymentRequest(RespondEmploymentRequest request,
            SystemSession session)
        {
            var serviceRequest = new EmploymentRequest
            {
                UserId = session.UserId,
                TargetUsers = request.TargetUser,
                Accepted = request.IsAccepted
            };

            var response =
                (await
                    Task.Factory.StartNew(
                        () => Client.UserService.respondEmpoymentRequest(serviceRequest, session.GetSession()))
                        .ConfigureAwait(false));

            var data = new StatusData<string>
            {
                Status = (SystemDbStatus)response.DbStatus.DbStatusCode,
                Message = response.DbStatus.DbStatusMsg,
                SubStatus = response.DbStatus.DbSubStatusCode
            };
            return data;
        }
 public void send_respondEmpoymentRequest(EmploymentRequest employmentRequest, Session session)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("respondEmpoymentRequest", TMessageType.Call, seqid_));
   respondEmpoymentRequest_args args = new respondEmpoymentRequest_args();
   args.EmploymentRequest = employmentRequest;
   args.Session = session;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
 public IAsyncResult send_respondEmpoymentRequest(AsyncCallback callback, object state, EmploymentRequest employmentRequest, Session session)
      public EmploymentRequestResponse respondEmpoymentRequest(EmploymentRequest employmentRequest, Session session)
      {
        #if !SILVERLIGHT
        send_respondEmpoymentRequest(employmentRequest, session);
        return recv_respondEmpoymentRequest();

        #else
        var asyncResult = Begin_respondEmpoymentRequest(null, null, employmentRequest, session);
        return End_respondEmpoymentRequest(asyncResult);

        #endif
      }
 public IAsyncResult Begin_respondEmpoymentRequest(AsyncCallback callback, object state, EmploymentRequest employmentRequest, Session session)
 {
   return send_respondEmpoymentRequest(callback, state, employmentRequest, session);
 }
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.Struct) {
           EmploymentRequest = new EmploymentRequest();
           EmploymentRequest.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Session = new Session();
           Session.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }