private void uiCbGroups_SelectedIndexChanged(object sender, EventArgs e) { IMealGroup mealGroup = uiCbGroups.SelectedItem as IMealGroup; if (mealGroup == null) { return; } LoadSubMeals(mealGroup.GroupName); }
public AddOnFormLogic(IMealGroup pMealGroup) { if (pMealGroup == null) { throw new ArgumentNullException("Meal Group is null"); } _mealGroupRepository = new MealGroupRepository(); _mealRepository = new MealRepository(); _mainGroup = pMealGroup; _meals = new HashSet <IMeal>(); }
public Meal(string pMealName, decimal pPrice, IMealGroup pMealGroup) : this() { this.MealName = pMealName; this.MealPrice = pPrice; this.MealGroup = pMealGroup; }
public AddOnForm(IMealGroup pMealGroup) : this() { _logic = new AddOnFormLogic(pMealGroup); LoadSubGroups(); }
public bool GroupHasSubGroups(IMealGroup pMealGroup) { return(pMealGroup != null && _mealGroupRepository.FindSubGroupByMainGroupName(pMealGroup.GroupName).Any()); }
public MealGroup(long?pId, string pGroupName, IMealGroup pParentMealGroup) { this.Id = pId; this.GroupName = pGroupName; this.ParentMealGroup = pParentMealGroup; }
private bool GroupHasSubGroups(IMealGroup pMealGroup) { return(_logic.GroupHasSubGroups(pMealGroup)); }