DAL/cheliangxinxi.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
using Maticsoft.DBUtility;//Please add references
namespace Maticsoft.DAL
{
/// <summary>
/// 数据访问类:cheliangxinxi
/// </summary>
public partial class cheliangxinxi
{
public cheliangxinxi()
{}
#region BasicMethod
/// <summary>
/// 增加一条数据
/// </summary>
public int Add(Maticsoft.Model.cheliangxinxi model)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("insert into cheliangxinxi(");
strSql.Append("chepai,chexing,yanse,huzhu,xingming,chewei,beizhu)");
strSql.Append(" values (");
strSql.Append("@chepai,@chexing,@yanse,@huzhu,@xingming,@chewei,@beizhu)");
strSql.Append(";select @@IDENTITY");
SqlParameter[] parameters = {
new SqlParameter("@chepai", SqlDbType.VarChar,50),
new SqlParameter("@chexing", SqlDbType.VarChar,50),
new SqlParameter("@yanse", SqlDbType.VarChar,50),
new SqlParameter("@huzhu", SqlDbType.VarChar,50),
new SqlParameter("@xingming", SqlDbType.VarChar,50),
new SqlParameter("@chewei", SqlDbType.VarChar,50),
new SqlParameter("@beizhu", SqlDbType.VarChar,50)};
parameters[0].Value = model.chepai;
parameters[1].Value = model.chexing;
parameters[2].Value = model.yanse;
parameters[3].Value = model.huzhu;
parameters[4].Value = model.xingming;
parameters[5].Value = model.chewei;
parameters[6].Value = model.beizhu;
object obj = DbHelperSQL.GetSingle(strSql.ToString(),parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新一条数据
/// </summary>
public bool Update(Maticsoft.Model.cheliangxinxi model)
{
后面还有 269 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。