C# Class Spontaneous.WebApp.Services.ServiceLayerImpl

Inheritance: IServicesLayer, IBackofficeService
Afficher le fichier Open project: pashkov/Spontaneous Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

AddCouponToDB() public méthode

public AddCouponToDB ( CouponType coupon ) : string
coupon Spontaneous.DataModel.CouponType
Résultat string

AddGeneralDishToDB() public méthode

public AddGeneralDishToDB ( GeneralDish generalDish ) : string
generalDish Spontaneous.DataModel.GeneralDish
Résultat string

AddNewDish() public méthode

public AddNewDish ( DishModel dish ) : int
dish Spontaneous.WebApp.Models.DishModel
Résultat int

AddNewDishBasic() public méthode

public AddNewDishBasic ( string restId, int menuPartId, Dish dish ) : int
restId string
menuPartId int
dish Spontaneous.DataModel.Dish
Résultat int

AddNewMenuPartBasic() public méthode

public AddNewMenuPartBasic ( string restaurantId, MenuPart menuPart ) : int
restaurantId string
menuPart Spontaneous.DataModel.MenuPart
Résultat int

AddNewMenuPartModel() public méthode

public AddNewMenuPartModel ( MenuPartModel MenuPart ) : int
MenuPart Spontaneous.WebApp.Models.MenuPartModel
Résultat int

AddNewRestaurantFromOsmRest() public méthode

Add conver RestaurantOsm to RestaurantBasicData and Add new rest to DB
public AddNewRestaurantFromOsmRest ( RestaurantOsm osmRest ) : void
osmRest Spontaneous.DataModel.RestaurantOsm
Résultat void

AddRestaurantBasicToDB() public méthode

public AddRestaurantBasicToDB ( RestaurantBasicData restaurant ) : string
restaurant Spontaneous.DataModel.RestaurantBasicData
Résultat string

AddRestaurantToDB() public méthode

public AddRestaurantToDB ( RestaurantModel restaurantmodel ) : string
restaurantmodel Spontaneous.WebApp.Models.RestaurantModel
Résultat string

ApproveMeal() public méthode

public ApproveMeal ( IEnumerable meal ) : void
meal IEnumerable
Résultat void

BasicRestApproveMeal() public méthode

public BasicRestApproveMeal ( List portions ) : void
portions List
Résultat void

CalculateDistanceInKm() public méthode

public CalculateDistanceInKm ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
Résultat double

CalculateDistanceInRad() public méthode

public CalculateDistanceInRad ( LocationModel location1, LocationModel location2 ) : double
location1 Spontaneous.WebApp.Models.LocationModel
location2 Spontaneous.WebApp.Models.LocationModel
Résultat double

CompareAllOsmRestaurantsWithDB() public méthode

Compare all existing OSM restaurants in ImportedRestaurantsDB with all RestaurantBasicData in main DB in CompareList in ImportedRestaurantsDB
public CompareAllOsmRestaurantsWithDB ( ) : RestaurantsCompareList
Résultat Spontaneous.DataModel.RestaurantsCompareList

CompareRestaurantsNames() public méthode

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
Résultat bool

CopySelectedDishes() public méthode

public CopySelectedDishes ( CopyList copyList ) : void
copyList Spontaneous.DataModel.CopyList
Résultat void

CopySelectedMemuParts() public méthode

public CopySelectedMemuParts ( CopyList copyList ) : void
copyList Spontaneous.DataModel.CopyList
Résultat void

DeleteCoupon() public méthode

public DeleteCoupon ( string id ) : void
id string
Résultat void

DeleteDish() public méthode

public DeleteDish ( DishModel Dish ) : void
Dish Spontaneous.WebApp.Models.DishModel
Résultat void

DeleteGeneralDish() public méthode

public DeleteGeneralDish ( string id ) : void
id string
Résultat void

DeleteMenuPart() public méthode

public DeleteMenuPart ( MenuPartModel MenuPart ) : void
MenuPart Spontaneous.WebApp.Models.MenuPartModel
Résultat void

DeleteRestaurant() public méthode

public DeleteRestaurant ( string id ) : void
id string
Résultat void

FindSimilarRestaurants() public méthode

public FindSimilarRestaurants ( ) : RestaurantsCompareList
Résultat Spontaneous.DataModel.RestaurantsCompareList

GetAllCoupons() public méthode

public GetAllCoupons ( ) : List
Résultat List

GetAllGeneralDishes() public méthode

