コード例 #1
0
        private void btnFindPurpose_Click(object sender, EventArgs e)
        {
            FormQueryInfo dialog = QueryInfoDialog.GetProductCodeStockSearchMode("");

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                txtProductCode.Text = dialog.GetStringDataItem("箱体编号");
                cmbStorage.Tag      = dialog.GetStringDataItem("库房ID").ToString();
                cmbStorage.Text     = dialog.GetStringDataItem("库房名称").ToString();
                txtProductCode.Tag  = Convert.ToInt32(dialog.GetStringDataItem("产品ID"));
                btnStockCheck.Focus();
            }
        }
コード例 #2
0
        /// <summary>
        /// 查找打印规则信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindRule_Click(object sender, EventArgs e)
        {
            FormQueryInfo dialog = QueryInfoDialog.GetBuildRuleForVehicleBarcode();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                int buildRuleID = (int)dialog.GetDataItem("规则编号");

                txtBuildRuleID.Text = buildRuleID.ToString();
                txtProductType.Text = dialog.GetStringDataItem("产品类型名称");

                m_buildRule = m_productBarcodeServer.GetBuildRule(buildRuleID);
            }
        }
コード例 #3
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (m_operateMode == CE_BusinessOperateMode.采购确认)
            {
                DataTable dataTable = m_goodsServer.GetOrderFormInfo(txtName.Tag.ToString(), txtBatchNo.Text, txtProvider.Text, out m_strErr);

                FormQueryInfo form = new FormQueryInfo(dataTable);

                if (DialogResult.OK == form.ShowDialog())
                {
                    txtAssociateID.Text = form.GetDataItem("订单号").ToString();
                }
            }
        }
コード例 #4
0
        private void btnFindOrderForm_Click(object sender, EventArgs e)
        {
            if (lblBillStatus.Text != "新建单据")
            {
                return;
            }

            FormQueryInfo form = QueryInfoDialog.GetProviderInfoDialog();

            if (DialogResult.OK == form.ShowDialog())
            {
                txtProvider.Text = form.GetDataItem("供应商编码").ToString();
            }
        }
コード例 #5
0
        /// <summary>
        /// 获取全部阶段信息
        /// </summary>
        /// <returns>返回阶段信息</returns>
        static public FormQueryInfo GetAllPhase()
        {
            DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

            IQueryable <ZPX_OfflinePhaseSet> result =
                from r in ctx.ZPX_OfflinePhaseSet
                select r;

            DataTable dt = GlobalObject.GeneralFunction.ConvertToDataTable <ZPX_OfflinePhaseSet>(result);

            FormQueryInfo form = new FormQueryInfo(dt);

            return(form);
        }
コード例 #6
0
        /// <summary>
        /// 获取基础物料信息
        /// </summary>
        /// <returns>成功则返回获取到的对话框,失败返回null</returns>
        static public FormQueryInfo GetAllGoodsInfo()
        {
            DepotManagementDataContext ctx = CommentParameter.DepotDataContext;

            IQueryable <View_F_GoodsPlanCost> result =
                from r in ctx.View_F_GoodsPlanCost
                select r;

            DataTable dt = GlobalObject.GeneralFunction.ConvertToDataTable <View_F_GoodsPlanCost>(result);

            FormQueryInfo form = new FormQueryInfo(dt);

            return(form);
        }
コード例 #7
0
        /// <summary>
        /// 获取营销出库单信息对话框(多批次管理用)
        /// </summary>
        /// <returns>成功则返回获取到的对话框,失败返回null</returns>
        static public FormQueryInfo GetOutboundBillDialog()
        {
            string strSql = " SELECT * FROM View_S_MarketingBill_V2 " +
                            " WHERE 业务方式 = '三包外返修出库' AND 单据状态 = '已确认'" +
                            " AND 单据号 NOT IN (SELECT BILL_ID FROM ZPX_MultiBatchPart_LLD)";

            DataTable dt = GlobalObject.DatabaseServer.QueryInfo(strSql);

            FormQueryInfo form = new FormQueryInfo(dt);

            form.HideColumns = new string[] { "删除标志", "库房编码" };

            return(form);
        }
