DAL/DAO/Logistics_LogDAO.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

// ******************************************************************
// 文件名: Logistics_LogDAO.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_LogDAO : 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_Log model = m as Logistics_Log;
            int rowsAffected;
            SqlParameter[] parameters = {
					new SqlParameter("@Log_ID", SqlDbType.Int,4),
					new SqlParameter("@User_ID", SqlDbType.Int,4),
					new SqlParameter("@Log_TableName", SqlDbType.VarChar,40),
					new SqlParameter("@Log_Action", SqlDbType.VarChar,20),
					new SqlParameter("@Log_Time", SqlDbType.DateTime),
					new SqlParameter("@Log_Remark", SqlDbType.NText),
					new SqlParameter("@Log_RowID", SqlDbType.Int,4)};
            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value = model.User_ID;
            parameters[2].Value = model.Log_TableName;
            parameters[3].Value = model.Log_Action;
            parameters[4].Value = model.Log_Time;
            parameters[5].Value = model.Log_Remark;
            parameters[6].Value = model.Log_RowID;

            rowsAffected = SqlUtil.executeProcInt("UP_Logistics_Log_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();
后面还有 130 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。