示例#1
0
 public ResponseResult<List<Performer>> GetUserByRole(int id)
 {
     var result = ResponseResult<List<Performer>>.Default();
     try
     {
         var performList = new List<Performer>();
         var wfService = new WorkflowService();
         var itemList = wfService.GetUserByRole(id).ToList();
         foreach (var item in itemList)
         {
             Performer performer = new Performer(item.UserID.ToString(), item.UserName);
             performList.Add(performer);
         }
         result = ResponseResult<List<Performer>>.Success(performList, "成功获取流角色用户数据!");
     }
     catch (System.Exception ex)
     {
         result = ResponseResult<List<Performer>>.Error(string.Format(
             "获取角色用户数据失败, 异常信息:{0}",
             ex.Message));
     }
     return result;
 }