public GetAllGeneralDishes ( ) : List
Résultat List

GetAllGeneralDishesOrderBy() public méthode

public GetAllGeneralDishesOrderBy ( ) : List
Résultat List

GetAllIngredients() public méthode

public GetAllIngredients ( ) : List
Résultat List

GetAllRestaurants() public méthode

public GetAllRestaurants ( bool withMenu = true ) : List
withMenu bool
Résultat List

GetAllRestaurantsBasic() public méthode

public GetAllRestaurantsBasic ( ) : List
Résultat List

GetAllRestaurantsBasicSortedBy() public méthode

public GetAllRestaurantsBasicSortedBy ( string sortFiled, int limit = 50 ) : List
sortFiled string
limit int
Résultat List

GetAllRestaurantsInStringList() public méthode

public GetAllRestaurantsInStringList ( ) : List
Résultat List

GetChainRestaurantsBasicByName() public méthode

public GetChainRestaurantsBasicByName ( string name ) : List
name string
Résultat List

GetClosesMedal() public méthode

public GetClosesMedal ( ) : MedalProgress
Résultat Spontaneous.DataModel.MedalProgress

GetCoupon() public méthode

public GetCoupon ( SpontaneousUserModel userData, UserActivity userActivity ) : CouponType
userData Spontaneous.DataModel.SpontaneousUserModel
userActivity Spontaneous.DataModel.UserActivity
Résultat Spontaneous.DataModel.CouponType

GetCouponById() public méthode

public GetCouponById ( string couponId ) : CouponType
couponId string
Résultat Spontaneous.DataModel.CouponType

GetCouponModelById() public méthode

public GetCouponModelById ( string couponId ) : CouponTypeModel
couponId string
Résultat Spontaneous.WebApp.Models.CouponTypeModel

GetDefaultItems() public méthode

public GetDefaultItems ( System.Web.Security.MembershipUser currentUser, Location userLocation ) : IList
currentUser System.Web.Security.MembershipUser
userLocation Spontaneous.DataModel.Location
Résultat IList

GetDish() public méthode

Gets dish by unique Id.
public GetDish ( System.Guid dishId ) : DishModel
dishId System.Guid
Résultat Spontaneous.WebApp.Models.DishModel

GetDish() public méthode

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
Résultat Spontaneous.WebApp.Models.DishModel

GetDishBasic() public méthode

public GetDishBasic ( int menuPartId, string restaurantId, int Id ) : Dish
menuPartId int
restaurantId string
Id int
Résultat Spontaneous.DataModel.Dish

GetDishEntitiesList() public méthode

public GetDishEntitiesList ( string restId, int menuPartId ) : List
restId string
menuPartId int
Résultat List

GetGeneralDishById() public méthode

public GetGeneralDishById ( string dishId ) : GeneralDish
dishId string
Résultat Spontaneous.DataModel.GeneralDish

GetIdByMenuPartName() public méthode

public GetIdByMenuPartName ( string restaurantId, string menuPartName ) : int
restaurantId string
menuPartName string
Résultat int

GetIngredientById() public méthode

public GetIngredientById ( string id ) : Ingredient
id string
Résultat Spontaneous.DataModel.Ingredient

GetIngredientByNDBNo() public méthode

public GetIngredientByNDBNo ( int ndbNo ) : Ingredient
ndbNo int
Résultat Spontaneous.DataModel.Ingredient

GetLastMedal() public méthode

public GetLastMedal ( ) : UserMedalModel
Résultat Spontaneous.WebApp.Models.UserMedalModel

GetMedals() public méthode

public GetMedals ( ) : List
Résultat List

GetMenuListBasic() public méthode

public GetMenuListBasic ( string restaurantId ) : List
restaurantId string
Résultat List

GetMenuPart() public méthode

public GetMenuPart ( int id, string restaurantId, string lang = DefaultLang ) : MenuPartModel
id int
restaurantId string
lang string
Résultat Spontaneous.WebApp.Models.MenuPartModel

GetMenuPartBasic() public méthode

public GetMenuPartBasic ( int id, string RestaurantId ) : MenuPart
id int
RestaurantId string
Résultat Spontaneous.DataModel.MenuPart

GetPagedRestaurants() public méthode

public GetPagedRestaurants ( int page, int pageSize, SortByEnum sortedBy ) : PagedList
page int
pageSize int
sortedBy SortByEnum
Résultat PagedList

GetPagedRestaurantsSortedNotByMongo() public méthode

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
Résultat PagedList

