示例#1
0
        private void simpleButtonDefault_Click(object sender, EventArgs e)
        {
            DOBarcodeOption defaultValue = new DOBarcodeOption();
            this.teCountry.Text = defaultValue.COUNTRY;
            this.teProvider.Text = defaultValue.PROVIDER;
            //this.teIdProduct.Text = defaultValue.PRODUCT;
            this.teIdProduct.Text = "99999";

            this.seWidthStamp.Value = defaultValue.STAMP_WIDTH / 100;
            this.seHeightStamp.Value = defaultValue.STAMP_HEIGHT / 100;
            this.seWidthBC.Value = defaultValue.BARCODE_WIDTH / 100;
            this.seHeightBC.Value = defaultValue.BARCODE_HEIGHT / 100;

            this.seModule.Value = defaultValue.BARCODE_MODULE;
            this.seUnit.Value = defaultValue.UNIT_POS;
            this.seNameProduct.Value = defaultValue.NAME_POS;
            this.seBC.Value = defaultValue.BARCODE_POS;
            this.sePrice.Value = defaultValue.PRICE_POS;
            this.ceUnit.Checked = true;
            this.ceNameProduct.Checked = true;
            this.ceBarcode.Checked = true;
            this.cePrice.Checked = true;
            this.cbFUnit.SelectedIndex = defaultValue.UNIT_ALIGHT;
            this.cbFNameProduct.SelectedIndex = defaultValue.NAME_ALIGHT;
            this.cbFBC.SelectedIndex = defaultValue.BARCODE_ALIGHT;
            this.cbPrice.SelectedIndex = defaultValue.PRICE_ALIGHT;

            //this.MauEAN13.Text = defaultValue.COUNTRY + defaultValue.PROVIDER + defaultValue.PRODUCT;
            this.MauEAN13.Text = defaultValue.COUNTRY + defaultValue.PROVIDER + "99999";
            this.MauEAN13.Text += EAN13CheckDigit.checkDigit(MauEAN13.Text);
            this.EAN13Chk.Checked = true;
            this.OtherChk.Checked = false;
            this.cbBCStyle.SelectedIndex = 0;

            sbPreview_Click(null, null);

            this.EAN13Chk.Focus();
        }
示例#2
0
        //Lấy dữ liệu từ DB.
        private void initData()
        {
            configOption = DOBarcodeOption.load();

            this.teCountry.Text = configOption.COUNTRY;
            this.teProvider.Text = configOption.PROVIDER;
            this.teIdProduct.Text = configOption.PRODUCT;

            this.seWidthStamp.Value = ((Decimal)configOption.STAMP_WIDTH)/100;
            this.seHeightStamp.Value = ((Decimal)configOption.STAMP_HEIGHT)/100;
            this.seWidthBC.Value = ((Decimal)configOption.BARCODE_WIDTH)/100;
            this.seHeightBC.Value = ((Decimal)configOption.BARCODE_HEIGHT)/100;

            this.seModule.Value = (Decimal)configOption.BARCODE_MODULE;
            this.seUnit.Value = configOption.UNIT_POS;
            this.seNameProduct.Value = configOption.NAME_POS;
            this.seBC.Value = configOption.BARCODE_POS;
            this.sePrice.Value = configOption.PRICE_POS;
            this.ceUnit.Checked = (configOption.UNIT_USING == "Y" ? true : false);
            this.ceNameProduct.Checked = (configOption.NAME_USING == "Y" ? true : false);
            this.ceBarcode.Checked = (configOption.BARCODE_USING == "Y" ? true : false);
            this.cePrice.Checked = (configOption.PRICE_USING == "Y" ? true : false);
            this.cbFUnit.SelectedIndex = configOption.UNIT_ALIGHT;
            this.cbFNameProduct.SelectedIndex = configOption.NAME_ALIGHT;
            this.cbFBC.SelectedIndex = configOption.BARCODE_ALIGHT;
            this.cbPrice.SelectedIndex = configOption.PRICE_ALIGHT;

            int symbc = configOption.SYM_BARCODE;

            if (symbc == -1)
            {
                this.EAN13Chk.Checked = true;
                cera1_CheckedChanged(null, null);
            }
            else
            {
                this.OtherChk.Checked = true;
                this.cbBCStyle.SelectedIndex = symbc;
                cera2_CheckedChanged(null, null);
            }

            this.numChar.EditValue = (Decimal)configOption.CHAR_NUMBER;
            this.tenDonVi.Text = configOption.BARCODE_PARAM;
        }