コード例 #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())
            {
                txtGoodsCode.Text = form.GetDataItem("图号型号").ToString();
                tbsGoods.Text     = form.GetDataItem("物品名称").ToString();
                txtSpec.Text      = form.GetDataItem("规格").ToString();
                tbsGoods.Tag      = form.GetDataItem("序号").ToString();
            }
        }
コード例 #9
0
        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();
            }
        }
コード例 #10
0
        public FormQueryInfo GetScrapBillDialogForFetchGoods()
        {
            IScrapBillServer scrapBillServer = ServerModule.ServerModuleFactory.GetServerModule <IScrapBillServer>();

            PlatformManagement.IQueryResult queryInfo;

            if (!scrapBillServer.GetAllBillForFetchGoods(out queryInfo, out m_strErr))
            {
                MessageDialog.ShowErrorMessage(m_strErr);
                return(null);
            }

            FormQueryInfo form = new FormQueryInfo(queryInfo);

            form.ShowColumns = new string[] { "报废单号", "报废时间", "报废类别", "报废原因", "是否冲抵领料单", "申请人签名", "仓管签名" };
            return(form);
        }
コード例 #11
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);
                }
            }
        }
コード例 #12
0
        private void btnOldGoodsInfo_Click(object sender, EventArgs e)
        {
            if (txtAssociateBillNo.Text.Trim() == "")
            {
                MessageDialog.ShowPromptMessage("请先选择关联的采购申请单,再进行此操作!");
                return;
            }

            FormQueryInfo frm = QueryInfoDialog.GetMinorPurchaseList(m_associateBillNo);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                txtOldGoodsCode.Text = (string)frm.GetDataItem("图号型号");
                txtOldGoodsName.Text = (string)frm.GetDataItem("物品名称");
                txtOldGoodsSpec.Text = (string)frm.GetDataItem("规格");
            }
        }
コード例 #13
0
        private void cmd与会资源_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmd与会资源.SelectedIndex > 0)
            {
                if (!dtpkBeginTime.Checked || !dtpkEndTime.Checked)
                {
                    MessageDialog.ShowPromptMessage("请先确定会议起止时间后再选择会议资源");
                    cmd与会资源.SelectedIndex = 0;
                    return;
                }

                FormQueryInfo dialog = QueryInfoDialog.GetMeetingResourceDialog(dtpkBeginTime.Value, dtpkEndTime.Value);

                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    if (!(bool)dialog.GetDataItem("是共享类资源") && dialog["资源空闲"] == "使用中")
                    {
                        MessageDialog.ShowPromptMessage(
                            string.Format("【{0}】资源已经被占用,只允许选择状态为“空闲”的资源", dialog["资源名称"]));

                        cmd与会资源.SelectedIndex = 0;

                        return;
                    }

                    StringBuilder sb = new StringBuilder();

                    sb.Append(dialog["资源名称"]);

                    cmd与会资源.Items[0]      = sb.ToString(0, sb.Length);
                    cmd与会资源.SelectedIndex = 0;

                    m_meetingData.会议资源 = cmd与会资源.Items[0].ToString();

                    View_PRJ_Resource resource = new View_PRJ_Resource();

                    resource.资源编号   = (int)dialog.GetDataItem("资源编号");
                    resource.资源类别名称 = dialog["资源类别名称"];
                    resource.资源名称   = dialog["资源名称"];

                    m_meetingData.会议资源对象集 = new List <View_PRJ_Resource>();
                    m_meetingData.会议资源对象集.Add(resource);
                }
            }
        }
コード例 #14
0
        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;
            }
        }
