public async Task<IEnumerable<EmployeeRatingViewResponse>> GetEmployeeRating(EmployeeRatingViewRequest request, SystemSession session) { var serviceRequest = new EmployeeRatings { UserId = request.TargetUserId, EmployeeIds = request.EmployeeId != null ? string.Join(",", request.EmployeeId) : null, Rating = request.Rating }; var response = await Task.Factory.StartNew(() => Client.UserService.getEmployeeRatings(serviceRequest, session.GetSession())).ConfigureAwait(false); var result = response.Select(x => new EmployeeRatingViewResponse { CompanyUserRatingId = x.CompanyUserRatingId, User = new UserResponse { UserId = x.UserId, UserName = x.Username, Name = x.Name, Picture = x.Picture }, Rating = x.Rating, Added = x.AddedDate != null ? Convert.ToDateTime(x.AddedDate) : (DateTime?)null, Positon = x.Position }); return result; }
public void send_getEmployeeRatings(EmployeeRatings employeeRatings, Session session) #endif { oprot_.WriteMessageBegin(new TMessage("getEmployeeRatings", TMessageType.Call, seqid_)); getEmployeeRatings_args args = new getEmployeeRatings_args(); args.EmployeeRatings = employeeRatings; args.Session = session; args.Write(oprot_); oprot_.WriteMessageEnd(); #if SILVERLIGHT return oprot_.Transport.BeginFlush(callback, state); #else oprot_.Transport.Flush(); #endif }
public IAsyncResult send_getEmployeeRatings(AsyncCallback callback, object state, EmployeeRatings employeeRatings, Session session)
public List<EmployeeRatingResponse> getEmployeeRatings(EmployeeRatings employeeRatings, Session session) { #if !SILVERLIGHT send_getEmployeeRatings(employeeRatings, session); return recv_getEmployeeRatings(); #else var asyncResult = Begin_getEmployeeRatings(null, null, employeeRatings, session); return End_getEmployeeRatings(asyncResult); #endif }
public IAsyncResult Begin_getEmployeeRatings(AsyncCallback callback, object state, EmployeeRatings employeeRatings, Session session) { return send_getEmployeeRatings(callback, state, employeeRatings, 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) { EmployeeRatings = new EmployeeRatings(); EmployeeRatings.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(); }