public void SetIngredient(Set_Ingredients ingredient) { string sqlexpression = "ingredients_insert"; using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlCommand command = new SqlCommand(sqlexpression, connection); command.CommandType = System.Data.CommandType.StoredProcedure; SqlParameter IngredientIdParam = new SqlParameter { ParameterName = "@id", Value = ingredient.Id }; command.Parameters.Add(IngredientIdParam); SqlParameter IngredientNameParam = new SqlParameter { ParameterName = "@ingredient", Value = ingredient.Ingredient }; command.Parameters.Add(IngredientNameParam); SqlParameter InfoParam = new SqlParameter { ParameterName = "@info", Value = ingredient.Info }; command.Parameters.Add(InfoParam); try { command.ExecuteNonQuery(); } catch { } } }
public void SetIngredient(Set_Ingredients ingredient) { dal.SetIngredient(ingredient); }
public ActionResult SetIngredient(Set_Ingredients ingredient) { bis_log.SetIngredient(ingredient); return(RedirectToAction("GetIngredietns")); }
public ActionResult SetIngredient() { Set_Ingredients ingredient = new Set_Ingredients(); return(View(ingredient)); }