Exemple #1
0
        /// <summary>
        /// 选择寄存位置
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void be_position_Click(object sender, EventArgs e)
        {
            Frm_freeBit frm_free = new Frm_freeBit();

            frm_free.swapdata["parent"] = this;

            if (frm_free.ShowDialog() == DialogResult.OK)
            {
                regionId = this.swapdata["regionId"].ToString();
                bitDesc  = this.swapdata["bitDesc"].ToString();
                bitId    = RegisterAction.GetBitId(regionId, bitDesc);

                be_position.Text = RegisterAction.GetBitFullName(regionId, bitDesc);
                bitPrice         = RegisterAction.GetBitPrice(regionId, bitDesc);
                if (bitPrice % 12 != 0)
                {
                    XtraMessageBox.Show("号位单价必须是12的倍数!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    bitPrice = 0;
                    return;
                }

                txtedit_price.EditValue = bitPrice;
                this.CalcHJ();
            }
        }
Exemple #2
0
        private void be_position_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            Frm_freeBit frm_free = new Frm_freeBit();
            frm_free.swapdata["parent"] = this;

            if (frm_free.ShowDialog() == DialogResult.OK)
            {
                regionId = this.swapdata["regionId"].ToString();
                bitDesc = this.swapdata["bitDesc"].ToString();
                bitId = RegisterAction.GetBitId(regionId, bitDesc);

                be_position.Text = RegisterAction.GetBitFullName(regionId, bitDesc);

            }
        }