예제 #1
0
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            ClearControl();

            FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog();

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                txtCode.Text = (string)form.GetDataItem("图号型号");
                txtName.Text = (string)form.GetDataItem("物品名称");
                txtSpec.Text = (string)form.GetDataItem("规格");
                txtCode.Tag  = (int)form.GetDataItem("序号");

                if (txtSpec.Text.Contains("自制件"))
                {
                    View_F_GoodsPlanCost planCost = m_planCostServer.GetGoodsInfo(txtCode.Text, txtName.Text, txtSpec.Text, out m_strErr);

                    if (planCost != null)
                    {
                        cmbUnit.Text = planCost.单位;
                    }
                }
                else
                {
                    txtCode.Text = "";
                    txtName.Text = "";
                    txtSpec.Text = "";

                    MessageDialog.ShowPromptMessage("您选择的物品不是属于自制件,【需在物品规格中填写“自制件”字样】,请重新选择或修改物品基础信息的规格信息!");
                    return;
                }
            }
        }
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog();

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                txtCode.Text = form.GetDataItem("图号型号").ToString();
                txtCode.Tag  = form.GetDataItem("序号").ToString();
                txtName.Text = form.GetDataItem("物品名称").ToString();
                txtSpec.Text = form.GetDataItem("规格").ToString();

                View_F_GoodsPlanCost info = m_basicGoodsServer.GetGoodsInfo(txtCode.Text, txtName.Text, txtSpec.Text, out m_err);

                if (info != null)
                {
                    cmbUnit.SelectedValue = info.单位ID;
                    txtMaterialType.Text  = info.物品类别名称;
                    txtMaterialType.Tag   = info.物品类别;
                }

                txtName.ReadOnly            = true;
                txtCode.ReadOnly            = true;
                txtSpec.ReadOnly            = true;
                btnFindMaterialType.Visible = false;
            }
        }
