public ActionResult GetUserRoleToList(string Account) { RptUserRoleOP op = new RptUserRoleOP(); var data = op.GetListByUser(Account); return(Json(data)); }
public ActionResult UpateUserRole(string Account, string RoList) { RptUserRoleOP op = new RptUserRoleOP(); int resule = op.Update(Account, RoList, this.UserID); if (resule != 0) { return(Json(new { state = 1 })); } else { return(Json(new { state = "fail" })); } }
public ActionResult Query(string Account) { RptRoleOP op = new RptRoleOP(); RptUserRoleOP Uop = new RptUserRoleOP(); List <RPT_UserRole> RoleLst = Uop.GetListByUser(Account).ToList(); var data = op.GetList(RoleLst); List <SelectListItem> sss = new List <SelectListItem>(); foreach (var v in data) { sss.Add(new SelectListItem() { Text = v.RoleName, Value = v.RoleCode }); } return(Json(sss)); }