C# Класс Spontaneous.WebApp.Services.ServiceLayerImpl

Наследование: IServicesLayer, IBackofficeService
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddCouponToDB ( CouponType coupon ) : string
AddGeneralDishToDB ( GeneralDish generalDish ) : string
AddNewDish ( DishModel dish ) : int
AddNewDishBasic ( string restId, int menuPartId, Dish dish ) : int
AddNewMenuPartBasic ( string restaurantId, MenuPart menuPart ) : int
AddNewMenuPartModel ( MenuPartModel MenuPart ) : int
AddNewRestaurantFromOsmRest ( RestaurantOsm osmRest ) : void

Add conver RestaurantOsm to RestaurantBasicData and Add new rest to DB

AddRestaurantBasicToDB ( RestaurantBasicData restaurant ) : string
AddRestaurantToDB ( RestaurantModel restaurantmodel ) : string
ApproveMeal ( IEnumerable meal ) : void
BasicRestApproveMeal ( List portions ) : void
CalculateDistanceInKm ( LocationModel location1, LocationModel location2 ) : double
CalculateDistanceInRad ( LocationModel location1, LocationModel location2 ) : double
CompareAllOsmRestaurantsWithDB ( ) : RestaurantsCompareList

Compare all existing OSM restaurants in ImportedRestaurantsDB with all RestaurantBasicData in main DB in CompareList in ImportedRestaurantsDB

CompareRestaurantsNames ( string rest1Name, string rest2Name ) : bool

Compare existing restaurants in DB with new Open Street Map restaurant list (by calling FindSimilarRestaurants

CopySelectedDishes ( CopyList copyList ) : void
CopySelectedMemuParts ( CopyList copyList ) : void
DeleteCoupon ( string id ) : void
DeleteDish ( DishModel Dish ) : void
DeleteGeneralDish ( string id ) : void
DeleteMenuPart ( MenuPartModel MenuPart ) : void
DeleteRestaurant ( string id ) : void
FindSimilarRestaurants ( ) : RestaurantsCompareList
GetAllCoupons ( ) : List
GetAllGeneralDishes ( ) : List
GetAllGeneralDishesOrderBy ( ) : List
GetAllIngredients ( ) : List
GetAllRestaurants ( bool withMenu = true ) : List
GetAllRestaurantsBasic ( ) : List
GetAllRestaurantsBasicSortedBy ( string sortFiled, int limit = 50 ) : List
GetAllRestaurantsInStringList ( ) : List
GetChainRestaurantsBasicByName ( string name ) : List
GetClosesMedal ( ) : MedalProgress
GetCoupon ( SpontaneousUserModel userData, UserActivity userActivity ) : CouponType
GetCouponById ( string couponId ) : CouponType
GetCouponModelById ( string couponId ) : CouponTypeModel
GetDefaultItems ( System.Web.Security.MembershipUser currentUser, Location userLocation ) : IList
GetDish ( System.Guid dishId ) : DishModel

Gets dish by unique Id.

GetDish ( int MenuPartId, string RestaurantId, int Id, string lang = DefaultLang, RestaurantModel restaurantModel = null ) : DishModel
GetDishBasic ( int menuPartId, string restaurantId, int Id ) : Dish
GetDishEntitiesList ( string restId, int menuPartId ) : List
GetGeneralDishById ( string dishId ) : GeneralDish
GetIdByMenuPartName ( string restaurantId, string menuPartName ) : int
GetIngredientById ( string id ) : Ingredient
GetIngredientByNDBNo ( int ndbNo ) : Ingredient
GetLastMedal ( ) : UserMedalModel
GetMedals ( ) : List
GetMenuListBasic ( string restaurantId ) : List
GetMenuPart ( int id, string restaurantId, string lang = DefaultLang ) : MenuPartModel
GetMenuPartBasic ( int id, string RestaurantId ) : MenuPart
GetPagedRestaurants ( int page, int pageSize, SortByEnum sortedBy ) : PagedList
GetPagedRestaurantsSortedNotByMongo ( int page, int pageSize, SortByEnum sortedBy ) : PagedList

Same to GetPagedRestaurants but sorting performed not by MongoDB query

GetProductByLastCharsOfBarcode ( string barcode ) : ProductCatalogViewModel
GetRecipeByPartialName ( string partialName ) : RecipeModel
GetRestaurantBasicById ( string id ) : RestaurantBasicData
GetRestaurantBasicByIdFromBackup ( string id ) : RestaurantBasicData
GetRestaurantBasicByName ( string name ) : RestaurantBasicData
GetRestaurantById ( string id, string lang = DefaultLang ) : RestaurantModel
GetRestaurantByName ( string name ) : RestaurantModel
GetTotalPoints ( ) : int
GetUserLastMeal ( ) : Meal
GetUserLastMealViewModel ( ) : MealViewModel
GoogleTranslate ( string Text, string targetlan ) : string
IdsListToRestaurantListEntity ( List list ) : List
IngredientSearch ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
MedalsNotificationCheck ( ) : bool
MenuClone ( MenuCopyModel menuCopy ) : void
MenuCloneFromRestaurant ( string CopyFromId, string CopyToId ) : void
PrintCompareListCounts ( RestaurantsCompareList compareList ) : void

Print to log compareList

SaveUserActivity ( UserActivity userActivity ) : void
Search ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText, double maxDistance ) : IList

