Ejemplo n.º 1
0
 public List<FlowAuthRoleEntity> GetFlowAuthRoleList(FlowAuthRoleQuery query)
 {
     List<FlowAuthRoleEntity> list = new List<FlowAuthRoleEntity>();
     StringBuilder sqlCommandText = new StringBuilder();
     sqlCommandText.Append("SELECT RoleAuthID,JournalID,ActionID,RoleID,AddDate FROM dbo.FlowAuthRole WITH(NOLOCK)");
     string whereSQL = FlowAuthRoleQueryToSQLWhere(query);
     string orderBy = FlowAuthRoleQueryToSQLOrder(query);
     if (!string.IsNullOrEmpty(whereSQL)) sqlCommandText.Append(" WHERE " + whereSQL);
     if (!string.IsNullOrEmpty(orderBy)) sqlCommandText.Append(" ORDER BY " + orderBy);
     DbCommand cmd = db.GetSqlStringCommand(sqlCommandText.ToString());
     using (IDataReader dr = db.ExecuteReader(cmd))
     {
         list = MakeFlowAuthRoleList(dr);
     }
     return list;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 将查询实体转换为Order语句
 /// <param name="query">查询实体</param>
 /// <returns>获取Order语句,不包含Order</returns>
 /// </summary>
 public string FlowAuthRoleQueryToSQLOrder(FlowAuthRoleQuery query)
 {
     return " RoleAuthID DESC";
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 将查询实体转换为Where语句
 /// <param name="query">查询实体</param>
 /// <returns>获取Where语句,不包含Where</returns>
 /// </summary>
 public string FlowAuthRoleQueryToSQLWhere(FlowAuthRoleQuery query)
 {
     StringBuilder sbWhere = new StringBuilder(" JournalID = " + query.JournalID + " AND ActionID = " + query.ActionID);
     return sbWhere.ToString();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 分页获取符合查询条件的数据
 /// </summary>
 /// <param name="flowAuthRoleQuery">FlowAuthRoleQuery查询实体对象</param>
 /// <returns>Pager<FlowAuthRoleEntity></returns>
 public List<FlowAuthRoleEntity> GetFlowAuthRoleList(FlowAuthRoleQuery flowAuthRoleQuery)
 {
     return FlowAuthRoleDataAccess.Instance.GetFlowAuthRoleList(flowAuthRoleQuery);
 }
Ejemplo n.º 5
0
 public ActionResult GetFlowAuthRoleListAjax(FlowAuthRoleQuery query)
 {
     IFlowFacadeService service = ServiceContainer.Instance.Container.Resolve<IFlowFacadeService>();
     query.JournalID = CurAuthor.JournalID;
     List<FlowAuthRoleEntity> listResult = service.GetFlowAuthRoleList(query);
     return Json(new { Rows = listResult });
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 分页获取符合查询条件的数据
 /// </summary>
 /// <param name="flowAuthRoleQuery">FlowAuthRoleQuery查询实体对象</param>
 /// <returns>Pager<FlowAuthRoleEntity></returns>
 public List<FlowAuthRoleEntity> GetFlowAuthRoleList(FlowAuthRoleQuery flowAuthRoleQuery)
 {
     return FlowAuthRoleBusProvider.GetFlowAuthRoleList(flowAuthRoleQuery);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 获取审稿环节角色权限列表
 /// </summary>
 /// <param name="queryFlowAuthRole"></param>
 /// <returns></returns>
 public List<FlowAuthRoleEntity> GetFlowAuthRoleList(FlowAuthRoleQuery queryFlowAuthRole)
 {
     HttpClientHelper clientHelper = new HttpClientHelper();
     List<FlowAuthRoleEntity> flowAuthRoleList = clientHelper.PostAuth<List<FlowAuthRoleEntity>, FlowAuthRoleQuery>(GetAPIUrl(APIConstant.FLOW_GETFLOWAUTHROLELIST), queryFlowAuthRole);
     if (flowAuthRoleList != null)
     {
         foreach (FlowAuthRoleEntity item in flowAuthRoleList)
         {
             item.RoleName = GetRoleName(item.RoleID);
         }
     }
     return flowAuthRoleList;
 }
Ejemplo n.º 8
0
 public List<FlowAuthRoleEntity> GetFlowAuthRoleList(FlowAuthRoleQuery queryFlowAuthRole)
 {
     try
     {
         IFlowAuthRoleService flowAuthRoleService = ServiceContainer.Instance.Container.Resolve<IFlowAuthRoleService>();
         List<FlowAuthRoleEntity> listFlowAuthRole = flowAuthRoleService.GetFlowAuthRoleList(queryFlowAuthRole);
         return listFlowAuthRole;
     }
     catch (Exception ex)
     {
         LogProvider.Instance.Error("获取审稿流程角色权限出现异常:" + ex.Message);
         throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.Message));
     }
 }