DAL/DAO/Logistics_ClientInfoDAO.cs

(开头部分) 7KB

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

// ******************************************************************
// 文件名: Logistics_ClientInfoDAO.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_ClientInfoDAO : 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_ClientInfo model = m as Logistics_ClientInfo;
            int rowsAffected;
            SqlParameter[] parameters = {
					new SqlParameter("@Clientinfo_ID", SqlDbType.Int,4),
					new SqlParameter("@ClientInfo_Name", SqlDbType.VarChar,50),
					new SqlParameter("@ClientInfo_Code", SqlDbType.NVarChar,16),
					new SqlParameter("@ClientInfo_Type", SqlDbType.VarChar,20),
					new SqlParameter("@ClientInfo_Contacts", SqlDbType.VarChar,20),
					new SqlParameter("@ClientInfo_Phone", SqlDbType.VarChar,13),
					new SqlParameter("@ClientInfo_Mobile", SqlDbType.VarChar,13),
					new SqlParameter("@ClientInfo_Fax", SqlDbType.VarChar,13),
					new SqlParameter("@ClientInfo_City", SqlDbType.VarChar,20),
					new SqlParameter("@ClientInfo_Adderss", SqlDbType.VarChar,100),
					new SqlParameter("@ClientInfo_Remark", SqlDbType.VarChar,100)};
            parameters[0].Direction = ParameterDirection.Output;
            parameters[1].Value = model.ClientInfo_Name;
            parameters[2].Value = model.ClientInfo_Code;
            parameters[3].Value = model.ClientInfo_Type;
            parameters[4].Value = model.ClientInfo_Contacts;
            parameters[5].Value = model.ClientInfo_Phone;
            parameters[6].Value = model.ClientInfo_Mobile;
            parameters[7].Value = model.ClientInfo_Fax;
            parameters[8].Value = model.ClientInfo_City;
            parameters[9].Value = model.ClientInfo_Adderss;
            parameters[10].Value = model.ClientInfo_Remark;

            rowsAffected = SqlUtil.executeProcInt("UP_Logistics_ClientInfo_ADD", parameters, connection,transaction);

            return (int)parameters[0].Value;
        }
后面还有 149 行代码,购买后查看完整代码

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

AI 解读 AI

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

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