예제 #1
0
        public ActionResult Save(PrefixSettings model)
        {
            PrefixSettingsRepository repo = new PrefixSettingsRepository();

            repo.SavePrefixSettings(model.Prefixes, OrganizationId);
            TempData["Success"] = "Updated Successfully!";
            return(RedirectToAction("Index"));
        }
예제 #2
0
        // 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));
        }