Пример #1
0
        // GET: Project/Create
        public ActionResult Create()
        {
            IdentityServer.Models.Project projectModel = new IdentityServer.Models.Project();
            // dropdowlist
            List <string> Projects = new List <string> {
                "New", "On_going", "Done"
            };

            ViewData["project"] = new SelectList(Projects);
            ///
            var prod = cs.GetAll();

            ViewData["Users"] = new SelectList(prod, "Id", "LastName");
            // ViewBag.Producteur = new SelectList(prod, "ProducteurId", "Nom");

            var x = us.GetMany(a => a.UserRole.Equals("Client")).
                    Select(w => new SelectListItem
            {
                Text  = w.LastName,
                Value = w.Id.ToString()
            });

            projectModel.Clientss = x;

            var x1 = comps.GetAll().
                     Select(w => new SelectListItem
            {
                Text  = w.Label,
                Value = w.idCompetence.ToString()
            });

            projectModel.Competencess = x1;

            return(View(projectModel));
        }
        // GET: Competence
        public ActionResult Index()
        {
            var skill = cs.GetAll();


            List <Competence> fVM = new List <Competence>();

            foreach (var item in skill)
            {
                fVM.Add(
                    new Competence
                {
                    idCompetence  = item.idCompetence,
                    Label         = item.Label,
                    Dificulty     = item.Dificulty,
                    RessourceName = item.ress.Nom,
                });
            }
            return(View(fVM));
        }