SQLServerDAL/FoodPackag.cs
(开头部分) 19KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Data;
using WMPT.DBUtility;
using WMPT.Model;
namespace WMPT.SQLServerDAL
{
/// <summary>
/// 套餐类
/// </summary>
public partial class FoodPackag
{
/// <summary>
/// 增加一条数据
/// </summary>
public int Add(FoodPackagInfo model)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into FoodPackag(");
strSql.Append("Code,ShopId,foodids,Num,cnum,Price,Unit,Tag,SectionId,Inve1,Inve2,state,title,sortnum,startdate,enddate,starttime,endtime,oldprice,ReveFloat1,ReveFloat2,ReveVar1,ReveVar2");
strSql.Append(") values (");
strSql.Append("@Code,@ShopId,@foodids,@Num,@cnum,@Price,@Unit,@Tag,@SectionId,@Inve1,@Inve2,@state,@title,@sortnum,@startdate,@enddate,@starttime,@endtime,@oldprice,@ReveFloat1,@ReveFloat2,@ReveVar1,@ReveVar2");
strSql.Append(") ");
strSql.Append(";select @@IDENTITY");
SqlParameter[] parameters =
{
new SqlParameter("@Code", SqlDbType.VarChar,50) ,
new SqlParameter("@ShopId", SqlDbType.Int,4) ,
new SqlParameter("@foodids", SqlDbType.VarChar,512) ,
new SqlParameter("@Num", SqlDbType.Int,4) ,
new SqlParameter("@cnum", SqlDbType.Int,4) ,
new SqlParameter("@Price", SqlDbType.Decimal,5) ,
new SqlParameter("@Unit", SqlDbType.VarChar,50) ,
new SqlParameter("@Tag", SqlDbType.Int,4) ,
new SqlParameter("@SectionId", SqlDbType.Int,4) ,
new SqlParameter("@Inve1", SqlDbType.Int,4) ,
new SqlParameter("@Inve2", SqlDbType.VarChar,256) ,
new SqlParameter("@state", SqlDbType.Int,4) ,
new SqlParameter("@title", SqlDbType.VarChar,256) ,
new SqlParameter("@sortnum", SqlDbType.Int,4) ,
new SqlParameter("@startdate", SqlDbType.DateTime) ,
new SqlParameter("@enddate", SqlDbType.DateTime) ,
new SqlParameter("@starttime", SqlDbType.DateTime) ,
new SqlParameter("@endtime", SqlDbType.DateTime) ,
new SqlParameter("@oldprice", SqlDbType.Decimal,5) ,
new SqlParameter("@ReveFloat1", SqlDbType.Decimal,5) ,
new SqlParameter("@ReveFloat2", SqlDbType.Decimal,5) ,
new SqlParameter("@ReveVar1", SqlDbType.VarChar,256) ,
new SqlParameter("@ReveVar2", SqlDbType.VarChar,256)
};
parameters[0].Value = model.Code;
parameters[1].Value = model.ShopId;
parameters[2].Value = model.foodids;
parameters[3].Value = model.Num;
后面还有 330 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
