예제 #1
0
        /// <summary>
        /// 单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgv_Main_Click(object sender, EventArgs e)
        {
            if (dgv_Main.CurrentRow == null)
            {
                return;
            }

            if (m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["CPID"].ToString() != "")
            {
                tbsGoods.Text     = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["GoodsName"].ToString();
                tbsGoods.Tag      = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["CPID"].ToString();
                numCount.Value    = Convert.ToDecimal(m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Count"]);
                txtSpce.Text      = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Spec"].ToString();
                txtRemark.Text    = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Remark"].ToString();
                txtBatchNo.Text   = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["BatchNo"].ToString();
                lbUnit.Text       = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Unit"].ToString();
                txtGoodsCode.Text = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["GoodsCode"].ToString();
                txtGoodsCode.Tag  = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Depot"].ToString();
                txtSpce.Tag       = m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Provider"].ToString();
                lbStock.Text      = m_serverStore.GetStockCount(Convert.ToInt32(m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["CPID"].ToString()),
                                                                m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["BatchNo"].ToString(),
                                                                m_dtMxCK.Rows[dgv_Main.CurrentRow.Index]["Provider"].ToString(),
                                                                UniversalFunction.GetStorageID(cmbStorage.Text));
            }
        }