private bool 检验报告_Form_CommonProcessSubmit(CustomFlowForm form, string advise) { IInspectionReportService serviceInspectionReport = Service_Quality_QC.ServerModuleFactory.GetServerModule <IInspectionReportService>(); try { List <View_Business_InspectionJudge_InspectionReport_Item> detailInfo = form.ResultInfo as List <View_Business_InspectionJudge_InspectionReport_Item>; Business_InspectionJudge_InspectionReport lnqInspectionReport = form.ResultList[0] as Business_InspectionJudge_InspectionReport; this.OperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString()); this.BillNo = lnqInspectionReport.BillNo; switch (this.OperationType) { case CE_FlowOperationType.提交: serviceInspectionReport.SaveInfo(lnqInspectionReport, detailInfo); break; case CE_FlowOperationType.暂存: serviceInspectionReport.SaveInfo(lnqInspectionReport, detailInfo); break; case CE_FlowOperationType.回退: break; case CE_FlowOperationType.未知: break; default: break; } if (!serviceInspectionReport.IsExist(lnqInspectionReport.BillNo)) { MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面"); return(false); } return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
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.单据号 }); } } } }
public InspectionReportController(IInspectionReportService inspectionReportService) { _inspectionReportService = inspectionReportService; }