jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using HanHe.Utility.Data;
using HH.WMS.DAL;
using HH.WMS.Entitys.Common;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace HH.WMS.DAL.CoreServer
{
    public class InDataDAL : DapperBaseDAL
    {
        public SqlExecuteResult UpdateRdrecordCheckState(string cCode, string collectionName)
        {
            string strSql = @"update " + collectionName + @" set bIsRead_WMS=1,cReader_WMS=:cReader_WMS,dReadDate_WMS=getdate() WHERE cCode=:cCode ";
            DbCommand cmd = DataAccess.GetSqlStringCommand(strSql);
            DataAccess.AddInParameter(cmd, "cReader_WMS", ComDbType.STRING, "汉和信息");
            DataAccess.AddInParameter(cmd, "cCode", ComDbType.STRING, cCode);
 
            return ExecuteCommand(cmd, null);
        }
 
        public DataTable GetInMstData(string tableName)
        {
            string sql = @" select top 50 * from " + tableName + @" where bIsRead_WMS=0 ";
            DbCommand cmd = DataAccess.GetSqlStringCommand(sql);
            DataTable dt = DataAccessExtensive.ExecuteDataTable(this.DataAccess, cmd);
            return dt;
        }
 
        public DataTable GetInDtlData(string collectionName, string cCode)
        {
            string sql = @" select top 50 * from " + collectionName + @" where cCode='" + cCode + "' ";
            DbCommand cmd = DataAccess.GetSqlStringCommand(sql);
            DataTable dt = DataAccessExtensive.ExecuteDataTable(this.DataAccess, cmd);
            return dt;
        }
    }
}