示例#1
0
        // GET: usersGuanli/Edit/5
        public ActionResult Edit(int id)
        {
            usersModel sd = new usersModel()
            {
                Id = id
            };
            List <usersModel> list = us.SelectBy(sd);
            usersModel        st   = new usersModel()
            {
                Id          = list[0].Id,
                u_name      = list[0].u_name,
                u_password  = list[0].u_password,
                u_true_name = list[0].u_true_name,
                Gid         = list[0].Gid
            };

            ViewData.Model = st;
            FillDrop();
            return(View(st));
        }
示例#2
0
        // GET: user_list/Edit/5
        public ActionResult user_edit(int id)
        {
            List <SelectListItem> list = FillDrop();

            ViewData["s"] = list;
            usersModel user = new usersModel
            {
                Id = id
            };
            List <usersModel> listu = iub.SelectBy(user);
            usersModel        u     = new usersModel
            {
                Id          = listu[0].Id,
                RoleID      = listu[0].RoleID,
                u_name      = listu[0].u_name,
                u_password  = listu[0].u_password,
                u_true_name = listu[0].u_true_name
            };

            ViewData.Model = u;
            return(View());
        }