Ejemplo n.º 1
0
        private void btnFindParentPart_Click(object sender, EventArgs e)
        {
            string productType = cmbProductType.Text;

            if (productType.Contains(" FX"))
            {
                productType = productType.Replace(" FX", "");
            }

            FormQueryInfo form = QueryInfoDialog.GetAccessoryInfoDialog(productType, false, true);

            if (form == null || form.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            txtParentCode.Text = form.GetDataItem("图号型号").ToString();
            txtParentName.Text = form.GetDataItem("物品名称").ToString();

            if (cmbProductType.Text.Contains(txtParentCode.Text))
            {
                txtParentCode.Text = cmbProductType.Text;
                txtParentName.Text = txtProductName.Text;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 查找所有零部件(非总成)编码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode2_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetAccessoryInfoDialog(cmbProductType.Text, false, false);

            if (form.ShowDialog() == DialogResult.OK)
            {
                txtCode2.Text = (string)form.GetDataItem("图号型号");
                txtName2.Text = (string)form.GetDataItem("物品名称");
                txtSpec2.Text = (string)form.GetDataItem("规格");
            }
        }
Ejemplo n.º 3
0
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            if (sender == btnFindCode)
            {
                string productType = cmbProductType.Text;

                if (productType.Contains(" FX"))
                {
                    productType = productType.Replace(" FX", "");
                }

                FormQueryInfo form = QueryInfoDialog.GetAccessoryInfoDialog(productType, true, false);

                if (form == null || form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                txtCode.Text = form.GetDataItem("图号型号").ToString();
                txtName.Text = form.GetDataItem("物品名称").ToString();
                txtSpec.Text = form.GetDataItem("规格").ToString();
            }
            else
            {
                FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog();//QueryInfoDialog.GetAccessoryInfoDialog();

                if (form == null || form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

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