Exemplo n.º 1
0
 public static PurchaseOrderCollection GetByQuery(string query, GenieLamp.Examples.QuickStart.Services.Interfaces.ServicesQueryParams queryParams, int pageNum = 0, int pageSize = 300)
 {
     GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderRequest request = new GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderRequest();
     request.Gl_Query       = query;
     request.Gl_QueryParams = queryParams;
     request.Gl_PageNum     = pageNum;
     request.Gl_PageSize    = pageSize;
     GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderListResponse response =
         WebClientFactory.GetJsonClient()
         .Post <GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderListResponse>("/PurchaseOrderService", request);
     WebClientFactory.CheckResponseStatus(response.ResponseStatus);
     return(new PurchaseOrderCollection(response.PurchaseOrderDTOList));
 }
Exemplo n.º 2
0
 public static PurchaseOrderCollection GetCollectionByCustomerId(int customerId)
 {
     GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderRequest      request  = new GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderRequest();
     GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderListResponse response = WebClientFactory.GetJsonClient()
                                                                                                       .Get <GenieLamp.Examples.QuickStart.Services.Interfaces.QuickStart.PurchaseOrderListResponse>(String.Format("/PurchaseOrderService/CustomerId/{0}", customerId));
     WebClientFactory.CheckResponseStatus(response.ResponseStatus);
     return(new PurchaseOrderCollection(response.PurchaseOrderDTOList));
 }