SQLServerDAL/Foodinfo.cs

(开头部分) 23KB

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

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
{
    /// <summary>
    /// 菜品
    /// </summary>
    public class Foodinfo
    {
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(FoodinfoInfo model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into Foodinfo(");
            strSql.Append("InUse,FoodNo,FPrice,FPInDate,FPActiveDate,FPMaster,FoodName,FoodNamePy,FullPrice,Remains,MaxPerDay,Taste,Picture,FoodType,OrderNum,isrecommend,isspecial,isauth,opentime,Oldnum)");
            strSql.Append(" values (");
            strSql.Append("@InUse,@FoodNo,@FPrice,@FPInDate,@FPActiveDate,@FPMaster,@FoodName,@FoodNamePy,@FullPrice,@Remains,@MaxPerDay,@Taste,@Picture,@FoodType,@OrderNum,@isrecommend,@isspecial,@isauth,@opentime,@Oldnum)");
            SqlParameter[] parameters =
            {
				new SqlParameter("@InUse", SqlDbType.VarChar,10),
				new SqlParameter("@FoodNo", SqlDbType.VarChar,10),
				new SqlParameter("@FPrice", SqlDbType.Decimal),
				new SqlParameter("@FPInDate", SqlDbType.DateTime),
				new SqlParameter("@FPActiveDate", SqlDbType.DateTime),
				new SqlParameter("@FPMaster", SqlDbType.Int,8),
				new SqlParameter("@FoodName", SqlDbType.VarChar,256),
				new SqlParameter("@FoodNamePy", SqlDbType.VarChar,256),
				new SqlParameter("@FullPrice", SqlDbType.Decimal),
				new SqlParameter("@Remains", SqlDbType.Int,4),
				new SqlParameter("@MaxPerDay", SqlDbType.Int,4),
				new SqlParameter("@Taste", SqlDbType.Text),
				new SqlParameter("@Picture", SqlDbType.VarChar,50),
                new SqlParameter("@FoodType", SqlDbType.Int,4),
                new SqlParameter("@OrderNum", SqlDbType.Int,4),
				new SqlParameter("@isrecommend", SqlDbType.Int,4),
                new SqlParameter("@isspecial", SqlDbType.Int,4),
                new SqlParameter("@isauth", SqlDbType.Int,4),
                new SqlParameter("@opentime", SqlDbType.VarChar,255),
                 new SqlParameter("@Oldnum", SqlDbType.Int,4)
              };
            parameters[0].Value = model.InUse;
            parameters[1].Value = model.FoodNo;
            parameters[2].Value = model.FPrice;
            parameters[3].Value = model.FPInDate;
            parameters[4].Value = model.FPActiveDate;
            parameters[5].Value = model.FPMaster;
            parameters[6].Value = model.FoodName;
            parameters[7].Value = model.FoodNamePy;
后面还有 472 行代码,购买后查看完整代码

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

AI 解读 AI

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

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