Esempio n. 1
0
        private void btnReferenceInfo_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetFrockProvingReport(txtCode.Tag == null ? 0 : Convert.ToInt32(txtCode.Tag));

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                string strbillNo = form.GetDataItem("单据号").ToString();

                if (((DataTable)dataGridView1.DataSource).Rows.Count == 0)
                {
                    DataTable dtTemp = m_serverFrock.GetAttachedTable(strbillNo, "检验");

                    foreach (DataRow dr in dtTemp.Rows)
                    {
                        dr["AnswerContent"] = "";
                    }

                    dataGridView1.DataSource = dtTemp;
                }

                if (((DataTable)dataGridView2.DataSource).Rows.Count == 0)
                {
                    DataTable dtTemp = m_serverFrock.GetAttachedTable(strbillNo, "验证");

                    foreach (DataRow dr in dtTemp.Rows)
                    {
                        dr["AnswerContent"] = "";
                    }

                    dataGridView2.DataSource = dtTemp;
                }
            }
        }
Esempio n. 2
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = new FormQueryInfo(m_serviceAOG.GetReferenceInfo(chbIsRepeat.Checked));

            if (DialogResult.OK == form.ShowDialog())
            {
                string billRelate = form.GetDataItem("单据号").ToString();

                DataTable tempTable = m_serviceRequistion.GetListViewDetial(billRelate, null, null, null);

                if (tempTable != null)
                {
                    List <View_Business_WarehouseInPut_AOGDetail> lstTemp = new List <View_Business_WarehouseInPut_AOGDetail>();

                    for (int i = 0; i < tempTable.Rows.Count; i++)
                    {
                        View_Business_WarehouseInPut_AOGDetail lnqTemp = new View_Business_WarehouseInPut_AOGDetail();

                        lnqTemp.关联业务 = billRelate;
                        lnqTemp.单据号  = txtBillNo.Text;
                        lnqTemp.单位   = tempTable.Rows[i]["单位"].ToString();
                        lnqTemp.供应商  = tempTable.Rows[i]["供应商"].ToString();
                        lnqTemp.规格   = tempTable.Rows[i]["规格"].ToString();
                        lnqTemp.数量   = Convert.ToDecimal(tempTable.Rows[i]["数量"]);
                        lnqTemp.图号型号 = tempTable.Rows[i]["图号型号"].ToString();
                        lnqTemp.物品ID = Convert.ToInt32(tempTable.Rows[i]["物品ID"]);
                        lnqTemp.物品名称 = tempTable.Rows[i]["物品名称"].ToString();

                        switch (GlobalObject.GeneralFunction.StringConvertToEnum <CE_InPutBusinessType>(tempTable.Rows[0]["BillType"].ToString()))
                        {
                        case CE_InPutBusinessType.生产采购:
                        case CE_InPutBusinessType.普通采购:
                        case CE_InPutBusinessType.委外采购:
                        case CE_InPutBusinessType.样品采购:
                            lnqTemp.批次号 = txtBillNo.Text + i.ToString("D3");
                            break;

                        case CE_InPutBusinessType.领料退库:
                            if (tempTable.Rows[i]["批次号"] == null || tempTable.Rows[i]["批次号"].ToString().Trim().Length == 0)
                            {
                                lnqTemp.批次号 = txtBillNo.Text + i.ToString("D3");
                            }
                            break;

                        default:
                            if (tempTable.Rows[i]["批次号"] != null && tempTable.Rows[i]["批次号"].ToString().Trim().Length > 0)
                            {
                                lnqTemp.批次号 = tempTable.Rows[i]["批次号"].ToString();
                            }
                            break;
                        }

                        lstTemp.Add(lnqTemp);
                    }

                    customDataGridView1.Rows.Clear();
                    RefreshDataGridView(lstTemp);
                }
            }
        }
        private void btnBatchNo_Click(object sender, EventArgs e)
        {
            if (m_lnqWSCode == null)
            {
                return;
            }

            FormQueryInfo form = QueryInfoDialog.GetWorkShopBatchNoInfo(Convert.ToInt32(txtCode.Tag), m_lnqWSCode.WSCode);

            if (form.ShowDialog() == DialogResult.OK)
            {
                txtBatchNo.Text = (string)form.GetDataItem("批次号");
                txtBatchNo.Tag  = form.GetDataItem("库存数量");

                StoreQueryCondition condition = new StoreQueryCondition();

                condition.GoodsID   = Convert.ToInt32(txtCode.Tag);
                condition.BatchNo   = txtBatchNo.Text;
                condition.StorageID = m_strStorage;

                S_Stock tempStock = m_serverStock.GetStockInfo(condition);

                if (tempStock != null)
                {
                    txtProvider.Text        = tempStock.Provider;
                    txtProviderBatchNo.Text = tempStock.ProviderBatchNo;
                }
                else
                {
                    txtProvider.Text = "";
                }
            }
        }
        private void dgvReview_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }

            DataGridViewColumnCollection columns = this.dgvReview.Columns;

            switch (columns[e.ColumnIndex].Name)
            {
            case "选择部门":

                if (e.ColumnIndex == 0)
                {
                    FormQueryInfo frm = QueryInfoDialog.GetDepartment();

                    if (frm.ShowDialog() == DialogResult.OK)
                    {
                        dgvReview.CurrentRow.Cells[2].Value = frm.GetStringDataItem("部门名称");
                        dgvReview.CurrentRow.Cells[1].Value = frm.GetStringDataItem("部门代码");
                    }
                }

                break;
            }
        }
        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;
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 点击供货单位单元格更新供货单位数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }

            DataGridViewColumnCollection columns = this.dataGridView1.Columns;

            if (columns[e.ColumnIndex].Name == "供货单位")
            {
                FormQueryInfo form = QueryInfoDialog.GetProviderFromGoods(
                    dataGridView1.Rows[e.RowIndex].Cells["零部件编码"].Value.ToString(),
                    dataGridView1.Rows[e.RowIndex].Cells["规格"].Value.ToString());

                if (DialogResult.OK == form.ShowDialog() &&
                    MessageDialog.ShowEnquiryMessage("是否保存该供应商信息?") == DialogResult.Yes)
                {
                    string provider = form["供货单位"];

                    dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = provider;

                    StateData <View_ZPX_ReparativeBarcode> data = dataGridView1.Rows[e.RowIndex].Tag as StateData <View_ZPX_ReparativeBarcode>;
                    data.Data.供货单位 = provider;

                    int index = GetDataIndex(data);

                    if (index == -1)
                    {
                        data.DataStatus = StateData <View_ZPX_ReparativeBarcode> .DataStatusEnum.Update;
                        m_lstData.Add(data);
                    }
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        /// 查找物品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            try
            {
                ClearControl();

                FormQueryInfo        form             = QueryInfoDialog.GetOrderFormGoodsDialog(m_billInfo.OrderBill_ID, true);
                IOrderFormInfoServer serviceOrderForm = ServerModuleFactory.GetServerModule <IOrderFormInfoServer>();
                View_B_OrderFormInfo orderInfo        = serviceOrderForm.GetOrderFormInfo(m_billInfo.OrderBill_ID);
                if (form != null && form.ShowDialog() == DialogResult.OK)
                {
                    txtCode.Text = (string)form.GetDataItem("图号型号");
                    txtName.Text = (string)form.GetDataItem("物品名称");
                    txtSpec.Text = (string)form.GetDataItem("规格");

                    IBargainGoodsServer serviceGoodsInfo = ServerModuleFactory.GetServerModule <IBargainGoodsServer>();
                    numUnitPrice.Value = serviceGoodsInfo.GetGoodsUnitPrice(m_billInfo.OrderBill_ID, Convert.ToInt32(form.GetDataItem("物品ID")), orderInfo.供货单位);

                    numGoodsAmount.Value = (decimal)form.GetDataItem("订货数量");

                    View_F_GoodsPlanCost planCost = GetBasicGoodsInfo(txtCode.Text, txtName.Text, txtSpec.Text, numUnitPrice.Value);

                    if (planCost != null)
                    {
                        cmbUnit.Text           = planCost.单位;
                        numPlanUnitPrice.Value = planCost.单价;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageDialog.ShowPromptMessage(ex.Message);
                return;
            }
        }
Esempio n. 8
0
        private void txtAssociatedBillNo_Click(object sender, EventArgs e)
        {
            if (cmbSiteSource.SelectedIndex == 2)
            {
                FormQueryInfo frm = QueryInfoDialog.GetFeedBackBill("", "");
                frm.ShowDialog();

                if ((string)frm.GetDataItem("反馈单号") != null)
                {
                    txtAssociatedBillNo.ReadOnly = true;

                    txtAssociatedBillNo.Text = (string)frm.GetDataItem("反馈单号");
                    txtApplicant.Tag         = m_personnerServer.GetPersonnelViewInfoByName((string)frm.GetDataItem("反馈人"));
                    txtApplicant.Text        = (string)frm.GetDataItem("反馈人");

                    dtpxtApplicant.Value = (DateTime)frm.GetDataItem("反馈日期");
                    txtBugDescribe.Text  = (string)frm.GetDataItem("故障说明");

                    txtBugDescribe.ReadOnly = true;
                    txtApplicant.Enabled    = false;
                    dtpxtApplicant.Enabled  = false;
                }
            }
            else
            {
                txtAssociatedBillNo.ReadOnly = false;
            }
        }
Esempio n. 9
0
        private void btnFindBillNo_Click(object sender, EventArgs e)
        {
            FormQueryInfo dialog = GetScrapBillDialogForFetchGoods();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                txtScrapBillNo.Text = dialog.GetStringDataItem("报废单号");

                IScrapGoodsServer scarpGoodsServer = ServerModule.ServerModuleFactory.GetServerModule <IScrapGoodsServer>();
                IEnumerable <ServerModule.GoodsGroup> goodsGroup = scarpGoodsServer.GetGoodsByGroup(txtScrapBillNo.Text);

                DataTable tempTable = ((DataTable)dataGridView1.DataSource).Clone();

                foreach (GoodsGroup item in goodsGroup)
                {
                    DataRow tempRow = tempTable.NewRow();

                    tempRow["图号型号"]   = item.图号型号;
                    tempRow["物品名称"]   = item.物品名称;
                    tempRow["规格"]     = item.规格;
                    tempRow["账务库房"]   = txtReceiving.Text;
                    tempRow["申请数量"]   = item.数量;
                    tempRow["发货数量"]   = 0;
                    tempRow["收货数量"]   = 0;
                    tempRow["单位"]     = UniversalFunction.GetGoodsInfo(item.物品ID).单位;
                    tempRow["备注"]     = "";
                    tempRow["物品ID"]   = item.物品ID;
                    tempRow["账务库房ID"] = txtReceiving.Tag;

                    tempTable.Rows.Add(tempRow);
                }

                dataGridView1.DataSource = tempTable;
            }
        }
Esempio n. 10
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;
            }
        }
