App_Code/DAL/Product.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
namespace HZP.DAL
{
/// <summary>
/// 数据访问类:Product
/// </summary>
public partial class Product
{
public Product()
{ }
#region Method
/// <summary>
/// 是否存在该记录
/// </summary>
public bool Exists(int pid)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select count(1) from Product");
strSql.Append(" where pid=" + pid + " ");
return DbHelperOleDb.Exists(strSql.ToString());
}
/// <summary>
/// 增加一条数据
/// </summary>
public int Add(HZP.Model.Product model)
{
StringBuilder strSql = new StringBuilder();
StringBuilder strSql1 = new StringBuilder();
StringBuilder strSql2 = new StringBuilder();
if (model.pname != null)
{
strSql1.Append("pname,");
strSql2.Append("'" + model.pname + "',");
}
if (model.price != null)
{
strSql1.Append("price,");
strSql2.Append("" + model.price + ",");
}
if (model.info != null)
{
strSql1.Append("info,");
strSql2.Append("'" + model.info + "',");
}
if (model.ptype != null)
{
strSql1.Append("ptype,");
strSql2.Append("'" + model.ptype + "',");
}
if (model.pimg != null)
{
strSql1.Append("pimg,");
strSql2.Append("'" + model.pimg + "',");
}
后面还有 200 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
