コード例 #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));
        }
コード例 #2
0
        // GET: Project/Edit/5
        public ActionResult Edit(int id)
        {
            IdentityServer.Models.Project projectModel = new IdentityServer.Models.Project();
            // dropdowlist
            List <string> Projects = new List <string> {
                "New", "On_going", "Done"
            };

            ViewData["project"] = new SelectList(Projects);
            return(View());
        }