Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            if (!CheckForm())
            {
                return;
            }

            GetMessage();

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

            if (!m_bomServer.AddJumbly(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();
        }