public static RestServiceClientBase GetRestClient(string type) { RestServiceClientBase restClient = null; switch (type) { case "OrganizationRestClient": restClient = new OrganizationRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "PaymentReportsRestClient": restClient = new PaymentReportsRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "OrdersRestClient": restClient = new OrdersRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "ReportsRestClient": restClient = new ReportsRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "ContractsRestClient": restClient = new ContractsRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "PaymentsRestClient": restClient = new PaymentsRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "UserRestClient": restClient = new UserRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "ReferencesRestClient": restClient = new ReferencesRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "SiteRestClient": restClient = new SiteRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "OrdersDocumentsRestClient": restClient = new OrdersDocumentsRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "FlightsRestClient": restClient = new FlightsRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; case "SystemRestClient": restClient = new SystemRestClient(Config.Url, Config.SiteSlug, Config.ApiKey); break; default: throw new Exception("RestClient type was set incorrectly."); } restClient.ImpersonationToken = new ImpersonationToken(Config.UserLogin, Config.UserPassword); return(restClient); }
public string EndGetAllForMenu(IAsyncResult result) { try { return(((ICategoryManager)_core).EndGetAllForMenu(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public ObservableCollection <WinPhoneClientProxy.CategoryManagerService.SelectListItemWithClass> EndGetAllSortedJson(IAsyncResult result) { try { return(((ICategoryManager)_core).EndGetAllSortedJson(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public WinPhoneClientProxy.CategoryManagerService.InCategoryCWPLVM EndGetCategoriesWithProductsInCategory(IAsyncResult result) { try { return(((ICategoryManager)_core).EndGetCategoriesWithProductsInCategory(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public BookBlockPLVM EndGetUsersProducts(IAsyncResult result) { try { return(((IProductManager)_core).EndGetUsersProducts(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public InCategoryPLVM EndGetProductsInCategory(IAsyncResult result) { try { return(((IProductManager)_core).EndGetProductsInCategory(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public BookRowPLVM EndGetFullDetailed(IAsyncResult result) { try { return(((IProductGroupManager)_core).EndGetFullDetailed(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public WinPhoneClientProxy.ProductGroupManagerService.BookBlockPLVM EndSearch(IAsyncResult result) { try { return(((IProductGroupManager)_core).EndSearch(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public InCategoryCWPLVM EndSearchWithGroupedByCategory(IAsyncResult result) { try { return(((IProductGroupManager)_core).EndSearchWithGroupedByCategory(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public ObservableCollection <LabelValuePair> EndSearchAutoComplete(IAsyncResult result) { try { return(((IProductGroupManager)_core).EndSearchAutoComplete(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public string EndSearchAutoCompleteJson(IAsyncResult result) { try { return(((IProductGroupManager)_core).EndSearchAutoCompleteJson(result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } return(null); }
public BookBlockPLVM EndGetUsersProductsByFriendlyUrl(out string userName, IAsyncResult result) { try { return(((IProductManager)_core).EndGetUsersProductsByFriendlyUrl(out userName, result)); } catch (Exception e) { RestServiceClientBase.ShowDefaultErrorMsg(); } userName = ""; return(null); }