public ActionResult Save(PrefixSettings model) { PrefixSettingsRepository repo = new PrefixSettingsRepository(); repo.SavePrefixSettings(model.Prefixes, OrganizationId); TempData["Success"] = "Updated Successfully!"; return(RedirectToAction("Index")); }
// GET: PrefixSettings public ActionResult Index() { PrefixSettingsRepository repo = new PrefixSettingsRepository(); PrefixSettings model = new PrefixSettings(); model.Prefixes = new List <PrefixSettingsVsOrganization>(); var res = repo.GetPrefixSettings(OrganizationId); foreach (var item in res) { model.Prefixes.Add(item); } return(View(model)); }