Ejemplo n.º 1
0
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetAllGoodsInfo();

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                //txtGoodsCode.Text = form.GetDataItem("图号型号").ToString();
                //txtGoodsName.Text = form.GetDataItem("物品名称").ToString();
                //txtSpec.Text = form.GetDataItem("规格").ToString();
            }
        }
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            DataTable dtGood = (DataTable)dataGridView1.DataSource;

            FormQueryInfo form = QueryInfoDialog.GetAllGoodsInfo();

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                txtGoodsName.ReadOnly = true;
                txtGoodsCode.ReadOnly = true;
                txtSpec.ReadOnly      = true;

                txtGoodsCode.Text = form.GetDataItem("图号型号").ToString();
                txtGoodsName.Text = form.GetDataItem("物品名称").ToString();
                txtSpec.Text      = form.GetDataItem("规格").ToString();
            }
        }