Exemplo n.º 1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (!CheckForm())
            {
                return;
            }

            GetMessage();
            m_lnqJumbly.ID = Convert.ToInt32(dataGridView1.CurrentRow.Cells["序号"].Value);

            if (!SameGoods())
            {
                MessageDialog.ShowPromptMessage("不能添加同种物品");
                return;
            }

            if (!m_bomServer.UpdateJumbly(m_lnqJumbly, out m_err))
            {
                MessageDialog.ShowPromptMessage(m_err);
            }
            else
            {
                MessageDialog.ShowPromptMessage("更新成功");
            }

            RefreshDataGirdView(m_bomServer.GetJumblyTable());
            PositioningRecord(m_lnqJumbly.BomGoodsCode, m_lnqJumbly.BomGoodsName,
                              m_lnqJumbly.BomSpec, Convert.ToInt32(m_lnqJumbly.JumblyGoodsID));

            ClearDate();
        }