コード例 #1
0
ファイル: UC_MatCheckStandard.cs プロジェクト: rcw0125/vehic
        private void 添加检验项目ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (this.selectedMaterial != null)
            {
                List <string> filterIds = new List <string>();
                foreach (var item in selectedMaterial.AllCheckItem)
                {
                    filterIds.Add(item.CheckItemNcId);
                }
                DlgCheckItem dlg = new DlgCheckItem(filterIds);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    if (dlg.SelectedCheckItem != null)
                    {
                        QC_MatAllCheckItem qrc = new QC_MatAllCheckItem();
                        qrc.CheckItemNcId = dlg.SelectedCheckItem.CheckItemNcId;
                        qrc.CheckItemCode = dlg.SelectedCheckItem.CheckItemCode;
                        qrc.CheckItemName = dlg.SelectedCheckItem.CheckItemName;

                        this.selectedMaterial.AllCheckItem.Add(qrc);
                    }
                }
            }
            else
            {
                MessageBox.Show("没有选中数据", "提示");
            }
        }
コード例 #2
0
ファイル: UC_MatCheckStandard.cs プロジェクト: rcw0125/vehic
        private void  除检验项目ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            QC_MatAllCheckItem selData = this.allCheckItemBindingSource.Current as QC_MatAllCheckItem;

            if (selData != null)
            {
                if (MessageBox.Show("确实要删除吗?", "提示", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    this.allCheckItemBindingSource.RemoveCurrent();
                }
            }
            else
            {
                MessageBox.Show("没有选中数据", "提示");
            }
        }
コード例 #3
0
        private void 确定_Click(object sender, EventArgs e)
        {
            QC_MatAllCheckItem curdata = this.qCMatAllCheckItemBindingSource.Current as QC_MatAllCheckItem;

            if (curdata != null)
            {
                _selectedCheckItem = new QC_Sample_Value();
                _selectedCheckItem.CheckItemCode = curdata.CheckItemCode;
                _selectedCheckItem.CheckItemName = curdata.CheckItemName;

                DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                this.Close();
            }
        }