Exemplo n.º 1
0
        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>();
        }
Exemplo n.º 3
0
 public Meal(string pMealName, decimal pPrice, IMealGroup pMealGroup) : this()
 {
     this.MealName  = pMealName;
     this.MealPrice = pPrice;
     this.MealGroup = pMealGroup;
 }
Exemplo n.º 4
0
 public AddOnForm(IMealGroup pMealGroup) : this()
 {
     _logic = new AddOnFormLogic(pMealGroup);
     LoadSubGroups();
 }
Exemplo n.º 5
0
 public bool GroupHasSubGroups(IMealGroup pMealGroup)
 {
     return(pMealGroup != null && _mealGroupRepository.FindSubGroupByMainGroupName(pMealGroup.GroupName).Any());
 }
Exemplo n.º 6
0
 public MealGroup(long?pId, string pGroupName, IMealGroup pParentMealGroup)
 {
     this.Id              = pId;
     this.GroupName       = pGroupName;
     this.ParentMealGroup = pParentMealGroup;
 }
Exemplo n.º 7
0
 private bool GroupHasSubGroups(IMealGroup pMealGroup)
 {
     return(_logic.GroupHasSubGroups(pMealGroup));
 }