Esempio n. 12
0
        private void btnBatchNo_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetWorkShopBatchNoInfo(Convert.ToInt32(txtCode.Tag), m_lnqWSCode.WSCode);

            if (form.ShowDialog() == DialogResult.OK)
            {
                txtBatchNo.Text = (string)form.GetDataItem("批次号");
            }
        }
        private void btnProvider_Click(object sender, EventArgs e)
        {
            m_formProvider = QueryInfoDialog.GetProviderInfoDialog();

            if (m_formProvider.ShowDialog() == DialogResult.OK)
            {
                txtProvider.Text = m_formProvider.GetStringDataItem("供应商编码");
            }
        }
Esempio n. 14
0
        private void btnFindTesting_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetUnProductTestingSingleDialog();

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                lnklbSingleBill.Text = form.GetDataItem("单据号").ToString();
            }
        }
        private void btnAskDepartment_Click(object sender, EventArgs e)
        {
            FormQueryInfo dialog = QueryInfoDialog.GetDepartment();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                txtAskDepartment.Text = dialog.GetStringDataItem("部门名称");
            }
        }
Esempio n. 16
0
        private void btnFindPurpose_Click(object sender, EventArgs e)
        {
            FormQueryInfo dialog = QueryInfoDialog.GetProductCodeStockSearchMode("where b.产品编码 = '" + cmbProductType.Text + "'");

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                txtProductCode.Text = dialog.GetStringDataItem("箱体编号");
            }
        }
        /// <summary>
        /// 获取人员
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetSimplePersonelInfo();

            if (form.ShowDialog() == DialogResult.OK)
            {
                txtWorkID.Text = form["员工编号"];
            }
        }
