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>
 /// 分页获取符合查询条件的数据
 /// </summary>
 /// <param name="flowAuthRoleQuery">FlowAuthRoleQuery查询实体对象</param>
 /// <returns>Pager<FlowAuthRoleEntity></returns>
 public List <FlowAuthRoleEntity> GetFlowAuthRoleList(FlowAuthRoleQuery flowAuthRoleQuery)
 {
     return(FlowAuthRoleBusProvider.GetFlowAuthRoleList(flowAuthRoleQuery));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 将查询实体转换为Order语句
 /// <param name="query">查询实体</param>
 /// <returns>获取Order语句,不包含Order</returns>
 /// </summary>
 public string FlowAuthRoleQueryToSQLOrder(FlowAuthRoleQuery query)
 {
     return(" RoleAuthID DESC");
 }
Ejemplo n.º 4
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.º 5
0
 /// <summary>
 /// 分页获取符合查询条件的数据
 /// </summary>
 /// <param name="flowAuthRoleQuery">FlowAuthRoleQuery查询实体对象</param>
 /// <returns>Pager<FlowAuthRoleEntity></returns>
 public List <FlowAuthRoleEntity> GetFlowAuthRoleList(FlowAuthRoleQuery flowAuthRoleQuery)
 {
     return(FlowAuthRoleDataAccess.Instance.GetFlowAuthRoleList(flowAuthRoleQuery));
 }