Exemple #1
0
        public List <Recipe> GetRecipeWithTitleSearchAndCategory(string title)
        {
            var dbh = new DBhelperGetData();

            Recipes = dbh.GetRecipeWithTitleAndCategorySearch(title, CategoryDescription);
            return(Recipes);
        }
Exemple #2
0
        public Category(int categoryId)
        {
            CategoryId = categoryId;
            var dbh = new DBhelperGetData();

            CategoryDescription = dbh.SetCategoryDescription(CategoryId);
        }
Exemple #3
0
        public List <Recipe> GetRecipeWithTitleSearch(string title)
        {
            var dbh = new DBhelperGetData();

            Recipes = dbh.GetRecipeWithTitleSearch(title);
            return(Recipes);
        }
Exemple #4
0
        public Category(string categoryDescription)
        {
            CategoryDescription = categoryDescription;
            var dbh = new DBhelperGetData();

            CategoryId = dbh.SetCategoryId(CategoryDescription);
        }
Exemple #5
0
        private void FillComboBox()
        {
            var dbmDetData    = new DBhelperGetData();
            var listCategorys = dbmDetData.GetKategorier();

            foreach (var category in listCategorys)
            {
                cBoxCategoryDescription.Items.Add(category.CategoryDescription);
            }
        }
Exemple #6
0
        private void GetCategory()
        {
            var dbmDetData    = new DBhelperGetData();
            var listCategorys = dbmDetData.GetKategorier();

            cbBoxCatagory.Items.Add("Ingen");
            foreach (var category in listCategorys)
            {
                cbBoxCatagory.Items.Add(category.CategoryDescription);
            }
        }
        private bool CheckIfTitleExist(string title)
        {
            var dbmGetData = new DBhelperGetData();
            var recipe     = dbmGetData.GetRecipe(title, "new");

            if (recipe == null)
            {
                return(false);
            }
            return(true);
        }
Exemple #8
0
        public Recipe GetRecipeFromlstBox()
        {
            var dbmGetData = new DBhelperGetData();

            return(dbmGetData.GetRecipe(lstRecipeTitles.SelectedItem.ToString()));
        }