DAL/DAO/Logistics_PackageDAO.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// ******************************************************************
// 文件名: Logistics_PackageDAO.cs
// 主要内容: 操作包装信息对象的方法集合
// ******************************************************************
using System;
using System.Collections.Generic;
using Logistics.IDal;
using Logistics.Model;
using System.Data;
using System.Text;
using System.Data.SqlClient;
namespace Logistics.DAL.DAO
{
public class Logistics_PackageDAO:IDao
{
#region IDao 成员
public SqlConnection connection { get; set; }
public SqlTransaction transaction { get; set; }
/// <summary>
/// 添加一个对象
/// </summary>
/// <param name="m"></param>
/// <returns></returns>
public int add(object m)
{
Logistics_Package model = m as Logistics_Package;
int rowsAffected;
SqlParameter[] parameters = {
new SqlParameter("@Package_ID", SqlDbType.Int,4),
new SqlParameter("@Package_Name", SqlDbType.NVarChar,50),
new SqlParameter("@Package_Remark", SqlDbType.NText)};
parameters[0].Direction = ParameterDirection.Output;
parameters[1].Value = model.Package_Name;
parameters[2].Value = model.Package_Remark;
rowsAffected = SqlUtil.executeProcInt("UP_Logistics_Package_ADD", parameters, connection,transaction);
return (int)parameters[0].Value;
}
/// <summary>
/// 通过指定属性得到实体对象列表
/// </summary>
/// <param name="attribute"></param>
/// <param name="value"></param>
/// <returns></returns>
public DataTable getModelListByAttribute(string attribute, string value)
{
DataTable lo = new DataTable();
string where = attribute + "='" + value + "'";
lo = getModelList(0, where, null);
return lo;
}
/// <summary>
/// 通过条件得到实体列表对象列表
后面还有 115 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。