SQLServerDAL/ETogoCollect.cs

(开头部分) 17KB

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

// ETogoCollect.cs:餐馆/餐品收藏
// CopyRight (c) 2009-2016 WMPT Teconology. All Rights Reserved.
// 123@163.com.com
// 2010-04-01
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using WMPT.Model;
using WMPT.Common;
using WMPT.DBUtility;

using System.Data.SqlClient;

namespace WMPT.SQLServerDAL
{
    public class ETogoCollect
    {
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int AddFood(ETogoFoodCollectInfo model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into ETogoFoodCollect(");
            strSql.Append("foodid,togoid,userid,ctime,inve1,inve2)");
            strSql.Append(" values (");
            strSql.Append("@foodid,@togoid,@userid,@ctime,@inve1,@inve2)");
            SqlParameter[] parameters = 
            {
				new SqlParameter("@foodid", SqlDbType.Int,4),
				new SqlParameter("@togoid", SqlDbType.Int,4),
				new SqlParameter("@userid", SqlDbType.Int,4),
				new SqlParameter("@ctime", SqlDbType.DateTime),
				new SqlParameter("@inve1", SqlDbType.Int,4),
				new SqlParameter("@inve2", SqlDbType.VarChar,50)
            };
            parameters[0].Value = model.foodid;
            parameters[1].Value = model.togoid;
            parameters[2].Value = model.userid;
            parameters[3].Value = model.ctime;
            parameters[4].Value = model.inve1;
            parameters[5].Value = model.inve2;

            return SQLHelper.ExecuteNonQuery(CommandType.Text, strSql.ToString(), parameters);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int AddTogo(ETogoCollectInfo model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into ETogoCollect(");
            strSql.Append("togoid,userid,ctime,inve1,inve2)");
            strSql.Append(" values (");
            strSql.Append("@togoid,@userid,@ctime,@inve1,@inve2)");
            SqlParameter[] parameters = 
            {
后面还有 346 行代码,购买后查看完整代码

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

AI 解读 AI

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

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