GetProductByLastCharsOfBarcode() public méthode

public GetProductByLastCharsOfBarcode ( string barcode ) : ProductCatalogViewModel
barcode string
Résultat Spontaneous.WebApp.Models.ProductCatalogViewModel

GetRecipeByPartialName() public méthode

public GetRecipeByPartialName ( string partialName ) : RecipeModel
partialName string
Résultat Spontaneous.WebApp.Models.RecipeModel

GetRestaurantBasicById() public méthode

public GetRestaurantBasicById ( string id ) : RestaurantBasicData
id string
Résultat Spontaneous.DataModel.RestaurantBasicData

GetRestaurantBasicByIdFromBackup() public méthode

public GetRestaurantBasicByIdFromBackup ( string id ) : RestaurantBasicData
id string
Résultat Spontaneous.DataModel.RestaurantBasicData

GetRestaurantBasicByName() public méthode

public GetRestaurantBasicByName ( string name ) : RestaurantBasicData
name string
Résultat Spontaneous.DataModel.RestaurantBasicData

GetRestaurantById() public méthode

public GetRestaurantById ( string id, string lang = DefaultLang ) : RestaurantModel
id string
lang string
Résultat Spontaneous.WebApp.Models.RestaurantModel

GetRestaurantByName() public méthode

public GetRestaurantByName ( string name ) : RestaurantModel
name string
Résultat Spontaneous.WebApp.Models.RestaurantModel

GetTotalPoints() public méthode

public GetTotalPoints ( ) : int
Résultat int

GetUserLastMeal() public méthode

public GetUserLastMeal ( ) : Meal
Résultat Spontaneous.DataModel.Meal

GetUserLastMealViewModel() public méthode

public GetUserLastMealViewModel ( ) : MealViewModel
Résultat Spontaneous.WebApp.Models.MealViewModel

GoogleTranslate() public méthode

public GoogleTranslate ( string Text, string targetlan ) : string
Text string
targetlan string
Résultat string

IdsListToRestaurantListEntity() public méthode

public IdsListToRestaurantListEntity ( List list ) : List
list List
Résultat List

IngredientSearch() public méthode

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
Résultat List

MedalsNotificationCheck() public méthode

public MedalsNotificationCheck ( ) : bool
Résultat bool

MenuClone() public méthode

public MenuClone ( MenuCopyModel menuCopy ) : void
menuCopy Spontaneous.WebApp.Models.MenuCopyModel
Résultat void

MenuCloneFromRestaurant() public méthode

public MenuCloneFromRestaurant ( string CopyFromId, string CopyToId ) : void
CopyFromId string
CopyToId string
Résultat void

PrintCompareListCounts() public méthode

Print to log compareList
public PrintCompareListCounts ( RestaurantsCompareList compareList ) : void
compareList Spontaneous.DataModel.RestaurantsCompareList
Résultat void

SaveUserActivity() public méthode

public SaveUserActivity ( UserActivity userActivity ) : void
userActivity Spontaneous.DataModel.UserActivity
Résultat void

Search() public méthode

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
Résultat IList

SearchGeneralDish() public méthode

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
Résultat List

SearchNearest() public méthode

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
Résultat IList

SearchNearestService() public méthode

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
Résultat IList

ServiceLayerImpl() public méthode

public ServiceLayerImpl ( ) : System
Résultat System

ServiceLayerImpl() public méthode

public ServiceLayerImpl ( UserProfileFacade userProfilefacade ) : System
userProfilefacade UserProfileFacade
Résultat System

ToStringRestaurantsList() public méthode

public ToStringRestaurantsList ( List restaurantsBasicList ) : List
restaurantsBasicList List
Résultat List

TranslateDish() public méthode

public TranslateDish ( Dish dish, string fromLang, string targetlang ) : Dish
dish Spontaneous.DataModel.Dish
fromLang string
targetlang string
Résultat Spontaneous.DataModel.Dish

TranslateDish() public méthode

public TranslateDish ( string restId, int menuPartId, int dishId, string fromLang, string targetlang ) : Dish
restId string
menuPartId int
dishId int
fromLang string
targetlang string
Résultat Spontaneous.DataModel.Dish

TranslateMenuPart() public méthode

