bool IsValidDINCode(jsString code)
    {
        var pattern_noIdChar = new RegExp("[A-NP-Z1-9]{1}[0-9]{12}");

        var pattern = new RegExp(@Html.RawHasQuote(BarcodeBLL.DINIdChar) + "[A-NP-Z1-9]{1}[0-9]{14}");

        return pattern_noIdChar.test(code) || pattern.test(code);
    }
    bool IsValidProductCode(jsString code)
    {
        if (code.length != @BarcodeBLL.productLength) return false;

        var pattern = @Html.RawHasQuote(BarcodeBLL.productIdChar) + "[A-DE-Z1-9]{1}[0-9]{4}[A-Za-z0-9]{1}[A-Z0-9]{1}[a-z0-9]{1}";
        var regx = new RegExp(pattern);
        return regx.test(code);
    }
    bool IsValidDeleteCode(jsString code)
    {
        if (code.length != @BarcodeBLL.deleteLength) return false;

        var pattern = new RegExp(@Html.RawHasQuote(BarcodeBLL.deleteIdChar) + "[0-9]");

        return pattern.test(code);
    }
        void CheckLength(jsString text)
        {
            text = text.trim();
            var len = text.length;

            if (len == 16 && text.substring(0, 1) == '=')
            {
                jquery("input[name*='btnMasterOk']").click();
            }
        }