Esempio n. 18
0
        private void btnFindProvider_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetProviderInfoDialog();

            if (form.ShowDialog() == DialogResult.OK)
            {
                txtProvider.Text = form.GetDataItem("供应商编码").ToString();
            }
        }
Esempio n. 19
0
        private void btnFindProvider_Click(object sender, EventArgs e)
        {
            m_formProvider = QueryInfoDialog.GetProviderInfoDialog();

            if (m_formProvider.ShowDialog() == DialogResult.OK)
            {
                txtProvider.Text = m_formProvider.GetStringDataItem("供应商编码");
                txtBuyer.Text    = m_serverProviderDuty.GetProviderPrincipal(txtProvider.Text);
            }
        }
Esempio n. 20
0
        private void btnFindOrderForm_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetBargainInfoDialog();

            if (form != null && DialogResult.OK == form.ShowDialog())
            {
                txtBargainNumber.Text = form.GetDataItem("合同号").ToString();
                txtProvider.Text      = form.GetDataItem("供货单位").ToString();
            }
        }
        /// <summary>
        /// 查找物品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            if (txtAssociateID.Text.Trim() == "")
            {
                MessageBox.Show("请先选择关联单号", "提示");
                return;
            }

            if (m_operateMode != CE_BusinessOperateMode.仓库核实)
            {
                FormQueryInfo form = QueryInfoDialog.GetStoreGoodsInfoDialog(txtAssociateID.Text, m_strProvider, m_strStorage);

                if (form != null && 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 = (string)form.GetDataItem("供方批次");
                    txtBatchNo.Text         = (string)form.GetDataItem("批次号");

                    txtUnit.Text  = (string)form.GetDataItem("单位");
                    txtDepot.Text = (string)form.GetDataItem("物品类别名称");
                    txtDepot.Tag  = (string)form.GetDataItem("物品类别");

                    txtShelf.Text  = (string)form.GetDataItem("货架");
                    txtColumn.Text = (string)form.GetDataItem("列");
                    txtLayer.Text  = (string)form.GetDataItem("层");
                }
            }
            else if (m_operateMode != CE_BusinessOperateMode.修改)
            {
                FormQueryInfo form = QueryInfoDialog.GetOrderFormGoodsStockInfoDialog(txtAssociateID.Text, m_strStorage);

                if (form.ShowDialog() == DialogResult.OK)
                {
                    txtCode.Text     = form.GetStringDataItem("图号型号");
                    txtCode.Tag      = (int)form.GetDataItem("物品ID");
                    txtName.Text     = form.GetStringDataItem("物品名称");
                    txtSpec.Text     = form.GetStringDataItem("规格");
                    txtProvider.Text = form.GetStringDataItem("供应商");

                    txtBatchNo.Text = form.GetStringDataItem("批次号");

                    txtProviderBatchNo.Text = form.GetStringDataItem("供方批次");
                    txtUnit.Text            = form.GetStringDataItem("单位");
                    txtDepot.Text           = form.GetStringDataItem("物品类别");
                    txtShelf.Text           = form.GetStringDataItem("货架");
                    txtColumn.Text          = form.GetStringDataItem("列");
                    txtLayer.Text           = form.GetStringDataItem("层");
                }
            }
        }
        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();
            }
        }