public TranslateMenuPart ( MenuPart menuPart, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPart Spontaneous.DataModel.MenuPart
fromLang string
targetlang string
withMenu bool
Résultat Spontaneous.DataModel.MenuPart

TranslateMenuPart() public méthode

public TranslateMenuPart ( MenuPartModel menuPartModel, string fromLang, string targetlang, bool withMenu ) : MenuPart
menuPartModel Spontaneous.WebApp.Models.MenuPartModel
fromLang string
targetlang string
withMenu bool
Résultat Spontaneous.DataModel.MenuPart

TranslateMenuParts() public méthode

public TranslateMenuParts ( List menuParts, string fromLang, string targetlang, bool withMenu ) : List
menuParts List
fromLang string
targetlang string
withMenu bool
Résultat List

TranslateRestaurant() public méthode

public TranslateRestaurant ( RestaurantBasicData rest, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
rest Spontaneous.DataModel.RestaurantBasicData
fromLang string
targetlang string
withMenu bool
Résultat Spontaneous.DataModel.RestaurantBasicData

TranslateRestaurant() public méthode

public TranslateRestaurant ( string restId, string fromLang, string targetlang, bool withMenu ) : RestaurantBasicData
restId string
fromLang string
targetlang string
withMenu bool
Résultat Spontaneous.DataModel.RestaurantBasicData

TurnOffMedalFlag() public méthode

public TurnOffMedalFlag ( ) : bool
Résultat bool

UpdateCarbsInLastMeal() public méthode

public UpdateCarbsInLastMeal ( string restaurnatId, int menuPartId, int dishId, double totalCarbohydrate ) : bool
restaurnatId string
menuPartId int
dishId int
totalCarbohydrate double
Résultat bool

UpdateCompareResult() public méthode

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
Résultat void

UpdateCoupon() public méthode

public UpdateCoupon ( CouponType coupon ) : void
coupon Spontaneous.DataModel.CouponType
Résultat void

UpdateCoupon() public méthode

public UpdateCoupon ( CouponTypeModel couponModel ) : void
couponModel Spontaneous.WebApp.Models.CouponTypeModel
Résultat void

UpdateDbFromRestaurantOsmData() public méthode

Should add new restaurant if not exists or add new data to existing restaurant
public UpdateDbFromRestaurantOsmData ( ObjectId osmRestId ) : void
osmRestId ObjectId
Résultat void

UpdateDbFromRestaurantOsmData() public méthode

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 ///
Résultat void

UpdateDish() public méthode

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
Résultat void

UpdateDish() public méthode

public UpdateDish ( DishModel dishModel ) : void
dishModel Spontaneous.WebApp.Models.DishModel
Résultat void

UpdateDishAndCarbs() public méthode

public UpdateDishAndCarbs ( DishModel Dish ) : void
Dish Spontaneous.WebApp.Models.DishModel
Résultat void

UpdateDishCarbs() public méthode

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
Résultat bool

UpdateGeneralDish() public méthode

public UpdateGeneralDish ( GeneralDish generalDish ) : void
generalDish Spontaneous.DataModel.GeneralDish
Résultat void

UpdateIngredient() public méthode

public UpdateIngredient ( Ingredient ingredient ) : void
ingredient Spontaneous.DataModel.Ingredient
Résultat void

UpdateMenuPart() public méthode

public UpdateMenuPart ( MenuPartModel MenuPart ) : void
MenuPart Spontaneous.WebApp.Models.MenuPartModel
Résultat void

UpdatePostMealSugar() public méthode

public UpdatePostMealSugar ( int sugarLevel ) : void
sugarLevel int
Résultat void

UpdatePreMealSugar() public méthode

public UpdatePreMealSugar ( int sugarLevel, int targetSugar ) : void
sugarLevel int
targetSugar int
Résultat void

UpdateRestaurant() public méthode

public UpdateRestaurant ( RestaurantBasicData restaurant ) : void
restaurant Spontaneous.DataModel.RestaurantBasicData
Résultat void

UpdateRestaurant() public méthode

public UpdateRestaurant ( RestaurantModel restaurantmodel ) : void
restaurantmodel Spontaneous.WebApp.Models.RestaurantModel
Résultat void

UserLastMealCompleteRequirement() public méthode

public UserLastMealCompleteRequirement ( ) : bool
Résultat bool

UserUpdateRestaurant() public méthode

public UserUpdateRestaurant ( RestaurantModel restaurantmodel ) : void
restaurantmodel Spontaneous.WebApp.Models.RestaurantModel
Résultat void

VerifyUserLastMeal() public méthode

public VerifyUserLastMeal ( ) : double
Résultat double