public List <Recipe> GetRecipeWithTitleSearchAndCategory(string title) { var dbh = new DBhelperGetData(); Recipes = dbh.GetRecipeWithTitleAndCategorySearch(title, CategoryDescription); return(Recipes); }
public Category(int categoryId) { CategoryId = categoryId; var dbh = new DBhelperGetData(); CategoryDescription = dbh.SetCategoryDescription(CategoryId); }
public List <Recipe> GetRecipeWithTitleSearch(string title) { var dbh = new DBhelperGetData(); Recipes = dbh.GetRecipeWithTitleSearch(title); return(Recipes); }
public Category(string categoryDescription) { CategoryDescription = categoryDescription; var dbh = new DBhelperGetData(); CategoryId = dbh.SetCategoryId(CategoryDescription); }
private void FillComboBox() { var dbmDetData = new DBhelperGetData(); var listCategorys = dbmDetData.GetKategorier(); foreach (var category in listCategorys) { cBoxCategoryDescription.Items.Add(category.CategoryDescription); } }
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); }
public Recipe GetRecipeFromlstBox() { var dbmGetData = new DBhelperGetData(); return(dbmGetData.GetRecipe(lstRecipeTitles.SelectedItem.ToString())); }