/// <summary>
        /// Returns the QualificationLevels from the collection
        /// </summary>
        /// <param name="values">The collection containing the QualificationLevels values.</param>
        /// <param name="key">The key of the value to find</param>
        /// <returns>The found QualificationLevels values.</returns>
        public static QualificationLevels GetQueryStringQualificationLevels(NameValueCollection values, string key)
        {
            QualificationLevels result = new QualificationLevels();

            if (!string.IsNullOrEmpty(HttpUtility.HtmlDecode(values[key])))
            {
                string commaSepFile = HttpUtility.HtmlDecode(values[key]);
                result.QualificationLevel = commaSepFile.Split(new Char[] { ',' });
            }

            return(result);
        }
Beispiel #2
0
        public async Task <IActionResult> UserProps([Required] Cities city, [Required] QualificationLevels qualification)
        {
            if (ModelState.IsValid)
            {
                AppUser user = await CurrentUser;
                user.City          = city;
                user.Qualification = qualification;
                await userManager.UpdateAsync(user);

                return(RedirectToAction("Index"));
            }
            return(View(await CurrentUser));
        }
 public string QualificationLevelChecked(int value)
 {
     return(QualificationLevels != null && QualificationLevels.Contains(value) ? "checked=\"checked\"" : string.Empty);
 }