private void 查看清单ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormMaterialDetainList form = new FormMaterialDetainList(
                CE_BusinessOperateMode.查看, txtProvider.Text, txtBill_ID.Text,
                lblBillStatus.Text, UniversalFunction.GetStorageID(cmbStorage.Text));

            form.ShowDialog();
        }
        private void 核实物料信息ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lblBillStatus.Text != "等待采购确认")
            {
                MessageDialog.ShowPromptMessage("请选择要采购确认的记录后再进行此操作");
                return;
            }

            FormMaterialDetainList form = new FormMaterialDetainList(
                CE_BusinessOperateMode.采购确认, txtProvider.Text, txtBill_ID.Text,
                lblBillStatus.Text, UniversalFunction.GetStorageID(cmbStorage.Text));

            form.ShowDialog();
        }
        private void 设置清单ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                this.dataGridView1.CellEnter -= new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEnter);

                if (BasicInfo.LoginName != txtProposer.Text.Trim())
                {
                    MessageDialog.ShowPromptMessage("您不是建单人员,无法进行此操作");
                    return;
                }

                if (lblBillStatus.Text.Trim() == "单据已完成")
                {
                    MessageDialog.ShowPromptMessage("单据已完成,无法进行此操作");
                    return;
                }

                if (!CheckDataItem())
                {
                    return;
                }

                if (!m_billServer.AddBill(GetData(), out m_strErr))
                {
                    MessageDialog.ShowErrorMessage(m_strErr);
                    return;
                }

                string strBillno = txtBill_ID.Text;

                FormMaterialDetainList form = new FormMaterialDetainList(
                    CE_BusinessOperateMode.修改, txtProvider.Text, txtBill_ID.Text,
                    lblBillStatus.Text, UniversalFunction.GetStorageID(cmbStorage.Text));

                form.ShowDialog();

                RefreshDataGridView(m_billServer.GetAllBill());
                PositioningRecord(strBillno);
            }
            finally
            {
                this.dataGridView1.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellEnter);
            }
        }