Esempio n. 1
0
        public ActionResult Getdate()
        {
            GroupBLL   grBLL  = new GroupBLL();
            SelectList listGr = new SelectList(grBLL.Getall(), "IdGroup", "Name");

            ViewBag.ListGroup = listGr;
            return(View());
        }
Esempio n. 2
0
        public ActionResult Register()
        {
            GroupBLL   grBLL  = new GroupBLL();
            SelectList listGr = new SelectList(grBLL.Getall(), "IdGroup", "Name");

            ViewBag.listGr = listGr;
            RoleBLL    roleBLL  = new RoleBLL();
            SelectList listRole = new SelectList(roleBLL.Getall(), "IdRole", "Name");

            ViewBag.listRole = listRole.Where(p => p.Value == "2").First().Text;
            return(View());
        }