Example #1
0
        private void ucBtnOK_Click(object sender, System.EventArgs e)
        {
            if (this.rtxtInput.Text.Trim() == string.Empty)
            {
                this.ErrorMessage("$CS_Please_Input_Remove_Planate");                   //请输入待移除的二维条码
                this.rtxtInput.Focus();
                return;
            }
            else
            {
                try
                {
                    BarCodeParse barParser = new BarCodeParse(this._domainDataProvider);
                    string[]     idList    = barParser.GetIDList(this.rtxtInput.Text.Trim());

                    if (idList == null || idList.Length == 0)
                    {
                        this.ErrorMessage("$CS_RCard_List_Is_Empty");
                        return;
                    }
                    else
                    {
                        this._idList = idList;
                    }

                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
                catch (System.Exception ex)
                {
                    this.ErrorMessage(ex.Message);
                }
            }
        }
Example #2
0
        protected override bool CheckModel(BarCodeParse barParser)
        {
            string model = barParser.GetModelCode(this.ucLEInput.Text.Trim());

            if (this.cbxModel.ComboBoxData.SelectedItem != null && this.cbxModel.ComboBoxData.SelectedItem.ToString() != model)
            {
                this.ErrorMessage("产品别选择错误");
                return(false);
            }
            else if (this.cbxModel.ComboBoxData.SelectedItem == null)
            {
                this.ErrorMessage("请选择产品别");
                return(false);
            }

            return(true);
        }