コード例 #15
0
        private void btnFindOrderForm_Click(object sender, EventArgs e)
        {
            if (lblBillStatus.Text != OrdinaryInDepotBillStatus.新建单据.ToString())
            {
                return;
            }

            FormQueryInfo form = QueryInfoDialog.GetOrderFormInfoDialog(CE_BillTypeEnum.普通入库单);

            if (DialogResult.OK == form.ShowDialog())
            {
                txtOrderFormNumber.Text = form.GetDataItem("订单号").ToString();
                txtProvider.Text        = form.GetDataItem("供货单位").ToString();

                IOrderFormInfoServer orderFormServer = ServerModuleFactory.GetServerModule <IOrderFormInfoServer>();
                IBargainInfoServer   bargainServer   = ServerModuleFactory.GetServerModule <IBargainInfoServer>();
            }
        }
コード例 #16
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = new FormQueryInfo(m_serviceJudgeReport.GetReferenceInfo(chbIsRepeat.Checked));

            if (DialogResult.OK == form.ShowDialog())
            {
                string billNo = form.GetDataItem("业务编号").ToString();
                List <View_Business_InspectionJudge_JudgeReportDetail> detailSource =
                    new List <View_Business_InspectionJudge_JudgeReportDetail>();

                switch (GlobalObject.GeneralFunction.StringConvertToEnum <CE_BillTypeEnum>(form.GetDataItem("业务类别名称").ToString()))
                {
                case CE_BillTypeEnum.入库申请单:
                    detailSource = m_serviceJudgeReport.GetJudgeReportDetail <View_Business_WarehouseInPut_RequisitionDetail>(billNo, txtBillNo.Text,
                                                                                                                              new BaseModule_Manufacture.CommonClass().GetListViewDetailInfo_Requisition(billNo));
                    break;

                case CE_BillTypeEnum.到货单:
                    detailSource = m_serviceJudgeReport.GetJudgeReportDetail <View_Business_WarehouseInPut_AOGDetail>(billNo, txtBillNo.Text,
                                                                                                                      new BaseModule_Manufacture.CommonClass().GetListViewDetailInfo_AOG(billNo));
                    break;

                case CE_BillTypeEnum.检验报告:
                    IInspectionReportService inspectionReportService =
                        Service_Quality_QC.ServerModuleFactory.GetServerModule <IInspectionReportService>();
                    List <Business_InspectionJudge_InspectionReport> tempList = new List <Business_InspectionJudge_InspectionReport>();
                    tempList.Add(inspectionReportService.GetSingleBillInfo(billNo));
                    detailSource = m_serviceJudgeReport.GetJudgeReportDetail <Business_InspectionJudge_InspectionReport>(billNo, txtBillNo.Text, tempList);
                    break;

                default:
                    return;
                }

                if (detailSource != null)
                {
                    foreach (View_Business_InspectionJudge_JudgeReportDetail item in detailSource)
                    {
                        customDataGridView1.Rows.Add(new object[] { item.关联业务, item.图号型号, item.物品名称, item.规格,
                                                                    item.批次号, item.供应商, item.数量, item.单位, item.备注, item.物品ID, item.单据号 });
                    }
                }
            }
        }
コード例 #17
0
        /// <summary>
        /// 查找图号型号
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            if (txtBargainNumber.Text.Length == 0)
            {
                txtBargainNumber.Focus();
                MessageDialog.ShowPromptMessage("请先选择合同号后再进行此操作!");
                return;
            }

            FormQueryInfo form = QueryInfoDialog.GetOrderFormGoodsDialog(txtProvider.Text);

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                txtCode.Tag  = (int)form.GetDataItem("序号");
                txtCode.Text = form.GetDataItem("图号型号").ToString();
                txtName.Text = form.GetDataItem("物品名称").ToString();
                txtSpec.Text = form.GetDataItem("规格").ToString();
            }
        }
