Пример #1
0
        internal override bool CodeHasBeenUsed(Model mod, string code)
        {
            var cmd = new MySqlCommand();

            cmd.CommandText = "SELECT EXISTS(SELECT * FROM vendProducts" +
                              " WHERE vProd_Code = ?Code)";

            cmd.Parameters.AddWithValue("?Code", code);
            var result = Serv.ExecuteMySqlScaler(cmd);

            return((Convert.ToInt32(result) > 0) ? true : false);
        }