Beispiel #1
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string batteryID, string palletID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from OCVBattery");
            strSql.Append(" where batteryID=@batteryID and palletID=@palletID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@batteryID", SqlDbType.NVarChar, 50),
                new SqlParameter("@palletID",  SqlDbType.NVarChar, 50)
            };
            parameters[0].Value = batteryID;
            parameters[1].Value = palletID;

            return(DbHelperSQL.Exists(strSql.ToString(), parameters));
        }
Beispiel #2
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(long StockListID, long ManaTaskID, string StoreHouseName, string ProductCode, int ProductNum, string ProductStatus, string ProductFrameCode, string ProductName, string GoodsSiteName, string ProductBatchNum, DateTime InHouseTime, DateTime UpdateTime, string Remarks, long StockDetailID, string CoreCode, int CoreQualitySign, int CorePositionID, string TrayID, string GoodsSiteType, int GoodsSiteLayer, int GoodsSiteColumn, int GoodsSiteRow, string DeviceID, string GoodsSiteStoreStatus, string GoodsSiteRunStatus, string GoodsSiteInOutType, string GoodsSiteStoreType, int LogicStoreAreaID, int StoreAreaID, int GoodsSiteID, long StockID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from View_StockListDetail");
            strSql.Append(" where StockListID=@StockListID and ManaTaskID=@ManaTaskID and StoreHouseName=@StoreHouseName and ProductCode=@ProductCode and ProductNum=@ProductNum and ProductStatus=@ProductStatus and ProductFrameCode=@ProductFrameCode and ProductName=@ProductName and GoodsSiteName=@GoodsSiteName and ProductBatchNum=@ProductBatchNum and InHouseTime=@InHouseTime and UpdateTime=@UpdateTime and Remarks=@Remarks and StockDetailID=@StockDetailID and CoreCode=@CoreCode and CoreQualitySign=@CoreQualitySign and CorePositionID=@CorePositionID and TrayID=@TrayID and GoodsSiteType=@GoodsSiteType and GoodsSiteLayer=@GoodsSiteLayer and GoodsSiteColumn=@GoodsSiteColumn and GoodsSiteRow=@GoodsSiteRow and DeviceID=@DeviceID and GoodsSiteStoreStatus=@GoodsSiteStoreStatus and GoodsSiteRunStatus=@GoodsSiteRunStatus and GoodsSiteInOutType=@GoodsSiteInOutType and GoodsSiteStoreType=@GoodsSiteStoreType and LogicStoreAreaID=@LogicStoreAreaID and StoreAreaID=@StoreAreaID and GoodsSiteID=@GoodsSiteID and StockID=@StockID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@StockListID",          SqlDbType.BigInt,      8),
                new SqlParameter("@ManaTaskID",           SqlDbType.BigInt,      8),
                new SqlParameter("@StoreHouseName",       SqlDbType.NVarChar,   20),
                new SqlParameter("@ProductCode",          SqlDbType.NVarChar,   50),
                new SqlParameter("@ProductNum",           SqlDbType.Int,         4),
                new SqlParameter("@ProductStatus",        SqlDbType.NVarChar,   50),
                new SqlParameter("@ProductFrameCode",     SqlDbType.NVarChar,   50),
                new SqlParameter("@ProductName",          SqlDbType.NVarChar,   20),
                new SqlParameter("@GoodsSiteName",        SqlDbType.NVarChar,   20),
                new SqlParameter("@ProductBatchNum",      SqlDbType.NVarChar,   50),
                new SqlParameter("@InHouseTime",          SqlDbType.DateTime),
                new SqlParameter("@UpdateTime",           SqlDbType.DateTime),
                new SqlParameter("@Remarks",              SqlDbType.NVarChar,  100),
                new SqlParameter("@StockDetailID",        SqlDbType.BigInt,      8),
                new SqlParameter("@CoreCode",             SqlDbType.NVarChar,   50),
                new SqlParameter("@CoreQualitySign",      SqlDbType.Int,         4),
                new SqlParameter("@CorePositionID",       SqlDbType.Int,         4),
                new SqlParameter("@TrayID",               SqlDbType.NVarChar,   50),
                new SqlParameter("@GoodsSiteType",        SqlDbType.NVarChar,   50),
                new SqlParameter("@GoodsSiteLayer",       SqlDbType.Int,         4),
                new SqlParameter("@GoodsSiteColumn",      SqlDbType.Int,         4),
                new SqlParameter("@GoodsSiteRow",         SqlDbType.Int,         4),
                new SqlParameter("@DeviceID",             SqlDbType.NVarChar,   50),
                new SqlParameter("@GoodsSiteStoreStatus", SqlDbType.NVarChar,   50),
                new SqlParameter("@GoodsSiteRunStatus",   SqlDbType.NVarChar,   50),
                new SqlParameter("@GoodsSiteInOutType",   SqlDbType.NVarChar,   50),
                new SqlParameter("@GoodsSiteStoreType",   SqlDbType.NVarChar,   50),
                new SqlParameter("@LogicStoreAreaID",     SqlDbType.Int,         4),
                new SqlParameter("@StoreAreaID",          SqlDbType.Int,         4),
                new SqlParameter("@GoodsSiteID",          SqlDbType.Int,         4),
                new SqlParameter("@StockID",              SqlDbType.BigInt, 8)
            };
            parameters[0].Value  = StockListID;
            parameters[1].Value  = ManaTaskID;
            parameters[2].Value  = StoreHouseName;
            parameters[3].Value  = ProductCode;
            parameters[4].Value  = ProductNum;
            parameters[5].Value  = ProductStatus;
            parameters[6].Value  = ProductFrameCode;
            parameters[7].Value  = ProductName;
            parameters[8].Value  = GoodsSiteName;
            parameters[9].Value  = ProductBatchNum;
            parameters[10].Value = InHouseTime;
            parameters[11].Value = UpdateTime;
            parameters[12].Value = Remarks;
            parameters[13].Value = StockDetailID;
            parameters[14].Value = CoreCode;
            parameters[15].Value = CoreQualitySign;
            parameters[16].Value = CorePositionID;
            parameters[17].Value = TrayID;
            parameters[18].Value = GoodsSiteType;
            parameters[19].Value = GoodsSiteLayer;
            parameters[20].Value = GoodsSiteColumn;
            parameters[21].Value = GoodsSiteRow;
            parameters[22].Value = DeviceID;
            parameters[23].Value = GoodsSiteStoreStatus;
            parameters[24].Value = GoodsSiteRunStatus;
            parameters[25].Value = GoodsSiteInOutType;
            parameters[26].Value = GoodsSiteStoreType;
            parameters[27].Value = LogicStoreAreaID;
            parameters[28].Value = StoreAreaID;
            parameters[29].Value = GoodsSiteID;
            parameters[30].Value = StockID;

            return(DbHelperSQL.Exists(strSql.ToString(), parameters));
        }