private void btnBatchCreate_Click(object sender, EventArgs e)
        {
            退货业务报废物品筛选窗体 Form = new 退货业务报废物品筛选窗体(m_strProvider);

            Form.ShowDialog();

            DataTable dt = Form.DtScrap;

            if (dt == null || dt.Rows.Count == 0)
            {
                return;
            }

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                S_MaterialListRejectBill goods = new S_MaterialListRejectBill();

                goods.Bill_ID         = m_billNo;
                goods.GoodsID         = Convert.ToInt32(dt.Rows[i]["GoodsID"].ToString());
                goods.Provider        = dt.Rows[i]["Provider"].ToString();
                goods.ProviderBatchNo = "";
                goods.BatchNo         = dt.Rows[i]["BatchNo"].ToString();
                goods.Amount          = Convert.ToDecimal(dt.Rows[i]["Quantity"].ToString());
                goods.Remark          = dt.Rows[i]["Reason"].ToString();
                goods.AssociateID     = dt.Rows[i]["Bill_ID"].ToString();

                IQueryable <View_S_MaterialListRejectBill> IQReject = dataGridView1.DataSource as IQueryable <View_S_MaterialListRejectBill>;
                DataTable dvt = GlobalObject.GeneralFunction.ConvertToDataTable <View_S_MaterialListRejectBill>(IQReject);

                if (CheckSameGoods(dvt, goods))
                {
                    if (!m_goodsServer.AddGoods(txtAssociateID.Text, goods, m_strStorage, out m_error))
                    {
                        MessageDialog.ShowErrorMessage(m_error);
                        return;
                    }
                }
            }

            GetCodeInfoFromForm();
            m_queryGoodsInfo = m_goodsServer.GetGoods(m_billNo);
            RefreshDataGridView(m_queryGoodsInfo);
        }
예제 #2
0
        private void btnBatchCreate_Click(object sender, EventArgs e)
        {
            退货业务报废物品筛选窗体 Form = new 退货业务报废物品筛选窗体(m_strProvider);

            Form.ShowDialog();

            DataTable dt = Form.DtScrap;

            if (dt == null || dt.Rows.Count == 0)
            {
                return;
            }

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                S_HomemadeRejectList goods = new S_HomemadeRejectList();

                goods.Bill_ID         = m_strBillID;
                goods.GoodsID         = Convert.ToInt32(dt.Rows[i]["GoodsID"].ToString());
                goods.Provider        = dt.Rows[i]["Provider"].ToString();
                goods.ProviderBatchNo = "";
                goods.BatchNo         = dt.Rows[i]["BatchNo"].ToString();
                goods.Amount          = Convert.ToDecimal(dt.Rows[i]["Quantity"].ToString());
                goods.Remark          = dt.Rows[i]["Reason"].ToString();

                DataTable dvt = m_goodsServer.GetBillView(m_strBillID);

                if (CheckSameGoods(dvt, goods))
                {
                    if (!m_goodsServer.AddGoods(goods, m_strStorage, out m_strErr))
                    {
                        MessageDialog.ShowErrorMessage(m_strErr);
                        return;
                    }
                }
            }

            GetCodeInfoFromForm();
            m_queryGoodsInfo = m_goodsServer.GetBillView(m_strBillID);
            RefreshDataGridView(m_queryGoodsInfo);
        }
        private void 报废退货查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            退货业务报废物品筛选窗体 Form = new 退货业务报废物品筛选窗体("");

            Form.ShowDialog();
        }
        private void 报废退货查询ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            退货业务报废物品筛选窗体 Form = new 退货业务报废物品筛选窗体(CE_WorkShopCode.JJCJ.ToString());

            Form.ShowDialog();
        }