Exemplo n.º 1
0
    public static void Shop_GetProductCount(string StoreName, string APIKey, string Password, string Vendor = null, string ProductType = null, string PublishedStatus = null)
    {
        ShopifyClient sp = new ShopifyClient(StoreName, APIKey, Password);
        SqlPipe p = SqlContext.Pipe;

        // Create the record and specify the metadata for the columns.
        SqlDataRecord record = new SqlDataRecord(new SqlMetaData("ProductCount", SqlDbType.Int));

        string _v = Vendor != null ? Vendor : "";
        string _pt = ProductType != null ? ProductType : "";
        string _ps = PublishedStatus != null ? PublishedStatus : "";
        // Mark the begining of the result-set.
        SqlContext.Pipe.SendResultsStart(record);
        record.SetInt32(0, sp.GetProductCount(_v, _pt, _ps));

        // Send the row back to the client.
        SqlContext.Pipe.SendResultsRow(record);

        // Mark the end of the result-set.
        SqlContext.Pipe.SendResultsEnd();
    }