示例#1
0
        public ActionResult Edit(UserViewModel model)
        {
            var userid = (long)Session["userid"];

            ViewBag.ListRole = new SelectList(RoleRepo.All(null), "id", "name");//untuk dropdownlist
            ResponResultViewModel result = UserRepo.Update(model, userid);

            return(Json(new
            {
                success = result.Success,
                message = result.Message,
                entity = result.Entity
            }, JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public ActionResult Edit(long id)
 {
     ViewBag.RoleList = new SelectList(RoleRepo.All(), "Id", "Name");
     ViewBag.rdyes    = null;
     ViewBag.rdno     = null;
     if (UserRepo.GetMobile_flag(id))
     {
         ViewBag.rdyes = "checked";
     }
     else
     {
         ViewBag.rdno = "checked";
     }
     return(PartialView("_Edit", UserRepo.ById(id)));
 }
示例#3
0
 //Edit
 public ActionResult Edit(int id)
 {
     ViewBag.ListRole = new SelectList(RoleRepo.All(null), "id", "name");//untuk dropdownlist
     return(PartialView("_Edit", UserRepo.GetUser(id)));
 }
示例#4
0
 //Create
 public ActionResult Create()
 {
     ViewBag.ListRole = new SelectList(RoleRepo.All(null), "id", "name");//untuk dropdownlist
     return(PartialView("_Create"));
 }
示例#5
0
 public ActionResult Create()
 {
     ViewBag.RoleList = new SelectList(RoleRepo.All(), "Id", "Name");
     return(PartialView("_Create"));
 }
 public ActionResult Search(long id = 0)
 {
     ViewBag.RoleList = new SelectList(RoleRepo.All(), "id", "name");
     return(PartialView("_Search", MenuAccessRepo.GetBySearch(id)));
 }
示例#7
0
 public ActionResult List()
 {
     return(PartialView("_List", RoleRepo.All()));
 }
示例#8
0
 // List
 public ActionResult List(string search)
 {
     return(PartialView("_List", RoleRepo.All(search)));
 }
示例#9
0
 // GET: Role
 public ActionResult Index(string search)
 {
     return(View(RoleRepo.All(search)));
 }
示例#10
0
 public ActionResult RoleList()
 {
     return(PartialView("_RoleList", RoleRepo.All(null)));
 }
示例#11
0
 public ActionResult Create()
 {
     ViewBag.RoleList = new SelectList(RoleRepo.All(null), "id", "name");
     ViewBag.MenuList = new SelectList(MenuRepo.All(null), "id", "title");
     return(PartialView("_Create"));
 }
示例#12
0
 // GET: MenuAccess
 public ActionResult Index()
 {
     ViewBag.RoleList = new SelectList(RoleRepo.All(null), "id", "name");
     return(View(MenuAccessRepo.All()));
 }