// GET: Language public ActionResult AddWords() { LanguageCardDTO languageCardDTO = new LanguageCardDTO(); IEnumerable <string> categories = ADORepo.GetAllCategories(); languageCardDTO.categoriesForDropdown = GetAllCategoriesSelectList(categories); return(View(languageCardDTO)); }
public int SaveLanguagePair(LanguageCardDTO languagePair) { int count = 0; SqlConnection conn = new SqlConnection(); conn.ConnectionString = ConfigurationManager.ConnectionStrings["GearHost"].ConnectionString; string sqlGet = "spAddWords"; SqlCommand command = new SqlCommand(sqlGet, conn); command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.AddWithValue("@category", languagePair.WordCategory); command.Parameters.AddWithValue("@hindiWord", languagePair.HindiText); command.Parameters.AddWithValue("@kannadaWord", languagePair.KannadaText); conn.Open(); count = command.ExecuteNonQuery(); return(count); }
public ActionResult SaveLanguagePair(LanguageCardDTO languageCardDTO) { int isInserted = ADORepo.SaveLanguagePair(languageCardDTO); return(PartialView()); }