Пример #1
0
 private static List<DataContracts.Product> GetProducts(IEnumerable<int> productIDs)
 {
     GetProductsClient client = new GetProductsClient();
     DataContracts.Requests.ProductRequest req = new DataContracts.Requests.ProductRequest();
     req.ProductIDs = new List<int>(productIDs);
     req.DisplayAll = false;
     DataContracts.Responses.ProductResponse resp = client.GetProducts(req);
     return new List<DataContracts.Product>(resp.Products);
 }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GetProductsClient client = new GetProductsClient();
        DS.DataContracts.Requests.ProductRequest request = new DS.DataContracts.Requests.ProductRequest();
        request.ProductIDs = new List<int>();
        request.DisplayAll = true;
        DS.DataContracts.Responses.ProductResponse response = client.GetProducts(request);
        gvProducts.DataSource = BuildProductDataTable(response.Products);
        gvProducts.DataBind();

        PreformCartAction();
    }