Returns most relevant items (Restaurants and menu items from database). Ordered by distance from the searchable item.

SearchGeneralDish ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
SearchNearest ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, double maxDistance ) : IList
SearchNearestService ( Location location, int searchCount, double maxDistance ) : IList

Will use this function to find similar restaurants in DB, while import new restaurants

ServiceLayerImpl ( ) : System
ServiceLayerImpl ( UserProfileFacade userProfilefacade ) : System
ToStringRestaurantsList ( List restaurantsBasicList ) : List
TranslateDish ( Dish dish, string fromLang, string targetlang ) : Dish
TranslateDish ( string restId, int menuPartId, int dishId, string fromLang, string targetlang ) : Dish
TranslateMenuPart ( MenuPart menuPart, string fromLang, string targetlang, bool withMenu ) : MenuPart
TranslateMenuPart ( MenuPartModel menuPartModel, string fromLang, string targetlang, bool withMenu ) : MenuPart
TranslateMenuParts ( List menuParts, string fromLang, string targetlang, bool withMenu ) : List
TranslateRestaurant ( RestaurantBasicData rest, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
TranslateRestaurant ( string restId, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
TurnOffMedalFlag ( ) : bool
UpdateCarbsInLastMeal ( string restaurnatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
UpdateCompareResult ( RestaurantsCompareList compareList ) : void

If find new restaurants, add them to DB, if already exists compare attributes and update if necessary

UpdateCoupon ( CouponType coupon ) : void
UpdateCoupon ( CouponTypeModel couponModel ) : void
UpdateDbFromRestaurantOsmData ( ObjectId osmRestId ) : void

Should add new restaurant if not exists or add new data to existing restaurant

UpdateDbFromRestaurantOsmData ( ObjectId osmRestId, ObjectId similarRestId ) : void

Should add new restaurant if not exists or add new data to existing restaurant

UpdateDish ( Dish dish, string restaurantId, int menuPartId ) : void

Only for update dish image functions and Localized translateions

UpdateDish ( DishModel dishModel ) : void
UpdateDishAndCarbs ( DishModel Dish ) : void
UpdateDishCarbs ( IPrincipal user, string restournatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool

Updates dish carbohidrates, writes to user history

UpdateGeneralDish ( GeneralDish generalDish ) : void
UpdateIngredient ( Ingredient ingredient ) : void
UpdateMenuPart ( MenuPartModel MenuPart ) : void
UpdatePostMealSugar ( int sugarLevel ) : void
UpdatePreMealSugar ( int sugarLevel, int targetSugar ) : void
UpdateRestaurant ( RestaurantBasicData restaurant ) : void
UpdateRestaurant ( RestaurantModel restaurantmodel ) : void
UserLastMealCompleteRequirement ( ) : bool
UserUpdateRestaurant ( RestaurantModel restaurantmodel ) : void
VerifyUserLastMeal ( ) : double

Описание методов

AddCouponToDB() публичный Метод

public AddCouponToDB ( CouponType coupon ) : string
coupon Spontaneous.DataModel.CouponType
Результат string

AddGeneralDishToDB() публичный Метод

public AddGeneralDishToDB ( GeneralDish generalDish ) : string
generalDish Spontaneous.DataModel.GeneralDish
Результат string

AddNewDish() публичный Метод

public AddNewDish ( DishModel dish ) : int
dish Spontaneous.WebApp.Models.DishModel
Результат int

AddNewDishBasic() публичный Метод

public AddNewDishBasic ( string restId, int menuPartId, Dish dish ) : int
restId string
menuPartId int
dish Spontaneous.DataModel.Dish
Результат int

AddNewMenuPartBasic() публичный Метод

public AddNewMenuPartBasic ( string restaurantId, MenuPart menuPart ) : int
restaurantId string
menuPart Spontaneous.DataModel.MenuPart
Результат int

AddNewMenuPartModel() публичный Метод

public AddNewMenuPartModel ( MenuPartModel MenuPart ) : int
MenuPart Spontaneous.WebApp.Models.MenuPartModel
Результат int

AddNewRestaurantFromOsmRest() публичный Метод

Add conver RestaurantOsm to RestaurantBasicData and Add new rest to DB
public AddNewRestaurantFromOsmRest ( RestaurantOsm osmRest ) : void
osmRest Spontaneous.DataModel.RestaurantOsm
Результат void

AddRestaurantBasicToDB() публичный Метод

public AddRestaurantBasicToDB ( RestaurantBasicData restaurant ) : string
restaurant Spontaneous.DataModel.RestaurantBasicData
Результат string

AddRestaurantToDB() публичный Метод

public AddRestaurantToDB ( RestaurantModel restaurantmodel ) : string
restaurantmodel Spontaneous.WebApp.Models.RestaurantModel
Результат string

ApproveMeal() публичный Метод

public ApproveMeal ( IEnumerable meal ) : void
meal IEnumerable
Результат void

BasicRestApproveMeal() публичный Метод

public BasicRestApproveMeal ( List portions ) : void
portions List
Результат void

CalculateDistanceInKm() публичный Метод

public CalculateDistanceInKm ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
Результат double

CalculateDistanceInRad() публичный Метод

public CalculateDistanceInRad ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
Результат double

CompareAllOsmRestaurantsWithDB() публичный Метод

Compare all existing OSM restaurants in ImportedRestaurantsDB with all RestaurantBasicData in main DB in CompareList in ImportedRestaurantsDB
public CompareAllOsmRestaurantsWithDB ( ) : RestaurantsCompareList
Результат Spontaneous.DataModel.RestaurantsCompareList

CompareRestaurantsNames() публичный Метод

Compare existing restaurants in DB with new Open Street Map restaurant list (by calling FindSimilarRestaurants
public CompareRestaurantsNames ( string rest1Name, string rest2Name ) : bool
rest1Name string
rest2Name string
Результат bool

CopySelectedDishes() публичный Метод

public CopySelectedDishes ( CopyList copyList ) : void
copyList Spontaneous.DataModel.CopyList
Результат void

CopySelectedMemuParts() публичный Метод

public CopySelectedMemuParts ( CopyList copyList ) : void
copyList Spontaneous.DataModel.CopyList
Результат void

DeleteCoupon() публичный Метод

public DeleteCoupon ( string id ) : void
id string
Результат void

DeleteDish() публичный Метод

public DeleteDish ( DishModel Dish ) : void
Dish Spontaneous.WebApp.Models.DishModel
Результат void

DeleteGeneralDish() публичный Метод

public DeleteGeneralDish ( string id ) : void
id string
Результат void

DeleteMenuPart() публичный Метод

public DeleteMenuPart ( MenuPartModel MenuPart ) : void
MenuPart Spontaneous.WebApp.Models.MenuPartModel
Результат void

DeleteRestaurant() публичный Метод

public DeleteRestaurant ( string id ) : void
id string
Результат void

FindSimilarRestaurants() публичный Метод

public FindSimilarRestaurants ( ) : RestaurantsCompareList
Результат Spontaneous.DataModel.RestaurantsCompareList

GetAllCoupons() публичный Метод

public GetAllCoupons ( ) : List
Результат List

GetAllGeneralDishes() публичный Метод

public GetAllGeneralDishes ( ) : List
Результат List

GetAllGeneralDishesOrderBy() публичный Метод

public GetAllGeneralDishesOrderBy ( ) : List
Результат List

GetAllIngredients() публичный Метод

public GetAllIngredients ( ) : List
Результат List

GetAllRestaurants() публичный Метод

public GetAllRestaurants ( bool withMenu = true ) : List
withMenu bool
Результат List

GetAllRestaurantsBasic() публичный Метод

public GetAllRestaurantsBasic ( ) : List
Результат List

GetAllRestaurantsBasicSortedBy() публичный Метод

public GetAllRestaurantsBasicSortedBy ( string sortFiled, int limit = 50 ) : List
sortFiled string
limit int
Результат List

GetAllRestaurantsInStringList() публичный Метод

public GetAllRestaurantsInStringList ( ) : List
Результат List

GetChainRestaurantsBasicByName() публичный Метод

public GetChainRestaurantsBasicByName ( string name ) : List
name string
Результат List

GetClosesMedal() публичный Метод

public GetClosesMedal ( ) : MedalProgress
Результат Spontaneous.DataModel.MedalProgress

GetCoupon() публичный Метод

public GetCoupon ( SpontaneousUserModel userData, UserActivity userActivity ) : CouponType
userData Spontaneous.DataModel.SpontaneousUserModel
userActivity Spontaneous.DataModel.UserActivity
Результат Spontaneous.DataModel.CouponType

GetCouponById() публичный Метод

public GetCouponById ( string couponId ) : CouponType
couponId string
Результат Spontaneous.DataModel.CouponType

GetCouponModelById() публичный Метод

public GetCouponModelById ( string couponId ) : CouponTypeModel
couponId string
Результат Spontaneous.WebApp.Models.CouponTypeModel

GetDefaultItems() публичный Метод

public GetDefaultItems ( System.Web.Security.MembershipUser currentUser, Location userLocation ) : IList
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
Результат IList

GetDish() публичный Метод

Gets dish by unique Id.
public GetDish ( System.Guid dishId ) : DishModel
dishId System.Guid
Результат Spontaneous.WebApp.Models.DishModel

GetDish() публичный Метод

public GetDish ( int MenuPartId, string RestaurantId, int Id, string lang = DefaultLang, RestaurantModel restaurantModel = null ) : DishModel
MenuPartId int
RestaurantId string
Id int
lang string
restaurantModel Spontaneous.WebApp.Models.RestaurantModel
Результат Spontaneous.WebApp.Models.DishModel

GetDishBasic() публичный Метод

public GetDishBasic ( int menuPartId, string restaurantId, int Id ) : Dish
menuPartId int
restaurantId string
Id int
Результат Spontaneous.DataModel.Dish

GetDishEntitiesList() публичный Метод

public GetDishEntitiesList ( string restId, int menuPartId ) : List
restId string
menuPartId int
Результат List

GetGeneralDishById() публичный Метод

public GetGeneralDishById ( string dishId ) : GeneralDish
dishId string
Результат Spontaneous.DataModel.GeneralDish

GetIdByMenuPartName() публичный Метод

public GetIdByMenuPartName ( string restaurantId, string menuPartName ) : int
restaurantId string
menuPartName string
Результат int

GetIngredientById() публичный Метод

public GetIngredientById ( string id ) : Ingredient
id string
Результат Spontaneous.DataModel.Ingredient

GetIngredientByNDBNo() публичный Метод

public GetIngredientByNDBNo ( int ndbNo ) : Ingredient
ndbNo int
Результат Spontaneous.DataModel.Ingredient

GetLastMedal() публичный Метод

public GetLastMedal ( ) : UserMedalModel
Результат Spontaneous.WebApp.Models.UserMedalModel

GetMedals() публичный Метод

public GetMedals ( ) : List
Результат List

GetMenuListBasic() публичный Метод

public GetMenuListBasic ( string restaurantId ) : List
restaurantId string
Результат List

GetMenuPart() публичный Метод

public GetMenuPart ( int id, string restaurantId, string lang = DefaultLang ) : MenuPartModel
id int
restaurantId string
lang string
Результат Spontaneous.WebApp.Models.MenuPartModel

GetMenuPartBasic() публичный Метод

public GetMenuPartBasic ( int id, string RestaurantId ) : MenuPart
id int
RestaurantId string
Результат Spontaneous.DataModel.MenuPart

GetPagedRestaurants() публичный Метод

public GetPagedRestaurants ( int page, int pageSize, SortByEnum sortedBy ) : PagedList
page int
pageSize int
sortedBy SortByEnum
Результат PagedList

GetPagedRestaurantsSortedNotByMongo() публичный Метод

Same to GetPagedRestaurants but sorting performed not by MongoDB query
public GetPagedRestaurantsSortedNotByMongo ( int page, int pageSize, SortByEnum sortedBy ) : PagedList
page int
pageSize int
sortedBy SortByEnum
Результат PagedList

GetProductByLastCharsOfBarcode() публичный Метод

public GetProductByLastCharsOfBarcode ( string barcode ) : ProductCatalogViewModel
barcode string
Результат Spontaneous.WebApp.Models.ProductCatalogViewModel

GetRecipeByPartialName() публичный Метод

public GetRecipeByPartialName ( string partialName ) : RecipeModel
partialName string
Результат Spontaneous.WebApp.Models.RecipeModel

GetRestaurantBasicById() публичный Метод

public GetRestaurantBasicById ( string id ) : RestaurantBasicData
id string
Результат Spontaneous.DataModel.RestaurantBasicData

GetRestaurantBasicByIdFromBackup() публичный Метод

public GetRestaurantBasicByIdFromBackup ( string id ) : RestaurantBasicData
id string
Результат Spontaneous.DataModel.RestaurantBasicData

GetRestaurantBasicByName() публичный Метод

public GetRestaurantBasicByName ( string name ) : RestaurantBasicData
name string
Результат Spontaneous.DataModel.RestaurantBasicData

GetRestaurantById() публичный Метод

public GetRestaurantById ( string id, string lang = DefaultLang ) : RestaurantModel
id string
lang string
Результат Spontaneous.WebApp.Models.RestaurantModel

GetRestaurantByName() публичный Метод

public GetRestaurantByName ( string name ) : RestaurantModel
name string
Результат Spontaneous.WebApp.Models.RestaurantModel

GetTotalPoints() публичный Метод

public GetTotalPoints ( ) : int
Результат int

GetUserLastMeal() публичный Метод

public GetUserLastMeal ( ) : Meal
Результат Spontaneous.DataModel.Meal

GetUserLastMealViewModel() публичный Метод

public GetUserLastMealViewModel ( ) : MealViewModel
Результат Spontaneous.WebApp.Models.MealViewModel

GoogleTranslate() публичный Метод

public GoogleTranslate ( string Text, string targetlan ) : string
Text string
targetlan string
Результат string

IdsListToRestaurantListEntity() публичный Метод

public IdsListToRestaurantListEntity ( List list ) : List
list List
Результат List

IngredientSearch() публичный Метод

public IngredientSearch ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
searchCount int
searchText string
Результат List

MedalsNotificationCheck() публичный Метод

public MedalsNotificationCheck ( ) : bool
Результат bool

MenuClone() публичный Метод

public MenuClone ( MenuCopyModel menuCopy ) : void
menuCopy Spontaneous.WebApp.Models.MenuCopyModel
Результат void

MenuCloneFromRestaurant() публичный Метод

public MenuCloneFromRestaurant ( string CopyFromId, string CopyToId ) : void
CopyFromId string
CopyToId string
Результат void

PrintCompareListCounts() публичный Метод

Print to log compareList
public PrintCompareListCounts ( RestaurantsCompareList compareList ) : void
compareList Spontaneous.DataModel.RestaurantsCompareList
Результат void

SaveUserActivity() публичный Метод

public SaveUserActivity ( UserActivity userActivity ) : void
userActivity Spontaneous.DataModel.UserActivity
Результат void

Search() публичный Метод

Returns most relevant items (Restaurants and menu items from database). Ordered by distance from the searchable item.
public Search ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText, double maxDistance ) : IList
currentUser System.Web.Security.MembershipUser /// ///
userLocation Spontaneous.DataModel.Location /// ///
searchCount int
searchText string /// ///
maxDistance double
Результат IList

SearchGeneralDish() публичный Метод

public SearchGeneralDish ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, string searchText ) : List
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
searchCount int
searchText string
Результат List

SearchNearest() публичный Метод

public SearchNearest ( System.Web.Security.MembershipUser currentUser, Location userLocation, int searchCount, double maxDistance ) : IList
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
searchCount int
maxDistance double
Результат IList

SearchNearestService() публичный Метод

Will use this function to find similar restaurants in DB, while import new restaurants
public SearchNearestService ( Location location, int searchCount, double maxDistance ) : IList
location Spontaneous.DataModel.Location
searchCount int
maxDistance double
Результат IList

ServiceLayerImpl() публичный Метод

public ServiceLayerImpl ( ) : System
Результат System

ServiceLayerImpl() публичный Метод

public ServiceLayerImpl ( UserProfileFacade userProfilefacade ) : System
userProfilefacade UserProfileFacade
Результат System

ToStringRestaurantsList() публичный Метод

public ToStringRestaurantsList ( List restaurantsBasicList ) : List
restaurantsBasicList List
Результат List

TranslateDish() публичный Метод

public TranslateDish ( Dish dish, string fromLang, string targetlang ) : Dish
dish Spontaneous.DataModel.Dish
fromLang string
targetlang string
Результат Spontaneous.DataModel.Dish

TranslateDish() публичный Метод

public TranslateDish ( string restId, int menuPartId, int dishId, string fromLang, string targetlang ) : Dish
restId string
menuPartId int
dishId int
fromLang string
targetlang string
Результат Spontaneous.DataModel.Dish

TranslateMenuPart() публичный Метод

public TranslateMenuPart ( MenuPart menuPart, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPart Spontaneous.DataModel.MenuPart
fromLang string
targetlang string
withMenu bool
Результат Spontaneous.DataModel.MenuPart

TranslateMenuPart() публичный Метод

public TranslateMenuPart ( MenuPartModel menuPartModel, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPartModel Spontaneous.WebApp.Models.MenuPartModel
fromLang string
targetlang string
withMenu bool
Результат Spontaneous.DataModel.MenuPart

TranslateMenuParts() публичный Метод

public TranslateMenuParts ( List menuParts, string fromLang, string targetlang, bool withMenu ) : List
menuParts List
fromLang string
targetlang string
withMenu bool
Результат List

TranslateRestaurant() публичный Метод

public TranslateRestaurant ( RestaurantBasicData rest, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
rest Spontaneous.DataModel.RestaurantBasicData
fromLang string
targetlang string
withMenu bool
Результат Spontaneous.DataModel.RestaurantBasicData

TranslateRestaurant() публичный Метод

public TranslateRestaurant ( string restId, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
restId string
fromLang string
targetlang string
withMenu bool
Результат Spontaneous.DataModel.RestaurantBasicData

TurnOffMedalFlag() публичный Метод

public TurnOffMedalFlag ( ) : bool
Результат bool

UpdateCarbsInLastMeal() публичный Метод

public UpdateCarbsInLastMeal ( string restaurnatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
restaurnatId string
menuPartId int
dishId int
totalCarbohydrate double
Результат bool

UpdateCompareResult() публичный Метод

If find new restaurants, add them to DB, if already exists compare attributes and update if necessary
public UpdateCompareResult ( RestaurantsCompareList compareList ) : void
compareList Spontaneous.DataModel.RestaurantsCompareList
Результат void

UpdateCoupon() публичный Метод

public UpdateCoupon ( CouponType coupon ) : void
coupon Spontaneous.DataModel.CouponType
Результат void

UpdateCoupon() публичный Метод

public UpdateCoupon ( CouponTypeModel couponModel ) : void
couponModel Spontaneous.WebApp.Models.CouponTypeModel
Результат void

UpdateDbFromRestaurantOsmData() публичный Метод

Should add new restaurant if not exists or add new data to existing restaurant
public UpdateDbFromRestaurantOsmData ( ObjectId osmRestId ) : void
osmRestId ObjectId
Результат void

UpdateDbFromRestaurantOsmData() публичный Метод

Should add new restaurant if not exists or add new data to existing restaurant
public UpdateDbFromRestaurantOsmData ( ObjectId osmRestId, ObjectId similarRestId ) : void
osmRestId ObjectId /// Id of RestaurantOSM ///
similarRestId ObjectId /// Id of existing similar restaurant in main DB ///
Результат void

UpdateDish() публичный Метод

Only for update dish image functions and Localized translateions
public UpdateDish ( Dish dish, string restaurantId, int menuPartId ) : void
dish Spontaneous.DataModel.Dish
restaurantId string
menuPartId int
Результат void

UpdateDish() публичный Метод

public UpdateDish ( DishModel dishModel ) : void
dishModel Spontaneous.WebApp.Models.DishModel
Результат void

UpdateDishAndCarbs() публичный Метод

public UpdateDishAndCarbs ( DishModel Dish ) : void
Dish Spontaneous.WebApp.Models.DishModel
Результат void

UpdateDishCarbs() публичный Метод

Updates dish carbohidrates, writes to user history
public UpdateDishCarbs ( IPrincipal user, string restournatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
user IPrincipal
restournatId string
menuPartId int
dishId int
totalCarbohydrate double
Результат bool

UpdateGeneralDish() публичный Метод

public UpdateGeneralDish ( GeneralDish generalDish ) : void
generalDish Spontaneous.DataModel.GeneralDish
Результат void

UpdateIngredient() публичный Метод

public UpdateIngredient ( Ingredient ingredient ) : void
ingredient Spontaneous.DataModel.Ingredient
Результат void

UpdateMenuPart() публичный Метод

public UpdateMenuPart ( MenuPartModel MenuPart ) : void
MenuPart Spontaneous.WebApp.Models.MenuPartModel
Результат void

UpdatePostMealSugar() публичный Метод

public UpdatePostMealSugar ( int sugarLevel ) : void
sugarLevel int
Результат void

UpdatePreMealSugar() публичный Метод

public UpdatePreMealSugar ( int sugarLevel, int targetSugar ) : void
sugarLevel int
targetSugar int
Результат void

UpdateRestaurant() публичный Метод

public UpdateRestaurant ( RestaurantBasicData restaurant ) : void
restaurant Spontaneous.DataModel.RestaurantBasicData
Результат void

UpdateRestaurant() публичный Метод

public UpdateRestaurant ( RestaurantModel restaurantmodel ) : void
restaurantmodel Spontaneous.WebApp.Models.RestaurantModel
Результат void

UserLastMealCompleteRequirement() публичный Метод

public UserLastMealCompleteRequirement ( ) : bool
Результат bool

UserUpdateRestaurant() публичный Метод

public UserUpdateRestaurant ( RestaurantModel restaurantmodel ) : void
restaurantmodel Spontaneous.WebApp.Models.RestaurantModel
Результат void

VerifyUserLastMeal() публичный Метод

public VerifyUserLastMeal ( ) : double
Результат double