SQLServerDAL/batshopcard.cs

(开头部分) 17KB

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

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

using WMPT.Model;
using WMPT.DBUtility;//请先添加引用
namespace WMPT.SQLServerDAL
{
    /// <summary>
    /// 优惠券批次
    /// </summary>
    public class batshopcard
    {
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(batshopcardInfo model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into batshopcard(");
            strSql.Append("title,batnum,AddDate,cantimes,point,Inve1,Inve2,CardCount,contents,AdminName,sortnum,usedcount,starttime,endtime,mtype,mydiscount,foossortids,timelimity,moneylimity,moneyline");
            strSql.Append(") values (");
            strSql.Append("@title,@batnum,@AddDate,@cantimes,@point,@Inve1,@Inve2,@CardCount,@contents,@AdminName,@sortnum,@usedcount,@starttime,@endtime,@mtype,@mydiscount,@foossortids,@timelimity,@moneylimity,@moneyline");
            strSql.Append(") ");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = 
			{
	            new SqlParameter("@title", SqlDbType.VarChar,256) ,            
                new SqlParameter("@batnum", SqlDbType.VarChar,20) ,            
                new SqlParameter("@AddDate", SqlDbType.DateTime) ,            
                new SqlParameter("@cantimes", SqlDbType.Int,4) ,            
                new SqlParameter("@point", SqlDbType.Decimal) ,            
                new SqlParameter("@Inve1", SqlDbType.Int,4) ,            
                new SqlParameter("@Inve2", SqlDbType.VarChar,256) ,            
                new SqlParameter("@CardCount", SqlDbType.Int,4) ,            
                new SqlParameter("@contents", SqlDbType.Text) ,            
                new SqlParameter("@AdminName", SqlDbType.VarChar,50) ,            
                new SqlParameter("@sortnum", SqlDbType.Int,4) ,            
                new SqlParameter("@usedcount", SqlDbType.Int,4) ,            
                new SqlParameter("@starttime", SqlDbType.DateTime) ,            
                new SqlParameter("@endtime", SqlDbType.DateTime) ,            
                new SqlParameter("@mtype", SqlDbType.Int,4) ,            
                new SqlParameter("@mydiscount", SqlDbType.Int,4) ,            
                new SqlParameter("@foossortids", SqlDbType.VarChar,256) ,            
                new SqlParameter("@timelimity", SqlDbType.Int,4) ,            
                new SqlParameter("@moneylimity", SqlDbType.Int,4) ,            
                new SqlParameter("@moneyline", SqlDbType.Int,4)             
              
            };

            parameters[0].Value = model.title;
            parameters[1].Value = model.batnum;
            parameters[2].Value = model.AddDate;
            parameters[3].Value = model.cantimes;
            parameters[4].Value = model.point;
            parameters[5].Value = model.Inve1;
            parameters[6].Value = model.Inve2;
            parameters[7].Value = model.CardCount;
后面还有 313 行代码,购买后查看完整代码

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

AI 解读 AI

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

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