DAL/ComDataList.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;
namespace JY.DAL
{
/// <summary>
/// 数据访问类:ComDataList
/// </summary>
public partial class ComDataList
{
public ComDataList()
{}
#region Method
/// <summary>
/// 获得通用数据
/// </summary>
public DataTable GetComList(int top, string fields, string tables, string where, string fieldorder)
{
try
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select ");
if (top > 0)
{
strSql.Append(" top " + top.ToString());
}
if (fields.Trim() != "")
{
strSql.Append(" " + fields + " ");
}
else
{
return null;
}
if (tables.Trim() != "")
{
strSql.Append(" from " + tables + " ");
}
else
{
return null;
}
if (where.Trim() != "")
{
strSql.Append(" where " + where);
}
if (fieldorder.Trim() != "")
{
strSql.Append(" order by " + fieldorder);
}
return DbHelperSQL.Query(strSql.ToString()).Tables[0];
}
catch (Exception ex)
{
throw ex;
}
后面还有 6 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