コード例 #18
0
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialog(true);

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                txtCode.Text = 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_error);

                if (info != null)
                {
                    cmbUnit.SelectedValue = info.单位ID;
                    txtMaterialType.Text  = info.物品类别名称;
                    txtMaterialType.Tag   = info.物品类别;
                }
            }
        }
コード例 #19
0
        /// <summary>
        /// 获取自制件信息对话框
        /// </summary>
        /// <returns>成功则返回获取到的对话框,失败返回null</returns>
        static public FormQueryInfo GetHomemadeAccessoryInfoDialog()
        {
            IHomemadePartInfoServer server = ServerModuleFactory.GetServerModule <IHomemadePartInfoServer>();
            IQueryable <View_S_HomemadePartInfo> queryResult = server.GetHomemadeAccessory();

            if (BasicInfo.ListRoles.Contains(CE_RoleEnum.零件工程师.ToString()))
            {
                queryResult = queryResult.Where(p => p.供应商 == "SYS_CPKF");
            }
            else
            {
                queryResult = queryResult.Where(p => p.供应商 == CE_WorkShopCode.JJCJ.ToString());
            }

            System.Data.DataTable dataTable = GlobalObject.GeneralFunction.ConvertToDataTable <View_S_HomemadePartInfo>(queryResult);
            FormQueryInfo         form      = new FormQueryInfo(dataTable);

            //form.ShowColumns = new string[] { "图号型号", "零件名称", "规格" };
            return(form);
        }
コード例 #20
0
        private void btnFindOrderForm_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetOrderFormInfoDialog(CE_BillTypeEnum.样品确认申请单);

            if (DialogResult.OK == form.ShowDialog())
            {
                txtCode.Text      = "";
                txtName.Text      = "";
                txtSpec.Text      = "";
                txtVersion.Text   = "";
                txtOrderForm.Text = form.GetDataItem("订单号").ToString();
                txtProvider.Text  = form.GetDataItem("供货单位").ToString();

                View_B_OrderFormInfo lnqOrderForm = m_serverOrderFormInfo.GetOrderFormInfo(txtOrderForm.Text);

                View_B_BargainInfo lnqBargain = m_serverBargainInfo.GetBargainInfo(lnqOrderForm.合同号);

                chkIsOutsourcing.Checked = lnqBargain.是否委外合同;
            }
        }
コード例 #21
0
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            if (m_operateMode != OperateMode.仓库核实)
            {
                FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialogSift(" and AttributeID = "
                                                                                + (int)CE_GoodsAttributeName.自制件 + " and AttributeValue = '" + bool.TrueString + "'");

                if (form != null && form.ShowDialog() == DialogResult.OK)
                {
                    txtCode.Text = form.GetDataItem("图号型号").ToString();
                    txtName.Text = form.GetDataItem("物品名称").ToString();
                    txtSpec.Text = form.GetDataItem("规格").ToString();
                    txtUnit.Text = form.GetStringDataItem("单位");
                    txtCode.Tag  = form.GetDataItem("序号");
                    //txtProvider.Text = form.GetStringDataItem("供应商");
                    txtBatchNo.Text         = form.GetStringDataItem("批次号");
                    txtProviderBatchNo.Text = form.GetStringDataItem("供方批次");
                }
            }
        }
コード例 #22
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = new FormQueryInfo(m_serviceInspectionReport.GetReferenceInfo(chbIsRepeat.Checked));

            if (DialogResult.OK == form.ShowDialog())
            {
                txtBillRelate.Text  = form.GetDataItem("单据号").ToString();
                txtProvider.Text    = form.GetDataItem("供应商").ToString();
                txtBatchNo.Text     = form.GetDataItem("批次号").ToString();
                numGoodsCount.Value = Convert.ToDecimal(form.GetDataItem("数量"));

                View_F_GoodsPlanCost goodsInfo = UniversalFunction.GetGoodsInfo((int)form.GetDataItem("物品ID"));

                txtGoodsCode.Tag  = goodsInfo.序号;
                txtGoodsCode.Text = goodsInfo.图号型号;
                txtGoodsName.Text = goodsInfo.物品名称;
                txtSpec.Text      = goodsInfo.规格;
                lbUnit.Text       = goodsInfo.单位;
            }
        }
