public List<DishType> GetDishType() { var collectionPhone = new CollectionPhone(); collectionPhone.headDictionary.Add("city", "1"); collectionPhone.dictionary.Add("restaurant", RestaurantId); collectionPhone.dictionary.Add("template", "0"); collectionPhone.PageUrl = PageUrl; var dishFullData = collectionPhone.GetResualt<DishFullData>() ?? new NullDishFullData(); PictureUrl = dishFullData.I; _generalEntityList.AddRange(dishFullData.B); var dishTypeTable = dishFullData.C.Find(x => x.A == 0) ?? new NullDishTypeTable(); var dishTypeInfo = dishTypeTable.D.Find(x => x.B == "01") ?? new NullDishTypeInfo(); return dishTypeInfo.D.Select(GetDishTypeEntity).ToList(); }
protected override List<StorePicture> PicturesBody(StoreInfo storeInfo, BusPhotoAlbum busphotoAlbumTable, string albumType, ref int pageNum) { var collectionPhone = new CollectionPhone(); collectionPhone.PageUrl = GetPageUrl(storeInfo, albumType, pageNum); var sid = GetStoreSid(storeInfo.StorePictureHref); collectionPhone.dictionary.Add("s_id", sid); collectionPhone.dictionary.Add("id", sid); collectionPhone.dictionary.Add("page", pageNum.ToString()); collectionPhone.dictionary.Add("keyword", string.Empty); try { //var location = collectionPhone.GetEpinLeResualt<List<PictureModel>>(); //if (location == null || location.Count <= 0) //{ // pageNum = 500; return new List<StorePicture>(); //} //return SavePicture(storeInfo, location, busphotoAlbumTable); } catch { pageNum = 500; return new List<StorePicture>(); } }
public List<Catalogue> GetPageCatalogue(int poIndex) { var catalogueList = new List<Catalogue>(); var collectionPhone = new CollectionPhone(); collectionPhone.headDictionary.Add("city", "1"); collectionPhone.PageUrl = PageUrl; collectionPhone.dictionary.Add("pageno", PageNum.ToString()); collectionPhone.dictionary.Add("circleid", CircleId.ToString()); collectionPhone.dictionary.Add("City", "1"); collectionPhone.dictionary.Add("pagesize", "20"); var location = collectionPhone.GetResualt<Location>(); if (location == null) { return catalogueList; } PageNum = location.PageNo; PageCount = location.TotalPage; IflastPage = location.IflastPage; foreach (var restaurantinfo in location.RestaurantinfoList) { var catalogue = new Catalogue { FId = restaurantinfo.ID, title = restaurantinfo.CtName, href = string.Empty, LocalTagID = poIndex, StoreId = restaurantinfo.ID, StoreInfo = new Maticsoft.Model.StoreInfo { storeId = restaurantinfo.ID, Fid = restaurantinfo.ID, StoreAddress = restaurantinfo.Ctaddress, StoreName = restaurantinfo.CtName, StorePhone = restaurantinfo.Phone, StoreTag = restaurantinfo.CategoryName, MaxPrice = restaurantinfo.Price, DishesNum = restaurantinfo.DishesNum, MinPrice = 0 } }; catalogue.IsRead = CheckStoreIsRead(restaurantinfo.ID, ref restaurantinfo.ID); catalogueList.Add(catalogue); } return catalogueList; }