Exemplo n.º 1
0
        public static bool CheckSerialNumberSubmissionCount(Guid serialNumber)
        {
            string sqlQuery = @"SELECT COUNT(*)
                                FROM dbo.Submission
                                WHERE SerialNumber = @SerialNumber;";

            int serialExists = DBDataAccess.CountData(sqlQuery, new { SerialNumber = serialNumber });

            return(serialExists != 2);
        }
Exemplo n.º 2
0
        public static bool CheckSerialNumberExists(Guid serialNumber)
        {
            string sqlQuery = @"SELECT COUNT(*)
                                FROM dbo.Product
                                WHERE SerialNumber = @SerialNumber;";

            int serialExists = DBDataAccess.CountData(sqlQuery, new { SerialNumber = serialNumber });

            return(serialExists == 1);
        }