コード例 #23
0
        /// <summary>
        /// 查询图号
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnFindCode_Click(object sender, EventArgs e)
        {
            if (lblBillStatus.Text != "新建单据")
            {
                return;
            }

            FormQueryInfo form = QueryInfoDialog.GetPlanCostGoodsDialogSift(" and AttributeID = "
                                                                            + (int)CE_GoodsAttributeName.自制件 + " and AttributeValue = '" + bool.TrueString + "'");

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                txtCode.Text         = form.GetDataItem("图号型号").ToString();
                txtName.Text         = form.GetDataItem("物品名称").ToString();
                txtSpec.Text         = form.GetDataItem("规格").ToString();
                txtUnit.Text         = form.GetStringDataItem("单位");
                txtCode.Tag          = form.GetDataItem("序号");
                txtMaterialType.Text = form.GetStringDataItem("物品类别");
            }
        }
コード例 #24
0
        private void btnFindBatchNo_Click(object sender, EventArgs e)
        {
            FormQueryInfo form = QueryInfoDialog.GetGoodsForBatchNo(Convert.ToInt32(txtCode.Tag), m_billInfo.StorageID);

            if (form != null && form.ShowDialog() == DialogResult.OK)
            {
                txtBatchNo.Text              = form.GetDataItem("批次号").ToString();
                txtProviderBatchNo.Text      = form.GetDataItem("供方批次号").ToString();
                txtProvider.Text             = form.GetDataItem("供货单位").ToString();
                cmbUnit.Text                 = form.GetDataItem("单位").ToString();
                cmbUnit.SelectedValue        = Convert.ToInt32(form.GetDataItem("单位ID").ToString());
                txtShelf.Text                = form.GetDataItem("货架").ToString();
                txtColumn.Text               = form.GetDataItem("列").ToString();
                txtLayer.Text                = form.GetDataItem("层").ToString();
                cmbGoodsStatus.Text          = form.GetDataItem("物品状态").ToString();
                cmbGoodsStatus.SelectedValue = Convert.ToInt32(form.GetDataItem("物品状态ID").ToString());

                txtZMSL.Text = form.GetDataItem("库存数量").ToString();
                txtZMJE.Tag  = m_serverStore.GetGoodsUnitPrice(Convert.ToInt32(txtCode.Tag), txtBatchNo.Text, m_billInfo.StorageID);
                txtZMJE.Text = (Convert.ToDecimal(form.GetDataItem("库存数量")) * Convert.ToDecimal(txtZMJE.Tag)).ToString();
            }
        }
コード例 #25
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();
                }
            }
        }
コード例 #26
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();
            }
        }
