public async Task<StatusData<string>> DeleteAwardAndHonor(SingleData<long> request, SystemSession session)
        {
            var serviceRequest = new AwardAndHonor
            {
                UserId = session.UserId,
                Username = session.UserName,
                AwardAndHonorId = request.Data,
                Mode = (byte)SystemDbStatus.Deleted
            };
            var response = await Task.Factory.StartNew(() => Client.UserService.upsertAwardAndHonor(serviceRequest, session.GetSession())).ConfigureAwait(false);

            var result = new StatusData<string> { Status = (SystemDbStatus)response.DbStatus.DbStatusCode, Message = response.DbStatus.DbStatusMsg, SubStatus = response.DbStatus.DbSubStatusCode };

            return result;
        }
Exemplo n.º 2
0
 public void send_upsertAwardAndHonor(AwardAndHonor awardAndHonor, Session session)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("upsertAwardAndHonor", TMessageType.Call, seqid_));
   upsertAwardAndHonor_args args = new upsertAwardAndHonor_args();
   args.AwardAndHonor = awardAndHonor;
   args.Session = session;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
        public async Task<StatusData<string>> UpdateAwardAndHonor(UpdateAwardAndHonorRequest request, SystemSession session)
        {
            var serviceRequest = new AwardAndHonor
            {
                UserId = session.UserId,
                Username = session.UserName,
                Title = request.Title,
                Issuer = request.Issuer,
                Date = request.Date.ToString(),
                Description = request.Description,
                AwardAndHonorId = request.AwardAndHonorId,
                Mode = (byte)SystemDbStatus.Updated,
                UserIdOrName = session.UserName
            };
            var response = await Task.Factory.StartNew(() => Client.UserService.upsertAwardAndHonor(serviceRequest, session.GetSession())).ConfigureAwait(false);

            var result = new StatusData<string> { Status = (SystemDbStatus)response.DbStatus.DbStatusCode, Message = response.DbStatus.DbStatusMsg, SubStatus = response.DbStatus.DbSubStatusCode };

            return result;
        }
Exemplo n.º 4
0
 public IAsyncResult send_upsertAwardAndHonor(AsyncCallback callback, object state, AwardAndHonor awardAndHonor, Session session)
Exemplo n.º 5
0
      public AwardAndHonorResponse upsertAwardAndHonor(AwardAndHonor awardAndHonor, Session session)
      {
        #if !SILVERLIGHT
        send_upsertAwardAndHonor(awardAndHonor, session);
        return recv_upsertAwardAndHonor();

        #else
        var asyncResult = Begin_upsertAwardAndHonor(null, null, awardAndHonor, session);
        return End_upsertAwardAndHonor(asyncResult);

        #endif
      }
Exemplo n.º 6
0
 public IAsyncResult Begin_upsertAwardAndHonor(AsyncCallback callback, object state, AwardAndHonor awardAndHonor, Session session)
 {
   return send_upsertAwardAndHonor(callback, state, awardAndHonor, session);
 }
Exemplo n.º 7
0
 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) {
           AwardAndHonor = new AwardAndHonor();
           AwardAndHonor.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();
 }
Exemplo n.º 8
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 0:
         if (field.Type == TType.List) {
           {
             Success = new List<AwardAndHonor>();
             TList _list204 = iprot.ReadListBegin();
             for( int _i205 = 0; _i205 < _list204.Count; ++_i205)
             {
               AwardAndHonor _elem206;
               _elem206 = new AwardAndHonor();
               _elem206.Read(iprot);
               Success.Add(_elem206);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Ex = new UserException();
           Ex.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.Struct) {
           Se = new SessionException();
           Se.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }