private void WriteLangsToViewBag()
        {
            List <string> langs     = new List <string>(config["Langs"].Split(','));
            List <string> nameLangs = new List <string>();

            langs.ForEach(elem =>
            {
                nameLangs.Add(helperWork.FirstUpper(new CultureInfo(elem).NativeName));
            });
            ViewBag.langs         = langs;
            ViewBag.langsFullName = nameLangs;
        }
Exemplo n.º 2
0
        public void WriteLangsToViewBag()
        {
            List <string> langs     = new List <string>(ConfigurationManager.AppSettings["langs"].Split(','));
            List <string> nameLangs = new List <string>();

            langs.ForEach(elem =>
            {
                nameLangs.Add(HelperWorkWithData.FirstUpper(new CultureInfo(elem).NativeName));
            });
            ViewBag.langs         = langs;
            ViewBag.langsFullName = nameLangs;
        }
        public async Task WriteLangsToViewBag()
        {
            var people = await manager.GetPeople(int.Parse(User.Identity.Name));

            ViewData["Email"] = people.Email;
            List <string> langs     = new List <string>(config["Langs"].Split(','));
            List <string> nameLangs = new List <string>();

            langs.ForEach(elem =>
            {
                nameLangs.Add(helperWork.FirstUpper(new CultureInfo(elem).NativeName));
            });
            ViewBag.langs         = langs;
            ViewBag.langsFullName = nameLangs;
        }