Esempio n. 23
0
        /// <summary>
        /// 查找零件编码规格
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            IAssemblyInfoServer assemblyServer = ServerModuleFactory.GetServerModule <IAssemblyInfoServer>();
            FormQueryInfo       form           = new FormQueryInfo(assemblyServer.GetAllChoseConfectPartInfo());

            if (DialogResult.OK == form.ShowDialog())
            {
                txtCode.Text = form.GetDataItem("零件编码").ToString();
                txtSpec.Text = form.GetDataItem("规格").ToString();
            }
        }
Esempio n. 24
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("规格");
            }
        }
        private void btnBillNo_Click(object sender, EventArgs e)
        {
            FormQueryInfo frm = QueryInfoDialog.GetMinorPurchaseInfo();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                txtAssociateBillNo.Text = (string)frm.GetDataItem("单据号");

                m_associateBillNo = txtAssociateBillNo.Text;
            }
        }
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (m_operateMode != CE_BusinessOperateMode.仓库核实)
            {
                FormQueryInfo form = QueryInfoDialog.GetOrderFormInfoDialog(m_strProvider);

                if (DialogResult.OK == form.ShowDialog())
                {
                    txtAssociateID.Text = form.GetDataItem("订单号").ToString();
                }
            }
        }
Esempio n. 27
0
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetProcurementMath();

            if (DialogResult.OK == form.ShowDialog())
            {
                txtMathName.Text = form.GetDataItem("公式名称").ToString();
                txtMathName.Tag  = form.GetDataItem("公式ID").ToString();
                cmbField.Text    = form.GetDataItem("计算字段").ToString();
                txtFormula.Text  = form.GetDataItem("计算公式").ToString();
            }
        }
        /// <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("层");
                    }
                }
            }
        }
Esempio n. 29
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 btnGetGoods_Click(object sender, EventArgs e)
        {
            FormQueryInfo dialog = QueryInfoDialog.GetPartInfoOfElectronFile(
                dateTimePickerST.Value.Date, dateTimePickerET.Value.AddDays(1).Date);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                txtCode.Text    = dialog["零部件编码"];
                txtName.Text    = dialog["零部件名称"];
                txtSpec.Text    = dialog["规格"];
                txtBatchNo.Text = dialog["批次号"];
            }
        }