DA/DBDepot.cs

(开头部分) 14KB

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

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Common;
namespace DA
{
    public class DBDepot : IDisposable
    {

        string sql, sql1,sql2;
        SqlHelpers sqlh;
       
        SqlDataReader dr;
        public DBDepot()
        {
            sqlh = new SqlHelpers();
        }
        public DBDepot(SqlHelpers sh)
        {
            sqlh = sh;
        }
        public void Dispose()
        {
            sqlh.Dispose();
        }

        /// <summary>
        /// DB  查询所有菜品类型的方法
        /// </summary>
        /// <returns></returns>
        public List<CDepot> DBDepotQuery()
        {

            List<CDepot> lmt = new List<CDepot>();
            //sql = "select a.orderID,a.orderNO,a.storeID,a.createUserID,a.userName,a.createDateTime,b.detailID,b.productID,b.Qty as Qty11 from productReceiveOrder as a,productReceiveOrderDetail as b where a.orderID=b.orderID";
            sql = "select  distinct pro.orderNO  ,p.ProductName,pro.orderID ,pro.storeID,   prod.Qty , p.ProductPrice ,p.CreateUserID ,ProductPrice*Qty as 'summoney',pro.createDateTime   from productReceiveOrder  as pro, productReceiveOrderDetail   as prod , Product  as p where p.ProductID=prod.productID and prod.orderID=pro.orderID  ";

            dr = sqlh.RQuery(sql, null, CommandType.Text);
            while (dr.Read())
            {
                CDepot cmt = new CDepot();
                cmt.OrderID =Convert.ToInt32( dr["orderID"]);
                cmt.OrderNO = dr["orderNO"].ToString();
                cmt.ProductName = dr["ProductName"].ToString();
                cmt.StoreID = dr["storeID"].ToString();
                cmt.Qty11 =Convert.ToInt32( dr["Qty"]);
                cmt.ProductPrice = dr["ProductPrice"].ToString();
                cmt.CreateUserID = dr["createUserID"].ToString();
                cmt.Summoney = dr["summoney"].ToString();
                //cmt.userName = dr["userName"].ToString();
                cmt.CreateDateTime = dr["createDateTime"].ToString();
                //cmt.DetailID1 = dr["DetailID"].ToString();
                //cmt.ProductID = dr["productID"].ToString();
                //cmt.Qty11 = dr["Qty"].ToString();
                lmt.Add(cmt);

            }
            dr.Close();
后面还有 280 行代码,购买后查看完整代码

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

AI 解读 AI

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

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