private void LocationType(GenericResponse response, int Provincia, int Canton, int Distrito) { catalogInterface = new Catalogs(); if (Provincia == 0 && Canton == 0 && Distrito == 0) { response.results = catalogInterface.GetLocation(LocationDistribution.Provincia); } else if (Provincia > 0 && Canton == 0 && Distrito == 0) { response.results = catalogInterface.GetLocation(LocationDistribution.Canton, Provincia); } else if (Provincia > 0 && Canton > 0 && Distrito == 0) { response.results = catalogInterface.GetLocation(LocationDistribution.Distrito, Provincia, Canton); } else if (Provincia > 0 && Canton > 0 && Distrito > 0) { response.results = catalogInterface.GetLocation(LocationDistribution.Barrio, Provincia, Canton, Distrito); } else { response.results = catalogInterface.GetLocation(LocationDistribution.Provincia); } }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.ICatalogs. /// </param> /// <param name='brand'> /// Required. /// </param> public static ColorItemList GetAllColorByBrand(this ICatalogs operations, string brand) { return(Task.Factory.StartNew((object s) => { return ((ICatalogs)s).GetAllColorByBrandAsync(brand); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.ICatalogs. /// </param> /// <param name='brand'> /// Required. /// </param> /// <param name='keyword'> /// Required. /// </param> /// <param name='page'> /// Optional. /// </param> /// <param name='pagesize'> /// Optional. /// </param> public static SearchResultList Search(this ICatalogs operations, string brand, string keyword, int?page = null, int?pagesize = null) { return(Task.Factory.StartNew((object s) => { return ((ICatalogs)s).SearchAsync(brand, keyword, page, pagesize); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.ICatalogs. /// </param> /// <param name='brand'> /// Required. /// </param> /// <param name='gender'> /// Required. /// </param> /// <param name='collection'> /// Optional. /// </param> /// <param name='category'> /// Optional. /// </param> /// <param name='isnew'> /// Optional. /// </param> /// <param name='fittype'> /// Optional. /// </param> /// <param name='size'> /// Optional. /// </param> /// <param name='color'> /// Optional. /// </param> /// <param name='sort'> /// Optional. /// </param> /// <param name='page'> /// Optional. /// </param> /// <param name='pagesize'> /// Optional. /// </param> public static ProductCatalogList GetProductsAsync(this ICatalogs operations, string brand, string gender, string collection = null, string category = null, string isnew = null, IList <string> fittype = null, IList <string> size = null, IList <string> color = null, string sort = null, int?page = null, int?pagesize = null) { return(Task.Factory.StartNew((object s) => { return ((ICatalogs)s).GetProductsAsyncAsync(brand, gender, collection, category, isnew, fittype, size, color, sort, page, pagesize); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.ICatalogs. /// </param> /// <param name='gender'> /// Required. /// </param> public static SizeItemList GetAllSizeByGender(this ICatalogs operations, string gender) { return(Task.Factory.StartNew((object s) => { return ((ICatalogs)s).GetAllSizeByGenderAsync(gender); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
private void fillBreeds() { ICatalogs cts = Engine.db().catalogs(); Catalog breeds = cts.getBreeds(); cobBreeds.Items.Clear(); cobBreeds.Items.Add("--ВСЕ--"); cobBreeds.SelectedIndex = 0; cbCount.SelectedIndex = 0; foreach (int k in breeds.Keys) { cobBreeds.Items.Add(breeds[k]); } }
public IHttpActionResult GetPaymentMethods() { response = new GenericResponse(); catalogInterface = new Catalogs(); try { response.results = catalogInterface.GetPaymentMethods(); response.status = HttpStatusCode.OK; } catch (Exception ex) { Utils.SetExceptionToResponse(ref response, ex); } return(Ok(JObject.Parse(JsonConvert.SerializeObject(response)))); }
private void fillCatalogs(int what) { ICatalogs cts = Engine.db().catalogs(); _breeds = cts.getBreeds(); fillList(breed, _breeds, _rab.BreedID); _zones = cts.getZones(); if (_rab.BirthPlace == 0) { if (_rab.Zone != 0) { fillList(cbZone, _zones, _rab.Zone); } #if !DEMO } else //если кролик импортирован { ClientsList cl = Engine.db().GetClients(); cbZone.Items.Add(cl.GetName(_rab.BirthPlace)); cbZone.SelectedIndex = 0; #endif } int sx = 0; String end = ""; if (_rab.Sex == Rabbit.SexType.MALE) { sx = 1; } if (_rab.Sex == Rabbit.SexType.FEMALE) { end = "а"; sx = 2; } if (_rab.Group > 1) { end = "ы"; } _surnames = cts.getSurNames(2, end); _secnames = cts.getSurNames(1, end); fillList(surname, _surnames, _rab.SurnameID); fillList(secname, _secnames, _rab.SecnameID); fillNames(sx); }
/// <summary> /// Initializes a new instance of the LandauWebAPI class. /// </summary> /// <param name='rootHandler'> /// Optional. The http client handler used to handle http transport. /// </param> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public LandauWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { this._banners = new Banners(this); this._brands = new Brands(this); this._catalogs = new Catalogs(this); this._colors = new Colors(this); this._contactUs = new ContactUsOperations(this); this._countries = new Countries(this); this._groupOrders = new GroupOrders(this); this._images = new Images(this); this._productImages = new ProductImages(this); this._productReviews = new ProductReviews(this); this._products = new Products(this); this._questions = new Questions(this); this._retailers = new Retailers(this); this._seo = new SeoOperations(this); this._signUps = new SignUps(this); this._states = new States(this); this._swatches = new Swatches(this); this._baseUri = new Uri("http://microsoft-apiapp5dcb282abbf74b72ad1667c2-staging.azurewebsites.net:80"); }
/// <summary> /// Initializes a new instance of the LandauPortalWebAPI class. /// </summary> /// <param name='rootHandler'> /// Optional. The http client handler used to handle http transport. /// </param> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public LandauPortalWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { this._banners = new Banners(this); this._brands = new Brands(this); this._cache = new Cache(this); this._catalogs = new Catalogs(this); this._colors = new Colors(this); this._contactUs = new ContactUsOperations(this); this._countries = new Countries(this); this._emailFavorites = new EmailFavorites(this); this._groupOrders = new GroupOrders(this); this._images = new Images(this); this._productImages = new ProductImages(this); this._productReviews = new ProductReviews(this); this._products = new Products(this); this._questions = new Questions(this); this._retailers = new Retailers(this); this._seo = new SeoOperations(this); this._signUps = new SignUps(this); this._states = new States(this); this._swatches = new Swatches(this); this._baseUri = new Uri(API_ENDPOINT); }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.ICatalogs. /// </param> /// <param name='brand'> /// Required. /// </param> /// <param name='gender'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <CollectionList> GetAllCollectionByBrandAsync(this ICatalogs operations, string brand, string gender, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <ZtherApiIntegration.API.Models.CollectionList> result = await operations.GetAllCollectionByBrandWithOperationResponseAsync(brand, gender, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.ICatalogs. /// </param> /// <param name='brand'> /// Required. /// </param> /// <param name='keyword'> /// Required. /// </param> /// <param name='page'> /// Optional. /// </param> /// <param name='pagesize'> /// Optional. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <SearchResultList> SearchAsync(this ICatalogs operations, string brand, string keyword, int?page = null, int?pagesize = null, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <ZtherApiIntegration.API.Models.SearchResultList> result = await operations.SearchWithOperationResponseAsync(brand, keyword, page, pagesize, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <param name='operations'> /// Reference to the ZtherApiIntegration.API.ICatalogs. /// </param> /// <param name='brand'> /// Required. /// </param> /// <param name='gender'> /// Required. /// </param> /// <param name='collection'> /// Optional. /// </param> /// <param name='category'> /// Optional. /// </param> /// <param name='isnew'> /// Optional. /// </param> /// <param name='fittype'> /// Optional. /// </param> /// <param name='size'> /// Optional. /// </param> /// <param name='color'> /// Optional. /// </param> /// <param name='sort'> /// Optional. /// </param> /// <param name='page'> /// Optional. /// </param> /// <param name='pagesize'> /// Optional. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <ProductCatalogList> GetProductsAsyncAsync(this ICatalogs operations, string brand, string gender, string collection = null, string category = null, string isnew = null, IList <string> fittype = null, IList <string> size = null, IList <string> color = null, string sort = null, int?page = null, int?pagesize = null, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <ZtherApiIntegration.API.Models.ProductCatalogList> result = await operations.GetProductsAsyncWithOperationResponseAsync(brand, gender, collection, category, isnew, fittype, size, color, sort, page, pagesize, cancellationToken).ConfigureAwait(false); return(result.Body); }