Пример #1
0
        public ActionResult Index()
        {
            logger.Debug("User " + WebSecurity.GetUserId(User.Identity.Name) +
                         " \"" + User.Identity.Name + "\" visited TestersManagement/Compilers/Index");

            ManageCompilersViewModel viewModel = new ManageCompilersViewModel();

            viewModel.Compilers = new List <Compiler>();
            repository.ProgrammingLanguages.Each(c =>
            {
                if (c.ProgrammingLanguageID != ProgrammingLanguages.Open)
                {
                    viewModel.Compilers.Add(new Compiler()
                    {
                        CompilerID = c.ProgrammingLanguageID,
                        Name       = c.Title,
                        Command    = Compilers.GetCommand(c.ProgrammingLanguageID),
                        Options    = Compilers.GetOptions(c.ProgrammingLanguageID),
                        Available  = c.Available,
                        Enable     = c.Enable
                    });
                }
            });

            return(View(viewModel));
        }