예제 #3
0
        /// <summary>
        /// 查找物品
        /// </summary>
        /// <param name="row">选择行</param>
        /// <param name="flag">是否是本身表的零件</param>
        private void btnFindCode(DataGridViewRow row, bool flag)
        {
            FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog();

            if (flag)
            {
                if (m_type == "安全库存")
                {
                    form = QueryInfoDialog.GetSafeStock();
                }
                else if (m_type == "供应商配额")
                {
                    form = QueryInfoDialog.GetGoodsLeastPackAndStock();
                }
            }

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                for (int i = 0; i < dgvBomReject.Rows.Count; i++)
                {
                    if (dgvBomReject.Rows[i].Cells["物品ID"].Value != null &&
                        Convert.ToInt32(dgvBomReject.Rows[i].Cells["物品ID"].Value) == (int)form.GetDataItem("序号"))
                    {
                        if (MessageBox.Show("此物品有重复记录是否继续?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
                        {
                            return;
                        }
                    }
                }

                if (flag)
                {
                    row.Cells["Self图号型号"].Value = (string)form.GetDataItem("图号型号");
                    row.Cells["Self物品ID"].Value = (int)form.GetDataItem("序号");
                    row.Cells["Self物品名称"].Value = (string)form.GetDataItem("物品名称");
                    row.Cells["Self规格"].Value   = (string)form.GetDataItem("规格");

                    DataGridViewRow dr = new DataGridViewRow();
                    dgvSelfReject.Rows.Add(dr);
                }
                else
                {
                    row.Cells["图号型号"].Value = (string)form.GetDataItem("图号型号");
                    row.Cells["物品ID"].Value = (int)form.GetDataItem("序号");
                    row.Cells["物品名称"].Value = (string)form.GetDataItem("物品名称");
                    row.Cells["规格"].Value   = (string)form.GetDataItem("规格");

                    DataGridViewRow dr = new DataGridViewRow();
                    dgvBomReject.Rows.Add(dr);
                }
            }
        }
        /// <summary>
        /// 查找物品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            if (Convert.ToBoolean(BasicInfo.BaseSwitchInfo[(int)GlobalObject.CE_SwitchName.开启车间管理模块]) && m_lnqWSCode != null && m_strStorage != "11")
            {
                FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog();

                if (form.ShowDialog() == DialogResult.OK)
                {
                    txtCode.Text         = (string)form.GetDataItem("图号型号");
                    txtCode.Tag          = (int)form.GetDataItem("序号");
                    txtName.Text         = (string)form.GetDataItem("物品名称");
                    txtSpec.Text         = (string)form.GetDataItem("规格");
                    txtUnit.Text         = (string)form.GetDataItem("单位");
                    txtMaterialType.Text = (string)form.GetDataItem("物品类别名称");
                    txtMaterialType.Tag  = (string)form.GetDataItem("物品类别");
                }
            }
            else
            {
                FormQueryInfo form = QueryInfoDialog.GetStoreGoodsInfoDialog(CE_BillTypeEnum.领料退库单, true, m_strStorage);

                if (form.ShowDialog() == DialogResult.OK)
                {
                    txtCode.Text            = (string)form.GetDataItem("图号型号");
                    txtCode.Tag             = (int)form.GetDataItem("物品ID");
                    txtName.Text            = (string)form.GetDataItem("物品名称");
                    txtSpec.Text            = (string)form.GetDataItem("规格");
                    txtProvider.Text        = (string)form.GetDataItem("供货单位");
                    txtProviderBatchNo.Text = form.GetDataItem("供方批次号").ToString();

                    if (m_strReturnMode == "返修退库")
                    {
                        txtBatchNo.Text = "系统自动生成";
                    }
                    else
                    {
                        txtBatchNo.Text = (string)form.GetDataItem("批次号");
                    }

                    txtUnit.Text         = (string)form.GetDataItem("单位");
                    txtMaterialType.Text = (string)form.GetDataItem("材料类别");
                    txtMaterialType.Tag  = (string)form.GetDataItem("材料类别编码");

                    if (m_operateMode == CE_BusinessOperateMode.仓库核实)
                    {
                        txtShelf.Text  = (string)form.GetDataItem("货架");
                        txtColumn.Text = (string)form.GetDataItem("列");
                        txtLayer.Text  = (string)form.GetDataItem("层");
                    }
                }
            }
        }
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            if (lblBillStatus.Text != "新建单据")
            {
                return;
            }

            FormQueryInfo form;

            if (chkPayment.Checked)
            {
                if (txtOrderForm.Text.Length == 0)
                {
                    txtOrderForm.Focus();
                    MessageDialog.ShowPromptMessage(@"请先选择订单/合同号后再进行此操作!");
                    return;
                }

                form = QueryInfoDialog.GetOrderFormGoodsDialog(txtOrderForm.Text, true);
            }
            else
            {
                form = QueryInfoDialog.GetPlanCostGoodsDialog(true);
            }

            if (form == null || form.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            else
            {
                txtCode.Text = form.GetDataItem("图号型号").ToString();
                txtName.Text = form.GetDataItem("物品名称").ToString();
                txtSpec.Text = form.GetDataItem("规格").ToString();

                View_F_GoodsPlanCost tempGoodsInfo = UniversalFunction.GetGoodsInfo(txtCode.Text, txtName.Text, txtSpec.Text);
                txtCode.Tag = tempGoodsInfo.序号;

                DataRow dr = m_serverBom.GetBomInfo(txtCode.Text.Trim(), txtName.Text.Trim());

                if (dr == null)
                {
                    txtVersion.Text = "";
                }
                else
                {
                    txtVersion.Text = dr["Version"].ToString();
                }
            }
        }
        private void btnFindGoods_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog();

            form.ShowColumns = new string[] { "图号型号", "物品名称", "规格", "物品类别名称", "序号", "单位" };

            if (form != null && DialogResult.OK == form.ShowDialog())
            {
                txtCode.Text    = form.GetDataItem("图号型号").ToString();
                txtName.Text    = form.GetDataItem("物品名称").ToString();
                txtSpec.Text    = form.GetDataItem("规格").ToString();
                txtName.Tag     = Convert.ToInt32(form.GetDataItem("序号").ToString());
                txtBatchNo.Tag  = form.GetDataItem("单位").ToString();
                txtBatchNo.Text = "";

                numPickingCount.Tag = 0;
            }
        }
예제 #7
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();
            }
        }
예제 #8
0
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog();

            form.ShowColumns = new string[] { "图号型号", "物品名称", "规格", "物品类别名称", "序号" };

            if (form != null && DialogResult.OK == form.ShowDialog())
            {
                if (tabControl1.SelectedTab.Name == "tpMachineAccount")
                {
                    txtGoodsCode_MachineAccount.Text = form.GetDataItem("图号型号").ToString();
                    txtGoodsName_MachineAccount.Text = form.GetDataItem("物品名称").ToString();
                    txtSpec_MachineAccount.Text      = form.GetDataItem("规格").ToString();
                    txtGoodsName_MachineAccount.Tag  = form.GetDataItem("序号").ToString();
                }
                else if (tabControl1.SelectedTab.Name == "tpDayToDay")
                {
                    txtGoodsName_DayToDay.Text = form.GetDataItem("图号型号").ToString();
                    txtGoodsCode_DayToDay.Text = form.GetDataItem("物品名称").ToString();
                    txtSpec_DayToDay.Text      = form.GetDataItem("规格").ToString();
                    txtGoodsName_DayToDay.Tag  = form.GetDataItem("序号").ToString();
                }
            }
        }