private void buttonSelect_Click(object sender, EventArgs e)
        {
            if (m_selectedTextboxIndex <= 0 || m_selectedTextboxIndex > 3)
            {
                MessageBoxExtend.messageWarning("请将光标移动到指定输入框中后再重新选择物料");
                this.buttonSelect.Enabled = false;
                return;
            }

            FormBaseMateriel fbs = new FormBaseMateriel(true);

            fbs.ShowDialog();

            m_materielPkey = fbs.getSelectRecordPkey();

            if (m_materielPkey != 0)
            {
                if (m_selectedTextboxIndex == 1)
                {
                    this.textBoxStartID.Text = Convert.ToString(m_materielPkey);
                }
                else if (m_selectedTextboxIndex == 2)
                {
                    this.textBoxEndID.Text = Convert.ToString(m_materielPkey);
                }
                else
                {
                    MaterielTable materiel = Materiel.getInctance().getMaterielInfoFromPkey(m_materielPkey);
                    this.textBoxName.Text = materiel.name;
                }
            }

            this.buttonSelect.Enabled = false;
            m_selectedTextboxIndex    = 0;
        }
        private void buttonSelect_Click(object sender, EventArgs e)
        {
            FormBaseMateriel fbs = new FormBaseMateriel(true);

            fbs.ShowDialog();

            m_materielPkey = fbs.getSelectRecordPkey();
            MaterielTable materiel = Materiel.getInctance().getMaterielInfoFromPkey(m_materielPkey);

            this.textBoxName.Text = materiel.name;
        }
Beispiel #3
0
 private void selectSourceOrder_Click(object sender, EventArgs e)
 {
     if (m_rowIndex != -1 && m_columnIndex == (int)DataGridColumnName.MatetielNumber)
     {
         FormBaseMateriel fbm = new FormBaseMateriel(true);
         fbm.ShowDialog();
         this.dataGridViewDataList.Rows[m_rowIndex].Cells[m_columnIndex].Value = Convert.ToString(fbm.getSelectRecordPkey());
         this.dataGridViewDataList.CurrentCell = this.dataGridViewDataList.Rows[m_rowIndex].Cells[(int)DataGridColumnName.Value];
     }
 }