Exemple #1
0
        private void PrintProcess(string ProcessType)
        {
            var taskDetail = mESM202TaskDetailBindingSource.Current as MES_M202_Task_Detail;

            if (taskDetail != null)
            {
                var product = productService.GetProduct().Where(a => a.PartNo == taskDetail.PartNo).Select(a => new { a.PartSpec, a.PartType, a.ProcessFlow }).FirstOrDefault();
                if (product == null)
                {
                    throw new AppException("没有对应的产品基础资料,请检查产品基础信息");
                }
                taskDetail.PartSpec    = product.PartSpec;
                taskDetail.PartType    = product.PartType;
                taskDetail.ProcessFlow = product.ProcessFlow;
                List <ERP_M001_Product_ProcessFlow> processList = productService.GetProcessFlowByProdutCode(taskDetail.PartNo).Where(a => a.ProcessType == ProcessType).OrderBy(a => a.ProcessSeqNo).ToList();
                var procNameList = codeService.GetListByCodeID("PROC");
                foreach (var process in processList)
                {
                    process.ProcessName = procNameList.Where(a => a.Code == process.ProcessCode).Select(a => a.Description).FirstOrDefault();
                }
                if (ProcessType == "前制程")
                {
                    //JobLotPreReport frmreport = new JobLotPreReport(taskDetail, processList);
                    //ReportShowForm frm = new ReportShowForm(frmreport);
                    //frm.Show();
                }
                else
                {
                    //JobLotPostReport frmreport = new JobLotPostReport(taskDetail, processList);
                    //ReportShowForm frm = new ReportShowForm(frmreport);
                    //frm.Show();
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// 订单批次号修改后
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cellJobLotNo_TextChanged(object sender, EventArgs e)
 {
     string jobLotNo = cellJobLotNo.Text.Trim();
     if (!string.IsNullOrWhiteSpace(jobLotNo))
     {
         var taskReportHead = taskReportHeadList.FirstOrDefault(a => a.JobLotNo == jobLotNo);
         if (taskReportHead != null)
         {
             List<ERP_M001_Product_ProcessFlow> processList = productService.GetProcessFlowByProdutCode(taskReportHead.PartNo).Where(a => a.ProcessType == "前制程").OrderBy(a => a.ProcessSeqNo).ToList();
             var procNameList = codeService.GetListByCodeID("PROC");
             foreach (var process in processList)
             {
                 process.ProcessName = procNameList.Where(a => a.Code == process.ProcessCode).Select(a => a.Description).FirstOrDefault();
             }
             this.bindingSource2.DataSource = processList;
         }
     }
     //List<ERP_M001_Product_ProcessFlow> processList = productService.GetProcessFlowByProdutCode(taskDetail.PartNo).Where(a => a.ProcessType == processType).OrderBy(a => a.ProcessSeqNo).ToList();
 }
Exemple #3
0
        private void MES501PortalForm_Load(object sender, EventArgs e)
        {
            var machineList = codeService.GetCodeDataByCodeId("MACHINE").Select(a => new { 机台编号 = a.Value, 机台名称 = a.DisPlayName }).ToList();

            SetGridLookUpEdit(txtMacCode, machineList, "机台名称", "机台编号");
            var shiftList = codeService.GetListByCodeID("SHIFT").Select(a => new { 班次 = a.Description, 代号 = a.Code }).ToList();

            SetGridLookUpEdit(txtShiftCode, shiftList, "班次", "代号");

            //txtMacCode.Properties.DataSource = machineList;
            //txtMacCode.Properties.DisplayMember = "机台名称";
            //txtMacCode.Properties.ValueMember = "机台编号";
        }
Exemple #4
0
        protected override void InitData()
        {
            var ngItemList = codeService.GetCodeDataByCodeId("NGPROCESS");

            SetGridLookUpEdit(repositoryItemNgItem, ngItemList);
            //var processCodes = ykdbContext.Set<MES_M003_JobLotTx>().Where(a => a.JobLotNo == jobLotNo).Select(a => a.ProcessCode).ToList();
            var info = codeService.GetListByCodeID("NGPROCESS").Select(a => new MES_M501_JobTx_NG {
                CurrProcessCode = "金丝", ProcessCode = "", NGCode = a.Code, NGQty = 0, JobNo = jobLotNo, CreateDt = DateTime.Now
            }).ToList().OrderBy(a => a.NGCode).ToList();

            //var JobLotTx_NG = jobtxNgService.GetQuery().Where(a => a.JobNo == jobLotNo && a.CurrProcessCode == currProcessCode).ToList();

            //JobLotTx_NG.ForEach(a =>
            //{
            //    var joblot = info.Where(b => b.NGCode == a.NGCode).FirstOrDefault();
            //    if (joblot != null)
            //    {
            //        joblot.NGQty = a.NGQty;
            //        joblot.CurrProcessCode = a.CurrProcessCode;
            //    }
            //});

            this.mESM501JobTxNGBindingSource.DataSource = info;//
        }
Exemple #5
0
        void treeCodeType_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
        {
            ERP_C001_CodeDictionary temp = this.eRPC001CodeDictionaryBindingSource.Current as ERP_C001_CodeDictionary;

            eRPC001CodeBindingSource.DataSource = codeService.GetListByCodeID(temp.Code).OrderBy(a => a.Code).ToList();
        }