示例#1
0
        private void btnReferenceInfo_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetFrockStandingBook(txtName.Tag == null ? 0 : Convert.ToInt32(txtName.Tag));

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                S_FrockStandingBook lnqTemp =
                    m_serverFrockStandingBook.GetBookInfo(m_lnqStandingBook == null ?
                                                          Convert.ToInt32(form.GetDataItem("物品ID")) : m_lnqStandingBook.GoodsID,
                                                          form.GetDataItem("工装编号").ToString());

                View_F_GoodsPlanCost tempGoodsLnq       = UniversalFunction.GetGoodsInfo(Convert.ToInt32(lnqTemp.GoodsID));
                View_F_GoodsPlanCost tempParentGoodsLnq = UniversalFunction.GetGoodsInfo(Convert.ToInt32(lnqTemp.ParentGoodsID));

                if (tempParentGoodsLnq != null)
                {
                    txtParentCode.Text        = tempParentGoodsLnq.图号型号;
                    txtParentName.Text        = tempParentGoodsLnq.物品名称;
                    txtParentName.Tag         = Convert.ToInt32(m_lnqStandingBook.ParentGoodsID);
                    txtParentFrockNumber.Text = m_lnqStandingBook.ParentFrockNumber;
                }

                if (tempGoodsLnq == null)
                {
                    MessageDialog.ShowPromptMessage("系统中无此物品信息");
                }

                txtCode.Text = tempGoodsLnq.图号型号;
                txtName.Text = tempGoodsLnq.物品名称;
                txtName.Tag  = Convert.ToInt32(lnqTemp.GoodsID);

                numIdentifyCycle.Value     = Convert.ToDecimal(lnqTemp.IdentifyCycle);
                txtApplyToDevice.Text      = lnqTemp.ApplyToDevice;
                txtApplyToProcess.Text     = lnqTemp.ApplyToProcess;
                txtApplyToProductCode.Text = lnqTemp.ApplyToProductCode;
                txtApplyToProductName.Text = lnqTemp.ApplyToProductName;
                txtDesigner.Text           = lnqTemp.Designer;
                cmbApplyToWorkShop.Text    = lnqTemp.ApplyToWorkShop;

                if (lnqTemp.IdentifyCycleType != null)
                {
                    rbTypeCount.Checked = (bool)(lnqTemp.IdentifyCycleType == rbTypeCount.Text);
                    rbTypeTime.Checked  = (bool)(lnqTemp.IdentifyCycleType == rbTypeTime.Text);
                }
            }
        }