App_Code/UsersDal.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using DAL;
/// <summary>
///UsersDal 的摘要说明
/// </summary>
public class UsersDal
{
#region 03.根据ID获得实体对象 +MODEL.Users GetModel(int intId)
/// <summary>
/// 根据ID获得实体对象
/// </summary>
/// <param name="intId">id值</param>
/// <returns>实体对象</returns>
public Users GetModel(int intId)
{
StringBuilder strSql = new StringBuilder("select UserID,UserName,DepartID,SpeciID,ClassID,Room,img from Users ");
strSql.Append(" where UserID=@intId ");
Users model = new Users();
DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString(), new SqlParameter("@intId", intId));
if (dt.Rows.Count > 0)
{
LoadEntityData(model, dt.Rows[0]);
return model;
}
else
{
return null;
}
}
#endregion
#region 04.查询数据集合 +IList<Users> GetList()
/// <summary>
/// 查询数据集合
/// </summary>
public IList<Users> GetList()
{
return GetListByWhere("");
}
#endregion
#region 根据where条件查询数据集合 -IList<Users> GetListByWhere(string strWhere)
/// <summary>
/// 根据where条件查询数据集合
/// </summary>
internal IList<Users> GetListByWhere(string strWhere)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select UserID,UserName,DepartID,SpeciID,ClassID,Room,img ");
strSql.Append(" FROM Users ");
if (strWhere.Trim() != "")
{
strSql.Append(" where " + strWhere);
后面还有 157 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
