コード例 #1
0
        public FormFloorLabel( Bean.FloorBean bean)
        {
            InitializeComponent();

            this._bean = bean;
            if (this._bean != null)
            {
                txtName.Text = _bean.name;
                txtNumber.Text = _bean.number;
                txtRFID.Text = _bean.rfid;
            }

        }
コード例 #2
0
        protected void Go()
        {
            lblOne.Text = lblTwo.Text = "";
            bool isPass = true;
            if (String.IsNullOrEmpty(txtName.Text))
            {
                isPass = false;
                txtName.Focus();
                lblOne.Text = "请输入名称";
                lblOne.Visible = true;
            }
            if (String.IsNullOrEmpty(txtRFID.Text))
            {
                isPass = false;
                txtRFID.Focus();
                lblTwo.Visible = true;
                lblTwo.Text = "请扫描标签";
            }
            if (!isPass)
            {
                return;
            }

            if (_bean == null)
            {
                _bean = new Bean.FloorBean();
            }

            _bean.name = txtName.Text.Trim();
            _bean.rfid = txtRFID.Text.Trim();
            _bean.number = txtNumber.Text.Trim();

            if (backgroundWorker1.IsBusy) return;

            this.lblOne.Text = "";
            this.lblTwo.Text = "";
            this.panelLoading.Visible = true;
            this.panelLoading.BringToFront();
            this.lblLoadingText.Text = "正在请求操作,请稍等......";
            this.panelLoading.Location = new Point((this.Width / 2 - this.panelLoading.Width / 2), this.Height / 2 - this.panelLoading.Height - 20);

            backgroundWorker1.RunWorkerAsync(_bean);

        }
コード例 #3
0
ファイル: FormFloorList.cs プロジェクト: jxdong1013/archivems
 protected void SelectFloorLabel(FloorBean bean)
 {
     this.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.SelectedFloorLabel = bean;
 }