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

            strSql.Append("select count(1) from TB_Batch_Index");
            strSql.Append(" where Tf_BatchID=@Tf_BatchID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Tf_BatchID", SqlDbType.VarChar, 32)
            };
            parameters[0].Value = Tf_BatchID;

            return(DbHelperSQL2.Exists(strSql.ToString(), parameters));
        }
Example #2
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string Tf_TrayId, int usingState)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from TB_Tray_index");
            strSql.Append(" where Tf_TrayId=@Tf_TrayId and tf_traystat=@tf_traystat");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Tf_TrayId",   SqlDbType.VarChar, 32),
                new SqlParameter("@tf_traystat", SqlDbType.Int)
            };
            parameters[0].Value = Tf_TrayId;
            parameters[1].Value = usingState;
            return(DbHelperSQL2.Exists(strSql.ToString(), parameters));
        }
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string batchID, string Tf_TrayId, string Tf_CellSn)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from TB_After_GradeData");
            strSql.Append(" where Tf_BatchID =@Tf_BatchID and Tf_TrayId=@Tf_TrayId and Tf_CellSn=@Tf_CellSn ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Tf_BatchID", SqlDbType.VarChar, 32),
                new SqlParameter("@Tf_TrayId",  SqlDbType.VarChar, 32),
                new SqlParameter("@Tf_CellSn",  SqlDbType.VarChar, 32)
            };
            parameters[0].Value = batchID;
            parameters[1].Value = Tf_TrayId;
            parameters[2].Value = Tf_CellSn;

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