public ActionResult GetUserRoleToList(string Account) { RptUserRoleOP op = new RptUserRoleOP(); var data = op.GetListByUser(Account); return(Json(data)); }
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)); }