Example #1
0
        public FormPrintBarCode( )
        {
            InitializeComponent( );

            barCodeDao.Bll.barCodeReportBll _bll = new barCodeDao.Bll.barCodeReportBll( );

            DateTime dtOne = _bll.GetTime( );

            textBox3.Text = (Convert.ToInt32(dtOne.Year.ToString( ).Substring(2, 2)) + 50).ToString( ) + (dtOne.Month + 50).ToString( ) + (dtOne.Day).ToString( ).PadLeft(2, '0');
            //BarCodeUtility . GetDataSource ( comboBox4 ,"BAR006" );
            BarCodeUtility.GetDataSource(comboBox1, "BAR007");
            textBox1.Text = "1";
        }
Example #2
0
        void numOf( )
        {
            barCodeDao.Bll.barCodeReportBll   _bll  = new barCodeDao.Bll.barCodeReportBll( );
            barCodeEntity.barCodeReportEntity _mode = new barCodeEntity.barCodeReportEntity( );
            _mode.BAR007 = comboBox1.Text;
            DateTime dt = _bll.GetTime( );
            string   x  = string.Empty;

            x = texProduct.Tag.ToString( ).Substring(texProduct.Tag.ToString( ).Length - 4);
            x = x + " ";
            foreach (char c in _mode.BAR007)
            {
                if (c >= 48 && c <= 57)
                {
                    x = x + c.ToString( );
                }
                else if (c.ToString( ).Equals("-"))
                {
                    x = x + " " + 0.ToString( );
                }
                else if (c >= 65 && c <= 90)
                {
                    x = x + (( int )c).ToString( );
                }
            }
            _mode.BAR004 = texSpec.Text;
            string [] str = _mode.BAR004.Split('*');
            if (str.Length > 2)
            {
                x = x + " ";
                for (int i = 0; i < 2; i++)
                {
                    foreach (char c in str[i])
                    {
                        if (c >= 48 && c <= 57)
                        {
                            x = x + c.ToString( );
                        }
                    }
                }
            }
            textBox2.Text = x;
        }