Exemple #1
0
 public override void LoadFormInfo()
 {
     try
     {
         m_billNoControl = new BillNumberControl(CE_BillTypeEnum.检验报告.ToString(), m_serviceInspectionReport);
         m_lnqBillInfo   = m_serviceInspectionReport.GetSingleBillInfo(this.FlowInfo_BillNo);
         SetInfo();
     }
     catch (Exception ex)
     {
         MessageDialog.ShowErrorMessage(ex.Message);
     }
 }
        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.单据号 });
                    }
                }
            }
        }