Beispiel #1
0
        public ActionResult GetProjectEngineerList()
        {
            var user  = userApp.GetUserList();
            var role  = roleApp.GetRoleUser("工程师");
            var query = from u in user
                        join r in role
                        on u.F_RoleId equals r
                        select new TreeSelectModel
            {
                id   = u.F_RealName,
                text = u.F_RealName
            };

            return(Content(query.ToJson()));
        }
 public ActionResult GetUserRole()
 {
     try
     {
         var roleId     = OperatorProvider.Provider.GetCurrent().RoleId;
         var roleIdList = roleApp.GetRoleUser("IE工程师");
         if (roleIdList.Contains(roleId))
         {
             return(Json(true, JsonRequestBehavior.AllowGet));
         }
         return(Json(false, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         throw;
     }
 }