public ActionResult Create(CreateConceptModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var concept = this.ImsiClient.Create(model.ToConcept());

                    TempData["success"] = Locale.ConceptCreatedSuccessfully;

                    return(RedirectToAction("ViewConcept", new { id = concept.Key, versionId = concept.VersionKey }));
                }
            }
            catch (Exception e)
            {
                Trace.TraceError($"Unable to create concept: {e}");
            }

            TempData["error"] = Locale.UnableToCreateConcept;

            Guid conceptClass;

            model.LanguageList     = LanguageUtil.GetLanguageList().ToSelectList("DisplayName", "TwoLetterCountryCode").ToList();
            model.ConceptClassList = Guid.TryParse(model.ConceptClass, out conceptClass) ? this.GetConceptClasses().ToSelectList("Name", "Key", c => c.Key == conceptClass).OrderBy(c => c.Text).ToList() : this.GetConceptClasses().ToSelectList("Name", "Key").OrderBy(c => c.Text).ToList();

            return(View(model));
        }
        public ActionResult Create()
        {
            var model = new CreateConceptModel
            {
                ConceptClassList = this.GetConceptClasses().ToSelectList().OrderBy(c => c.Text).ToList(),
                Language         = Locale.EN,
                LanguageList     = LanguageUtil.GetLanguageList().ToSelectList("DisplayName", "TwoLetterCountryCode").ToList()
            };

            return(View(model));
        }