narsil/Tanshu.Accounts.Repository/PrintLocationBI.cs
2018-08-24 16:11:33 +05:30

29 lines
925 B
C#

using System;
using System.Collections.Generic;
using Tanshu.Accounts.Entities;
using RestSharp;
namespace Tanshu.Accounts.Repository
{
public static class PrintLocationBI
{
public static PrintLocation Get(string location)
{
var request = new RestRequest();
request.Resource = "PrintLocation/{id}.json";
request.AddParameter("id", location, ParameterType.UrlSegment);
return JsonStore.Execute<PrintLocation>(request);
}
public static PrintLocation Get(string location, Guid productGroupID)
{
var request = new RestRequest();
request.Resource = "PrintLocation/{id}.json";
request.AddParameter("id", location, ParameterType.UrlSegment);
request.AddQueryParameter("pg", productGroupID.ToString());
return JsonStore.Execute<PrintLocation>(request);
}
}
}