DAL/DAO/Logistics_FinanceDAO.cs

(开头部分) 7KB

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

// ******************************************************************
// 文件名: Logistics_FinanceDAO.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_FinanceDAO: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_Finance model = m as Logistics_Finance;
            int rowsAffected;
            SqlParameter[] parameters = {
					new SqlParameter("@Finance_ID", SqlDbType.Int,4),
					new SqlParameter("@Costtype_ID", SqlDbType.Int,4),
					new SqlParameter("@User_ID", SqlDbType.Int,4),
					new SqlParameter("@FCU_ID", SqlDbType.Int,4),
					new SqlParameter("@FC_ID", SqlDbType.Int,4),
					new SqlParameter("@Transit_ID", SqlDbType.Int,4),
					new SqlParameter("@Company_ID", SqlDbType.Int,4),
					new SqlParameter("@Finance_Object", SqlDbType.NVarChar,50),
					new SqlParameter("@Finance_amount", SqlDbType.Float,8),
					new SqlParameter("@Finance_Time", SqlDbType.DateTime)};
            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value = model.Costtype_ID;
            parameters[2].Value = model.User_ID;
            parameters[3].Value = model.FCU_ID;
            parameters[4].Value = model.FC_ID;
            parameters[5].Value = model.Transit_ID;
            parameters[6].Value = model.Company_ID;
            parameters[7].Value = model.Finance_Object;
            parameters[8].Value = model.Finance_amount;
            parameters[9].Value = model.Finance_Time;

            rowsAffected = SqlUtil.executeProcInt("UP_Logistics_Finance_ADD", parameters, connection,transaction);
            return (int)parameters[0].Value;
        }

        /// <summary>
        /// 通过指定属性得到实体对象列表
        /// </summary>
        /// <param name="attribute"></param>
后面还有 142 行代码,购买后查看完整代码

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

AI 解读 AI

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

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