private user GetUserPPid(int pid, IuserService userService) { if (pid != 0) { var item = userService.LoadEntities(n => n.id == pid).FirstOrDefault(); if (item != null && item.pid != 0) { return(userService.LoadEntities(n => n.id == item.pid).FirstOrDefault()); } return(null); } return(null); }