コード例 #27
0
        private void btnLoadDataFromMRRB_Click(object sender, EventArgs e)
        {
            if (!CheckData())
            {
                return;
            }

            FormQueryInfo dialog = QueryInfoDialog.GetMaterialRequisitionBillDialog(BasicInfo.LoginID, CE_BillTypeEnum.领料退库单);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                string billNo = dialog.GetStringDataItem("退库单号");

                if (MessageDialog.ShowEnquiryMessage("您确定要导入 " + billNo
                                                     + " 领料单的信息吗?此过程需要一段时间,是否继续?") == DialogResult.No)
                {
                    return;
                }

                IMaterialReturnedInTheDepot     billServer  = ServerModuleFactory.GetServerModule <IMaterialReturnedInTheDepot>();
                IMaterialListReturnedInTheDepot goodsServer = ServerModuleFactory.GetServerModule <IMaterialListReturnedInTheDepot>();

                View_S_MaterialReturnedInTheDepot            bill       = billServer.GetBillView(billNo);
                List <View_S_MaterialListReturnedInTheDepot> lstMRGoods = (from r in goodsServer.GetGoods(billNo) select r).ToList();

                if (lstMRGoods.Count > 0)
                {
                    if (是否一次性物品.Checked && GlobalObject.GeneralFunction.IsNullOrEmpty(m_productNumber))
                    {
                        m_productNumber = cmbProductCode.Text;
                    }

                    List <StorageGoods> lstGoods = new List <StorageGoods>(lstMRGoods.Count);

                    foreach (var item in lstMRGoods)
                    {
                        StorageGoods goods = new StorageGoods();

                        goods.GoodsCode = item.图号型号;
                        goods.GoodsName = item.物品名称;
                        goods.Spec      = item.规格;
                        goods.Provider  = item.供应商;
                        goods.BatchNo   = item.批次号;
                        goods.Quantity  = -(decimal)item.退库数;
                        goods.StorageID = bill.库房代码;

                        lstGoods.Add(goods);
                    }

                    if (!m_mbpServer.AddFromBill(BasicInfo.LoginID, Convert.ToInt32(
                                                     cmbPurpose.SelectedValue), m_productNumber, billNo, lstGoods, out m_error))
                    {
                        MessageDialog.ShowErrorMessage(m_error);
                    }
                    else
                    {
                        MessageDialog.ShowPromptMessage("操作成功");

                        SearchData(0);
                    }
                }
            }
        }
コード例 #28
0
        /// <summary>
        /// 从营销出库单导入
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLoadDataFromOutboundOrder_Click(object sender, EventArgs e)
        {
            if (!CheckData())
            {
                return;
            }

            FormQueryInfo dialog = QueryInfoDialog.GetOutboundBillDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                string billNo = dialog.GetStringDataItem("单据号");

                if (MessageDialog.ShowEnquiryMessage("您确定要导入 " + billNo
                                                     + " 营销出库单的信息吗?此过程需要一段时间,是否继续?") == DialogResult.No)
                {
                    return;
                }

                // 营销出库单服务
                ISellIn billServer = ServerModuleFactory.GetServerModule <ISellIn>();

                DataTable bill = billServer.GetBill(billNo, 0);

                string storageID = bill.Rows[0]["StorageID"].ToString();

                DataTable list = billServer.GetList((int)bill.Rows[0]["ID"]);

                if (list.Rows.Count > 0)
                {
                    List <StorageGoods> lstGoods = new List <StorageGoods>(list.Rows.Count);

                    for (int i = 0; i < list.Rows.Count; i++)
                    {
                        StorageGoods goods = new StorageGoods();

                        goods.GoodsCode = list.Rows[i]["GoodsCode"].ToString();
                        goods.GoodsName = list.Rows[i]["GoodsName"].ToString();
                        goods.Spec      = list.Rows[i]["Spec"].ToString();
                        goods.Provider  = list.Rows[i]["Provider"].ToString();
                        goods.BatchNo   = list.Rows[i]["BatchNo"].ToString();
                        goods.Quantity  = (decimal)list.Rows[i]["Count"];
                        goods.StorageID = storageID;

                        lstGoods.Add(goods);
                    }

                    if (是否一次性物品.Checked && GlobalObject.GeneralFunction.IsNullOrEmpty(m_productNumber))
                    {
                        m_productNumber = cmbProductCode.Text;
                    }

                    if (!m_mbpServer.AddFromBill(BasicInfo.LoginID, Convert.ToInt32(
                                                     cmbPurpose.SelectedValue), m_productNumber, billNo, lstGoods, out m_error))
                    {
                        MessageDialog.ShowErrorMessage(m_error);
                    }
                    else
                    {
                        MessageDialog.ShowPromptMessage("操作成功");

                        SearchData(0);
                    }
                }
            }
        }