private void btnBatchCreate_Click(object sender, EventArgs e)
        {
            FormDataTableCheck frm =
                new FormDataTableCheck(m_goodsServer.GetBatchCreatList("领料", ServerTime.Time.AddDays(-20), ServerTime.Time));

            frm.OnFormDataTableCheckFind += new GlobalObject.DelegateCollection.FormDataTableCheckFindDelegate(frm_OnFormDataTableCheckFind1);
            frm._BlDateTimeControlShow    = true;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                string strBillIDGather = "";

                foreach (DataRow dr in frm._DtResult.Rows)
                {
                    strBillIDGather += "'" + dr["领料单号"].ToString() + "',";
                }

                strBillIDGather = "(" + strBillIDGather.Remove(strBillIDGather.Length - 1) + ")";

                if (!m_goodsServer.BatchCreateList("领料", m_billNo, strBillIDGather, out m_error))
                {
                    MessageDialog.ShowPromptMessage(m_error);
                }
                else
                {
                    MessageDialog.ShowPromptMessage("生成成功");
                    this.Close();
                }

                m_queryGoodsInfo = m_goodsServer.GetGoods(m_billNo);
                RefreshDataGridView(m_queryGoodsInfo);
            }
        }
Example #2
0
 private void btnFind_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource =
         m_serverMaterialReturnList.GetBatchCreatList(m_strSelectType, dtpStart.Value, dtpEnd.Value);
 }