Dal/DProduct.cs

(开头部分) 33KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Data.SqlClient;
using System.Data;


namespace Dal
{
    public class DProduct
    {
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(MProduct model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into Product(");
            strSql.Append("P_Id,P_SortId,P_Name,P_Name2,P_Title,P_Keywords,P_Description,P_Pic,P_Pic2,P_AttachName,P_Click,P_Key,P_Price,P_Model,P_Chengfeng,P_GuiGe,P_Color,P_Date,P_Url,P_Order,P_Size,P_Size2,P_AttachSize,P_Css,P_Memo,P_Memo2,P_Content,P_Content2,P_Special,P_New,P_Hot,P_Shelves)");
            strSql.Append(" values (");
            strSql.Append("@P_Id,@P_SortId,@P_Name,@P_Name2,@P_Title,@P_Keywords,@P_Description,@P_Pic,@P_Pic2,@P_AttachName,@P_Click,@P_Key,@P_Price,@P_Model,@P_Chengfeng,@P_GuiGe,@P_Color,@P_Date,@P_Url,@P_Order,@P_Size,@P_Size2,@P_AttachSize,@P_Css,@P_Memo,@P_Memo2,@P_Content,@P_Content2,@P_Special,@P_New,@P_Hot,@P_Shelves)");
            SqlParameter[] parameters = {
					new SqlParameter("@P_Id", SqlDbType.Int,4),
					new SqlParameter("@P_SortId", SqlDbType.Int,4),
					new SqlParameter("@P_Name", SqlDbType.VarChar,255),
					new SqlParameter("@P_Name2", SqlDbType.VarChar,255),
					new SqlParameter("@P_Title", SqlDbType.VarChar,255),
					new SqlParameter("@P_Keywords", SqlDbType.VarChar,255),
					new SqlParameter("@P_Description", SqlDbType.VarChar,255),
					new SqlParameter("@P_Pic", SqlDbType.VarChar,255),
					new SqlParameter("@P_Pic2", SqlDbType.VarChar,255),
					new SqlParameter("@P_AttachName", SqlDbType.VarChar,255),
					new SqlParameter("@P_Click", SqlDbType.Int,4),
					new SqlParameter("@P_Key", SqlDbType.VarChar,255),
					new SqlParameter("@P_Price", SqlDbType.Decimal,8),
					new SqlParameter("@P_Model", SqlDbType.VarChar,255),
					new SqlParameter("@P_Chengfeng", SqlDbType.VarChar,255),
					new SqlParameter("@P_GuiGe", SqlDbType.VarChar,255),
					new SqlParameter("@P_Color", SqlDbType.VarChar,255),
					new SqlParameter("@P_Date", SqlDbType.DateTime),
					new SqlParameter("@P_Url", SqlDbType.VarChar,255),
					new SqlParameter("@P_Order", SqlDbType.Int,4),
					new SqlParameter("@P_Size", SqlDbType.VarChar,255),
					new SqlParameter("@P_Size2", SqlDbType.VarChar,255),
					new SqlParameter("@P_AttachSize", SqlDbType.VarChar,255),
					new SqlParameter("@P_Css", SqlDbType.VarChar,255),
					new SqlParameter("@P_Memo", SqlDbType.Text),
					new SqlParameter("@P_Memo2", SqlDbType.Text),
					new SqlParameter("@P_Content", SqlDbType.Text),
					new SqlParameter("@P_Content2", SqlDbType.Text),
					new SqlParameter("@P_Special", SqlDbType.Int,4),
					new SqlParameter("@P_New", SqlDbType.Int,4),
					new SqlParameter("@P_Hot", SqlDbType.Int,4),
					new SqlParameter("@P_Shelves", SqlDbType.Int,4)};
            parameters[0].Value = model.P_Id;
            parameters[1].Value = model.P_SortId;
            parameters[2].Value = model.P_Name;
            parameters[3].Value = model.P_Name2;
后面还有 596 行代码,解锁后查看完整代码

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

AI 解读

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

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