From 084ff28b808b4c3299f76eeeb88dc4fdbdbd31f7 Mon Sep 17 00:00:00 2001 From: leomo Date: Mon, 26 Sep 2022 17:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E4=BD=93=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIMS.sln | 4 +- AIMS/AIMS.csproj | 187 +- AIMS/DataDictionary/frmBasicDictionary.cs | 32 +- AIMS/DataDictionary/frmDisease.cs | 14 +- AIMS/DataDictionary/frmDrugs.cs | 14 +- AIMS/DataDictionary/frmEvents.cs | 14 +- AIMS/DataDictionary/frmMedicalItemKind.cs | 12 +- AIMS/DataDictionary/frmOperation.cs | 14 +- AIMS/DataDictionary/frmOutputLiquids.cs | 16 +- AIMS/DataDictionary/frmPatientKind.cs | 16 +- AIMS/DataDictionary/frmSysConfig.cs | 16 +- AIMS/DocManager/frmDocument3.cs | 2 +- AIMS/DrugManagement/frmDosageKind.cs | 12 +- AIMS/DrugManagement/frmDosageUnit.cs | 12 +- AIMS/DrugManagement/frmDrugKind.cs | 16 +- AIMS/DrugManagement/frmDrugManufacturer.cs | 12 +- .../DrugManagement/frmDrugManufacturerList.cs | 5 +- AIMS/DrugManagement/frmMedicalDict.cs | 32 +- AIMS/DrugManagement/frmMedicalDictList.cs | 5 +- AIMS/DrugManagement/frmMedicalItem.cs | 20 +- AIMS/DrugManagement/frmMedicalItemDetail.cs | 57 +- AIMS/DrugManagement/frmMedicamentPrice.cs | 20 +- AIMS/DrugManagement/frmPharmaCology.cs | 12 +- AIMS/FormLogin.cs | 30 +- AIMS/FormMainManage.cs | 37 +- AIMS/OperationAfter/OperationReview.cs | 15 - AIMS/OperationAfter/OperationReviewDB.cs | 27 - AIMS/OperationAfter/frmOperationManage.cs | 14 +- AIMS/OperationAfter/frmOperationReview.cs | 8 +- .../frmPhysiologyLargeScreen.cs | 9 +- .../frmQualityControlViewParent.cs | 2 +- .../BLL/FactAnaesthesiaMethod.cs | 41 - .../AnasRecordBill/BLL/FactDiagnoseInfo.cs | 36 - .../BLL/FactOperationBodyPosition.cs | 34 - .../BLL/FactOperationCutType.cs | 31 - .../AnasRecordBill/BLL/FactOperationInfo.cs | 34 - .../BLL/FactOperationPosition.cs | 31 - .../AnasRecordBill/BLL/FactPersonDuty.cs | 34 - .../BLL/FillAnasRecordBillData.cs | 23 - .../AnasRecordBill/BLL/InRoom.cs | 137 -- .../AnasRecordBill/BLL/OperationRecord.cs | 101 - .../AnasRecordBill/BLL/SelectPatient.cs | 45 - .../AnasRecordBill/DAL/AddPhysioParamDB.cs | 76 - .../DAL/FactAnaesthesiaMethodDB.cs | 113 -- .../AnasRecordBill/DAL/FactDiagnoseInfoDB.cs | 100 - .../DAL/FactOperationBodyPositionDB.cs | 99 - .../DAL/FactOperationCutTypeDB.cs | 96 - .../AnasRecordBill/DAL/FactOperationInfoDB.cs | 102 - .../DAL/FactOperationPositionDB.cs | 96 - .../AnasRecordBill/DAL/FactPersonDutyDB.cs | 103 - .../DAL/FillAnasRecordBillDataDB.cs | 54 - .../AnasRecordBill/DAL/OperationRecordDB.cs | 243 --- .../AnasRecordBill/DAL/SelectPatientDB.cs | 68 - .../AnasRecordBill/FillAnasReordBill.cs | 25 +- .../AnasRecordBill/Model/AddPhysioParam.cs | 23 - .../Model/AnasRecordBillRemark.cs | 29 - .../AnasRecordBill/Model/DistinctFactDrug.cs | 29 - .../Model/FactAnaesthesiaMethod.cs | 74 - .../AnasRecordBill/Model/FactDiagnoseInfo.cs | 76 - .../Model/FactOperationBodyPosition.cs | 74 - .../Model/FactOperationCutType.cs | 74 - .../AnasRecordBill/Model/FactOperationInfo.cs | 103 - .../Model/FactOperationPosition.cs | 74 - .../AnasRecordBill/Model/FactPersonDuty.cs | 83 - .../AnasRecordBill/Model/OperationRecord.cs | 283 --- .../AnasRecordBill/Model/PhysioData.cs | 62 - .../AnasRecordBill/frmAnasRecordBillNew.cs | 27 +- .../AnasRecordBill/frmFactDrugNew.cs | 4 +- .../AnasRecordBill/frmFactOutputLiquids.cs | 6 +- .../AnasRecordBill/frmOperationInfoNew.cs | 6 +- .../AnasRecordBill/frmSelectPatientNew.cs | 26 +- .../AnasRecordBill/frmSeleteRoom.cs | 10 +- .../AnasRecoverBill/BLL/SelectPatient.cs | 20 - .../AnasRecoverBill/DAL/SelectPatientDB.cs | 27 - .../AnasRecoverBill/Model/TitleTime.cs | 26 - .../UI/frmAnasRecoverBillNew.cs | 1579 --------------- .../frmAnasRecoverBillNew.Designer.cs | 743 +++++-- .../AnasRecoverBill/frmAnasRecoverBillNew.cs | 1748 +++++++++++++++++ .../{UI => }/frmAnasRecoverBillNew.resx | 307 +-- .../{UI => }/frmRecoverPatient.Designer.cs | 0 .../{UI => }/frmRecoverPatient.cs | 19 +- .../{UI => }/frmRecoverPatient.resx | 0 .../oldSystemCode/frmChargRecordPrint.cs | 8 +- .../oldSystemCode/frmGoodsBillRecord.cs | 6 +- .../frmSelectPatientGoodsBill.cs | 8 +- .../BLL/ApplyAnaesthesiaMethod.cs | 24 - AIMS/OperationFront/BLL/ApplyDiagnoseInfo.cs | 24 - .../BLL/ApplyOperationCutType..cs | 24 - AIMS/OperationFront/BLL/ApplyOperationInfo.cs | 24 - .../BLL/ApplyOperationPosition.cs | 24 - AIMS/OperationFront/BLL/ApplyPersonDuty.cs | 28 - AIMS/OperationFront/BLL/OperationApply.cs | 125 -- AIMS/OperationFront/BLL/Oris_Patient.cs | 34 - .../{UI => }/ButtonCustomItem.cs | 0 .../DAL/ApplyAnaesthesiaMethodDB.cs | 48 - .../OperationFront/DAL/ApplyDiagnoseInfoDB.cs | 47 - .../DAL/ApplyOperationCutTypeDB.cs | 49 - .../DAL/ApplyOperationInfoDB.cs | 56 - .../DAL/ApplyOperationPositionDB.cs | 48 - AIMS/OperationFront/DAL/ApplyPersonDutyDB.cs | 53 - AIMS/OperationFront/DAL/OperationApplyDB.cs | 375 ---- AIMS/OperationFront/DAL/Oris_PatientDB.cs | 139 -- .../OperationFront/{UI => }/FrmScheduling2.cs | 33 +- .../{UI => }/FrmScheduling2.designer.cs | 0 .../{UI => }/FrmScheduling2.resx | 0 .../{UI => }/FrmScheduling2Option.cs | 0 .../{UI => }/FrmScheduling2Option.designer.cs | 0 .../{UI => }/FrmScheduling2Option.resx | 0 .../{UI => }/GlossyCustomItem.cs | 0 .../Model/ApplyAnaesthesiaMethod.cs | 65 - .../OperationFront/Model/ApplyDiagnoseInfo.cs | 65 - .../Model/ApplyOperationCutType.cs | 65 - .../Model/ApplyOperationInfo.cs | 92 - .../Model/ApplyOperationPosition.cs | 65 - AIMS/OperationFront/Model/ApplyPersonDuty.cs | 74 - AIMS/OperationFront/Model/OperationApply.cs | 260 --- AIMS/OperationFront/Model/Oris_Patient.cs | 201 -- .../OperationFront/{UI => }/NoteCustomItem.cs | 0 .../{UI => }/frmApplyConfigSet.Designer.cs | 0 .../{UI => }/frmApplyConfigSet.cs | 0 .../{UI => }/frmApplyConfigSet.resx | 0 .../{UI => }/frmExeOperationPlan.Designer.cs | 0 .../{UI => }/frmExeOperationPlan.cs | 7 +- .../{UI => }/frmExeOperationPlan.resx | 0 .../{UI => }/frmOperationApply.Designer.cs | 0 .../{UI => }/frmOperationApply.cs | 12 +- .../{UI => }/frmOperationApply.resx | 0 .../frmOperationApplyDetail.Designer.cs | 0 .../{UI => }/frmOperationApplyDetail.cs | 296 ++- .../{UI => }/frmOperationApplyDetail.resx | 0 .../frmOperationFrontVisit.Designer.cs | 0 .../{UI => }/frmOperationFrontVisit.cs | 18 +- .../{UI => }/frmOperationFrontVisit.resx | 0 .../{UI => }/frmOperationPlan.Designer.cs | 0 .../{UI => }/frmOperationPlan.cs | 20 +- .../{UI => }/frmOperationPlan.resx | 0 .../frmOperationPlanDetail.Designer.cs | 0 .../{UI => }/frmOperationPlanDetail.cs | 88 +- .../{UI => }/frmOperationPlanDetail.resx | 0 .../{UI => }/frmOperationSchedulePlan.cs | 44 +- .../{UI => }/frmOperationSchedulePlan.resx | 0 .../{UI => }/frmPlanOrder.Designer.cs | 0 AIMS/OperationFront/{UI => }/frmPlanOrder.cs | 7 +- .../OperationFront/{UI => }/frmPlanOrder.resx | 0 .../{UI => }/frmPlanPatientInfo.Designer.cs | 0 .../{UI => }/frmPlanPatientInfo.cs | 10 +- .../{UI => }/frmPlanPatientInfo.resx | 0 .../{UI => }/frmPrintingArrangemen.cs | 14 +- .../frmPrintingArrangemen.designer.cs | 0 .../{UI => }/frmPrintingArrangemen.resx | 0 .../{UI => }/frmSchedulePlan.cs | 0 .../{UI => }/frmSchedulePlan.designer.cs | 0 .../{UI => }/frmSchedulePlan.resx | 0 .../{UI => }/frmSchedulePlan2.cs | 0 .../{UI => }/frmSchedulePlan2.designer.cs | 0 .../{UI => }/frmSchedulePlan2.resx | 0 .../{UI => }/frmSelectiveOperationsPrint.cs | 5 +- .../frmSelectiveOperationsPrint.designer.cs | 0 .../{UI => }/frmSelectiveOperationsPrint.resx | 0 .../{UI => }/frmStopOperation.Designer.cs | 0 .../{UI => }/frmStopOperation.cs | 5 +- .../{UI => }/frmStopOperation.resx | 0 AIMS/OremrUserControl/PrescriptionDocument.cs | 18 +- AIMS/OremrUserControl/ucDocument.cs | 23 +- AIMS/OremrUserControl/ucPatientRecoverCard.cs | 2 +- AIMS/PublicUI/MainFormManage.cs | 23 +- AIMS/PublicUI/frmAnaesthesiaMethod.cs | 7 +- AIMS/PublicUI/frmContagion.cs | 7 +- AIMS/PublicUI/frmCreateTemplate.cs | 7 +- AIMS/PublicUI/frmDepartment.cs | 14 +- AIMS/PublicUI/frmEditPassWord.cs | 10 +- AIMS/PublicUI/frmMenu.cs | 30 +- AIMS/PublicUI/frmNotice.cs | 28 +- AIMS/PublicUI/frmNoticeMain.cs | 12 +- AIMS/PublicUI/frmOperationBodyPosition.cs | 7 +- AIMS/PublicUI/frmOperationCutType.cs | 7 +- AIMS/PublicUI/frmOperationPosition.cs | 7 +- AIMS/PublicUI/frmPerson.cs | 24 +- AIMS/PublicUI/frmSelectDisease.cs | 16 +- AIMS/PublicUI/frmSelectOperation.cs | 20 +- AIMS/PublicUI/frmSelectOperationOne.cs | 16 +- AIMS/PublicUI/frmSelectPerson.cs | 33 +- AIMS/PublicUI/frmTemplate.cs | 11 +- AIMS/PublicUI/frmUserPurview.cs | 18 +- AIMS/PublicUI/frmUserPurviewDetail.cs | 22 +- AIMS/ReportManager/frmAllReport.cs | 5 +- AIMS/ReportManager/frmOperationPlanReport.cs | 12 +- .../frmOperationWorkloadStatisticsReport.cs | 5 +- AIMSEntity/AIMSEntity.csproj | 163 +- .../AutoGenerate}/BInstrumentRegistration.cs | 0 .../AutoGenerate}/BNoticeContent.cs | 0 .../AutoGenerate}/BNoticeTemplate.cs | 9 - AIMSEntity/BLL/AutoGenerate/BPhysioData.cs | 160 -- .../BLL/AutoGenerate/BPhysioDataConfig.cs | 160 -- AIMSEntity/BLL/AutoGenerate/BPrintTemplate.cs | 121 -- .../AutoGenerate}/BUseDrugsReport.cs | 0 .../AutoGenerate}/BUseDrugsReportManager.cs | 0 .../BLL/AutoGenerate/BUserTempPurview.cs | 160 -- .../BLL/Extension/BAnaesthesiaMethod.cs | 15 +- .../BLL/Extension/BApplyAnaesthesiaMethod.cs | 16 + .../BLL/Extension/BApplyDiagnoseInfo.cs | 13 + .../BLL/Extension/BApplyOperationCutType.cs | 13 + .../BLL/Extension/BApplyOperationInfo.cs | 13 + .../BLL/Extension/BApplyOperationPosition.cs | 13 + AIMSEntity/BLL/Extension/BApplyPersonDuty.cs | 19 + AIMSEntity/BLL/Extension/BBasicDictionary.cs | 48 + AIMSEntity/BLL/Extension/BDepartment.cs | 53 +- AIMSEntity/BLL/Extension/BDisease.cs | 50 + AIMSEntity/BLL/Extension/BDosageKind.cs | 41 + AIMSEntity/BLL/Extension/BDosageUnit.cs | 30 + AIMSEntity/BLL/Extension/BDrugKind.cs | 48 + AIMSEntity/BLL/Extension/BDrugManufacturer.cs | 43 + AIMSEntity/BLL/Extension/BDrugs.cs | 37 + AIMSEntity/BLL/Extension/BEvents.cs | 41 + .../BLL/Extension/BFactAnaesthesiaMethod.cs | 32 + AIMSEntity/BLL/Extension/BFactDiagnoseInfo.cs | 27 + .../Extension/BFactOperationBodyPosition.cs | 25 + .../BLL/Extension/BFactOperationCutType.cs | 22 + .../BLL/Extension/BFactOperationInfo.cs | 27 + .../BLL/Extension/BFactOperationPosition.cs | 22 + AIMSEntity/BLL/Extension/BFactPersonDuty.cs | 25 + AIMSEntity/BLL/Extension/BMedicalDict.cs | 35 + AIMSEntity/BLL/Extension/BMedicalItem.cs | 43 + AIMSEntity/BLL/Extension/BMedicalItemKind.cs | 30 + AIMSEntity/BLL/Extension/BMedicamentPrice.cs | 32 + AIMSEntity/BLL/Extension/BMenu.cs | 91 + AIMSEntity/BLL/Extension/BNotice.cs | 29 + AIMSEntity/BLL/Extension/BNoticeTemplate.cs | 11 + AIMSEntity/BLL/Extension/BOperation.cs | 34 + AIMSEntity/BLL/Extension/BOperationApply.cs | 107 + .../BLL/Extension/BOperationBodyPosition.cs | 17 + AIMSEntity/BLL/Extension/BOperationCutType.cs | 26 + AIMSEntity/BLL/Extension/BOperationLevel.cs | 25 + .../BLL/Extension/BOperationPosition.cs | 25 + AIMSEntity/BLL/Extension/BOperationRecord.cs | 100 +- AIMSEntity/BLL/Extension/BOperationRoom.cs | 25 + .../BLL/Extension/BOperationTemplate.cs | 260 +++ AIMSEntity/BLL/Extension/BOrisPatient.cs | 27 + AIMSEntity/BLL/Extension/BOutputLiquids.cs | 38 + AIMSEntity/BLL/Extension/BPatientKind.cs | 40 + AIMSEntity/BLL/Extension/BPerson.cs | 57 + AIMSEntity/BLL/Extension/BPersonDuty.cs | 6 + AIMSEntity/BLL/Extension/BPharmaCology.cs | 40 + AIMSEntity/BLL/Extension/BPhysioData.cs | 12 - AIMSEntity/BLL/Extension/BPhysioDataConfig.cs | 12 - AIMSEntity/BLL/Extension/BPrintTemplate.cs | 12 - AIMSEntity/BLL/Extension/BRole.cs | 28 + AIMSEntity/BLL/Extension/BSysConfig.cs | 28 + AIMSEntity/BLL/Extension/BUserPurview.cs | 37 + AIMSEntity/BLL/Extension/BUserTempPurview.cs | 12 - .../DAL/AutoGenerate/DFactOperationInfo.cs | 22 +- .../AutoGenerate}/DInstrumentRegistration.cs | 0 .../AutoGenerate}/DNoticeContent.cs | 0 .../AutoGenerate}/DNoticeTemplate.cs | 0 .../DAL/AutoGenerate/DOperationTemplate.cs | 40 +- AIMSEntity/DAL/AutoGenerate/DPhysioData.cs | 633 ------ .../DAL/AutoGenerate/DPhysioDataConfig.cs | 639 ------ AIMSEntity/DAL/AutoGenerate/DPrintTemplate.cs | 471 ----- .../AutoGenerate}/DUseDrugsReport.cs | 0 .../DAL/AutoGenerate/DUserTempPurview.cs | 591 ------ .../DAL/Extension/DAnaesthesiaMethod.cs | 56 +- .../DAL/Extension/DApplyAnaesthesiaMethod.cs | 40 + .../DAL/Extension/DApplyDiagnoseInfo.cs | 38 + .../DAL/Extension/DApplyOperationCutType.cs | 40 + .../DAL/Extension/DApplyOperationInfo.cs | 46 + .../DAL/Extension/DApplyOperationPosition.cs | 39 + AIMSEntity/DAL/Extension/DApplyPersonDuty.cs | 44 + AIMSEntity/DAL/Extension/DBasicDictionary.cs | 246 +++ AIMSEntity/DAL/Extension/DDepartment.cs | 250 +++ AIMSEntity/DAL/Extension/DDisease.cs | 111 ++ AIMSEntity/DAL/Extension/DDosageKind.cs | 72 + AIMSEntity/DAL/Extension/DDosageUnit.cs | 72 + AIMSEntity/DAL/Extension/DDrugKind.cs | 121 ++ AIMSEntity/DAL/Extension/DDrugManufacturer.cs | 81 + AIMSEntity/DAL/Extension/DDrugs.cs | 92 + AIMSEntity/DAL/Extension/DEvents.cs | 151 +- .../DAL/Extension/DFactAnaesthesiaMethod.cs | 104 + AIMSEntity/DAL/Extension/DFactDiagnoseInfo.cs | 91 + .../Extension/DFactOperationBodyPosition.cs | 92 +- .../DAL/Extension/DFactOperationCutType.cs | 87 + .../DAL/Extension/DFactOperationInfo.cs | 94 + .../DAL/Extension/DFactOperationPosition.cs | 87 + AIMSEntity/DAL/Extension/DFactPersonDuty.cs | 94 + AIMSEntity/DAL/Extension/DMedicalDict.cs | 99 + AIMSEntity/DAL/Extension/DMedicalItem.cs | 164 ++ AIMSEntity/DAL/Extension/DMedicalItemKind.cs | 66 + AIMSEntity/DAL/Extension/DMedicamentPrice.cs | 88 + AIMSEntity/DAL/Extension/DMenu.cs | 403 ++++ AIMSEntity/DAL/Extension/DNotice.cs | 78 + AIMSEntity/DAL/Extension/DOperation.cs | 95 + AIMSEntity/DAL/Extension/DOperationApply.cs | 356 +++- .../DAL/Extension/DOperationBodyPosition.cs | 69 + AIMSEntity/DAL/Extension/DOperationCutType.cs | 63 + AIMSEntity/DAL/Extension/DOperationLevel.cs | 62 + .../DAL/Extension/DOperationPosition.cs | 67 + AIMSEntity/DAL/Extension/DOperationRecord.cs | 163 +- AIMSEntity/DAL/Extension/DOperationRoom.cs | 120 ++ .../DAL/Extension/DOperationTemplate.cs | 165 ++ AIMSEntity/DAL/Extension/DOrisPatient.cs | 130 ++ AIMSEntity/DAL/Extension/DOutputLiquids.cs | 118 ++ AIMSEntity/DAL/Extension/DPatientKind.cs | 107 + AIMSEntity/DAL/Extension/DPerson.cs | 234 ++- AIMSEntity/DAL/Extension/DPersonDuty.cs | 5 + AIMSEntity/DAL/Extension/DPharmaCology.cs | 72 + AIMSEntity/DAL/Extension/DPhysioData.cs | 13 - AIMSEntity/DAL/Extension/DPhysioDataConfig.cs | 13 - AIMSEntity/DAL/Extension/DPrintTemplate.cs | 13 - AIMSEntity/DAL/Extension/DRole.cs | 63 + AIMSEntity/DAL/Extension/DSysConfig.cs | 76 + .../Extension}/DUseDrugsReportService.cs | 0 AIMSEntity/DAL/Extension/DUserPurview.cs | 75 + AIMSEntity/DAL/Extension/DUserTempPurview.cs | 13 - AIMSEntity/Extensions/BOperationReview.cs | 27 + AIMSEntity/{ => Extensions}/Connection.cs | 0 .../Extensions}/DeviceCacheData.cs | 2 +- .../{Model => Extensions}/ParameterList.cs | 0 AIMSEntity/Extensions/SelectPatient.cs | 213 ++ .../Extensions}/TitleTime.cs | 2 +- .../Model/AutoGenerate/FactOperationInfo.cs | 27 + .../AutoGenerate}/InstrumentRegistration.cs | 0 .../AutoGenerate}/NoticeContent.cs | 0 .../AutoGenerate}/NoticeTemplate.cs | 0 .../Model/AutoGenerate/OperationTemplate.cs | 274 +-- AIMSEntity/Model/AutoGenerate/PhysioData.cs | 104 - .../Model/AutoGenerate/PhysioDataConfig.cs | 113 -- .../Model/AutoGenerate/PrintTemplate.cs | 95 - .../AutoGenerate}/UseDrugsReport.cs | 0 .../Model/AutoGenerate/UserTempPurview.cs | 41 - AIMSEntity/Model/Extension/BasicDictionary.cs | 2 + AIMSEntity/Model/Extension/Menu.cs | 2 + AIMSEntity/Model/Extension/PhysioData.cs | 10 - .../Model/Extension/PhysioDataConfig.cs | 10 - AIMSEntity/Model/Extension/PrintTemplate.cs | 10 - AIMSEntity/Model/Extension/UserTempPurview.cs | 10 - AIMSEntity/ObjectQuery/EntityMap.cs | 10 +- .../ObjectQuery/FactOperationInfoMap.cs | 3 + .../ObjectQuery/OperationTemplateMap.cs | 6 + AIMSEntity/ObjectQuery/PhysioDataConfigMap.cs | 44 - AIMSEntity/ObjectQuery/PhysioDataMap.cs | 43 - AIMSEntity/ObjectQuery/PrintTemplateMap.cs | 42 - AIMSEntity/ObjectQuery/UserTempPurviewMap.cs | 36 - AIMSEntity/OldEntity/BLL/AnaesthesiaMethod.cs | 47 - AIMSEntity/OldEntity/BLL/DataDictionary.cs | 69 - AIMSEntity/OldEntity/BLL/Department.cs | 59 - AIMSEntity/OldEntity/BLL/Disease.cs | 57 - AIMSEntity/OldEntity/BLL/DosageKind.cs | 49 - AIMSEntity/OldEntity/BLL/DosageUnit.cs | 53 - AIMSEntity/OldEntity/BLL/DrugKind.cs | 57 - AIMSEntity/OldEntity/BLL/DrugManufacturer.cs | 51 - AIMSEntity/OldEntity/BLL/Drugs.cs | 61 - AIMSEntity/OldEntity/BLL/Events.cs | 56 - AIMSEntity/OldEntity/BLL/MedicalDict.cs | 56 - AIMSEntity/OldEntity/BLL/MedicalItem.cs | 65 - AIMSEntity/OldEntity/BLL/MedicalItemKind.cs | 49 - AIMSEntity/OldEntity/BLL/MedicamentPrice.cs | 54 - AIMSEntity/OldEntity/BLL/Menu.cs | 113 -- AIMSEntity/OldEntity/BLL/Notice.cs | 36 - AIMSEntity/OldEntity/BLL/Operation.cs | 56 - .../OldEntity/BLL/OperationBodyPosition.cs | 32 - AIMSEntity/OldEntity/BLL/OperationCutType.cs | 47 - AIMSEntity/OldEntity/BLL/OperationLevel.cs | 47 - AIMSEntity/OldEntity/BLL/OperationPosition.cs | 47 - .../OldEntity/BLL/OperationRecoverRoom.cs | 35 - AIMSEntity/OldEntity/BLL/OperationRoom.cs | 38 - AIMSEntity/OldEntity/BLL/OperationTemplate.cs | 271 --- AIMSEntity/OldEntity/BLL/OutputLiquids.cs | 52 - AIMSEntity/OldEntity/BLL/PatientKind.cs | 62 - AIMSEntity/OldEntity/BLL/Person.cs | 91 - AIMSEntity/OldEntity/BLL/PersonDuty.cs | 15 - AIMSEntity/OldEntity/BLL/PharmaCology.cs | 50 - AIMSEntity/OldEntity/BLL/PrintDoc.cs | 30 - AIMSEntity/OldEntity/BLL/Role.cs | 51 - AIMSEntity/OldEntity/BLL/SysConfig.cs | 56 - AIMSEntity/OldEntity/BLL/UserPurview.cs | 58 - .../OldEntity/DAL/AnaesthesiaMethodDB.cs | 97 - AIMSEntity/OldEntity/DAL/BasicDictionaryDB.cs | 276 --- AIMSEntity/OldEntity/DAL/DepartmentDB.cs | 257 --- AIMSEntity/OldEntity/DAL/DiseaseDB.cs | 118 -- AIMSEntity/OldEntity/DAL/DosageKindDB.cs | 81 - AIMSEntity/OldEntity/DAL/DosageUnitDB.cs | 96 - AIMSEntity/OldEntity/DAL/DrugKindDB.cs | 145 -- .../OldEntity/DAL/DrugManufacturerDB.cs | 90 - AIMSEntity/OldEntity/DAL/DrugsDB.cs | 120 -- AIMSEntity/OldEntity/DAL/EventsDB.cs | 171 -- AIMSEntity/OldEntity/DAL/MedicalDictDB.cs | 124 -- AIMSEntity/OldEntity/DAL/MedicalItemDB.cs | 207 -- AIMSEntity/OldEntity/DAL/MedicalItemKindDB.cs | 91 - AIMSEntity/OldEntity/DAL/MedicamentPriceDB.cs | 109 - AIMSEntity/OldEntity/DAL/MenuDB.cs | 429 ---- AIMSEntity/OldEntity/DAL/NoticeDB.cs | 86 - .../OldEntity/DAL/OperationBodyPositionDB.cs | 94 - .../OldEntity/DAL/OperationCutTypeDB.cs | 87 - AIMSEntity/OldEntity/DAL/OperationDB.cs | 120 -- AIMSEntity/OldEntity/DAL/OperationLevelDB.cs | 85 - .../OldEntity/DAL/OperationPositionDB.cs | 94 - .../OldEntity/DAL/OperationRecoverRoomDB.cs | 102 - AIMSEntity/OldEntity/DAL/OperationRoomDB.cs | 145 -- .../OldEntity/DAL/OperationTemplateDB.cs | 196 -- AIMSEntity/OldEntity/DAL/OutputLiquidsDB.cs | 144 -- AIMSEntity/OldEntity/DAL/PatientKindDB.cs | 130 -- AIMSEntity/OldEntity/DAL/PersonDB.cs | 254 --- AIMSEntity/OldEntity/DAL/PersonDutyDB.cs | 17 - AIMSEntity/OldEntity/DAL/PharmaCologyDB.cs | 81 - AIMSEntity/OldEntity/DAL/PrintDocDB.cs | 82 - AIMSEntity/OldEntity/DAL/RoleDB.cs | 91 - AIMSEntity/OldEntity/DAL/SysConfigDB.cs | 102 - AIMSEntity/OldEntity/DAL/UserPurviewDB.cs | 94 - .../OldEntity/Model/AnaesthesiaMethod.cs | 92 - AIMSEntity/OldEntity/Model/BasicDictionary.cs | 110 -- AIMSEntity/OldEntity/Model/Department.cs | 119 -- AIMSEntity/OldEntity/Model/Disease.cs | 92 - AIMSEntity/OldEntity/Model/DosageKind.cs | 74 - AIMSEntity/OldEntity/Model/DosageUnit.cs | 82 - AIMSEntity/OldEntity/Model/DrugKind.cs | 74 - .../OldEntity/Model/DrugManufacturer.cs | 77 - AIMSEntity/OldEntity/Model/Drugs.cs | 121 -- AIMSEntity/OldEntity/Model/Events.cs | 92 - AIMSEntity/OldEntity/Model/MedicalDict.cs | 98 - AIMSEntity/OldEntity/Model/MedicalItem.cs | 255 --- AIMSEntity/OldEntity/Model/MedicalItemKind.cs | 74 - AIMSEntity/OldEntity/Model/MedicamentPrice.cs | 101 - AIMSEntity/OldEntity/Model/Menu.cs | 120 -- AIMSEntity/OldEntity/Model/Notice.cs | 17 - AIMSEntity/OldEntity/Model/Operation.cs | 92 - .../OldEntity/Model/OperationBodyPosition.cs | 92 - .../OldEntity/Model/OperationCutType.cs | 64 - AIMSEntity/OldEntity/Model/OperationLevel.cs | 76 - .../OldEntity/Model/OperationPosition.cs | 92 - .../OldEntity/Model/OperationRecoverRoom.cs | 92 - AIMSEntity/OldEntity/Model/OperationRoom.cs | 92 - .../OldEntity/Model/OperationTemplate.cs | 188 -- AIMSEntity/OldEntity/Model/OutputLiquids.cs | 78 - AIMSEntity/OldEntity/Model/PatientKind.cs | 83 - AIMSEntity/OldEntity/Model/Person.cs | 170 -- AIMSEntity/OldEntity/Model/PharmaCology.cs | 74 - AIMSEntity/OldEntity/Model/PrintDoc.cs | 74 - AIMSEntity/OldEntity/Model/Role.cs | 74 - AIMSEntity/OldEntity/Model/SysConfig.cs | 83 - AIMSEntity/OldEntity/Model/UserPurview.cs | 42 - .../{ => DocumentEntity}/AppStartOptions.cs | 0 .../{DAL => DocumentEntity}/DocumentDAL.cs | 0 .../{ => DocumentEntity}/EventCodeCompiler.cs | 0 .../{ => DocumentEntity}/MyCommandNames.cs | 0 .../MyListItemsProvider.cs | 0 .../PrintTemplate.cs | 0 .../PrintTemplateDB.cs | 0 .../UserTempPurview.cs | 0 .../UserTempPurviewDB.cs | 0 DocumentManagement/DocumentManagement.csproj | 18 +- 449 files changed, 10623 insertions(+), 21103 deletions(-) delete mode 100644 AIMS/OperationAfter/OperationReview.cs delete mode 100644 AIMS/OperationAfter/OperationReviewDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FactAnaesthesiaMethod.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FactDiagnoseInfo.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationBodyPosition.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationCutType.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationInfo.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationPosition.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FactPersonDuty.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/FillAnasRecordBillData.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/InRoom.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/OperationRecord.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/BLL/SelectPatient.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/AddPhysioParamDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FactAnaesthesiaMethodDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FactDiagnoseInfoDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationBodyPositionDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationCutTypeDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationInfoDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationPositionDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FactPersonDutyDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/FillAnasRecordBillDataDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/OperationRecordDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/DAL/SelectPatientDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/AddPhysioParam.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/AnasRecordBillRemark.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/DistinctFactDrug.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/FactAnaesthesiaMethod.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/FactDiagnoseInfo.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/FactOperationBodyPosition.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/FactOperationCutType.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/FactOperationInfo.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/FactOperationPosition.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/FactPersonDuty.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/OperationRecord.cs delete mode 100644 AIMS/OperationDoing/AnasRecordBill/Model/PhysioData.cs delete mode 100644 AIMS/OperationDoing/AnasRecoverBill/BLL/SelectPatient.cs delete mode 100644 AIMS/OperationDoing/AnasRecoverBill/DAL/SelectPatientDB.cs delete mode 100644 AIMS/OperationDoing/AnasRecoverBill/Model/TitleTime.cs delete mode 100644 AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.cs rename AIMS/OperationDoing/AnasRecoverBill/{UI => }/frmAnasRecoverBillNew.Designer.cs (64%) create mode 100644 AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.cs rename AIMS/OperationDoing/AnasRecoverBill/{UI => }/frmAnasRecoverBillNew.resx (54%) rename AIMS/OperationDoing/AnasRecoverBill/{UI => }/frmRecoverPatient.Designer.cs (100%) rename AIMS/OperationDoing/AnasRecoverBill/{UI => }/frmRecoverPatient.cs (87%) rename AIMS/OperationDoing/AnasRecoverBill/{UI => }/frmRecoverPatient.resx (100%) delete mode 100644 AIMS/OperationFront/BLL/ApplyAnaesthesiaMethod.cs delete mode 100644 AIMS/OperationFront/BLL/ApplyDiagnoseInfo.cs delete mode 100644 AIMS/OperationFront/BLL/ApplyOperationCutType..cs delete mode 100644 AIMS/OperationFront/BLL/ApplyOperationInfo.cs delete mode 100644 AIMS/OperationFront/BLL/ApplyOperationPosition.cs delete mode 100644 AIMS/OperationFront/BLL/ApplyPersonDuty.cs delete mode 100644 AIMS/OperationFront/BLL/OperationApply.cs delete mode 100644 AIMS/OperationFront/BLL/Oris_Patient.cs rename AIMS/OperationFront/{UI => }/ButtonCustomItem.cs (100%) delete mode 100644 AIMS/OperationFront/DAL/ApplyAnaesthesiaMethodDB.cs delete mode 100644 AIMS/OperationFront/DAL/ApplyDiagnoseInfoDB.cs delete mode 100644 AIMS/OperationFront/DAL/ApplyOperationCutTypeDB.cs delete mode 100644 AIMS/OperationFront/DAL/ApplyOperationInfoDB.cs delete mode 100644 AIMS/OperationFront/DAL/ApplyOperationPositionDB.cs delete mode 100644 AIMS/OperationFront/DAL/ApplyPersonDutyDB.cs delete mode 100644 AIMS/OperationFront/DAL/OperationApplyDB.cs delete mode 100644 AIMS/OperationFront/DAL/Oris_PatientDB.cs rename AIMS/OperationFront/{UI => }/FrmScheduling2.cs (98%) rename AIMS/OperationFront/{UI => }/FrmScheduling2.designer.cs (100%) rename AIMS/OperationFront/{UI => }/FrmScheduling2.resx (100%) rename AIMS/OperationFront/{UI => }/FrmScheduling2Option.cs (100%) rename AIMS/OperationFront/{UI => }/FrmScheduling2Option.designer.cs (100%) rename AIMS/OperationFront/{UI => }/FrmScheduling2Option.resx (100%) rename AIMS/OperationFront/{UI => }/GlossyCustomItem.cs (100%) delete mode 100644 AIMS/OperationFront/Model/ApplyAnaesthesiaMethod.cs delete mode 100644 AIMS/OperationFront/Model/ApplyDiagnoseInfo.cs delete mode 100644 AIMS/OperationFront/Model/ApplyOperationCutType.cs delete mode 100644 AIMS/OperationFront/Model/ApplyOperationInfo.cs delete mode 100644 AIMS/OperationFront/Model/ApplyOperationPosition.cs delete mode 100644 AIMS/OperationFront/Model/ApplyPersonDuty.cs delete mode 100644 AIMS/OperationFront/Model/OperationApply.cs delete mode 100644 AIMS/OperationFront/Model/Oris_Patient.cs rename AIMS/OperationFront/{UI => }/NoteCustomItem.cs (100%) rename AIMS/OperationFront/{UI => }/frmApplyConfigSet.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmApplyConfigSet.cs (100%) rename AIMS/OperationFront/{UI => }/frmApplyConfigSet.resx (100%) rename AIMS/OperationFront/{UI => }/frmExeOperationPlan.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmExeOperationPlan.cs (88%) rename AIMS/OperationFront/{UI => }/frmExeOperationPlan.resx (100%) rename AIMS/OperationFront/{UI => }/frmOperationApply.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmOperationApply.cs (88%) rename AIMS/OperationFront/{UI => }/frmOperationApply.resx (100%) rename AIMS/OperationFront/{UI => }/frmOperationApplyDetail.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmOperationApplyDetail.cs (84%) rename AIMS/OperationFront/{UI => }/frmOperationApplyDetail.resx (100%) rename AIMS/OperationFront/{UI => }/frmOperationFrontVisit.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmOperationFrontVisit.cs (89%) rename AIMS/OperationFront/{UI => }/frmOperationFrontVisit.resx (100%) rename AIMS/OperationFront/{UI => }/frmOperationPlan.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmOperationPlan.cs (91%) rename AIMS/OperationFront/{UI => }/frmOperationPlan.resx (100%) rename AIMS/OperationFront/{UI => }/frmOperationPlanDetail.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmOperationPlanDetail.cs (83%) rename AIMS/OperationFront/{UI => }/frmOperationPlanDetail.resx (100%) rename AIMS/OperationFront/{UI => }/frmOperationSchedulePlan.cs (98%) rename AIMS/OperationFront/{UI => }/frmOperationSchedulePlan.resx (100%) rename AIMS/OperationFront/{UI => }/frmPlanOrder.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmPlanOrder.cs (93%) rename AIMS/OperationFront/{UI => }/frmPlanOrder.resx (100%) rename AIMS/OperationFront/{UI => }/frmPlanPatientInfo.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmPlanPatientInfo.cs (86%) rename AIMS/OperationFront/{UI => }/frmPlanPatientInfo.resx (100%) rename AIMS/OperationFront/{UI => }/frmPrintingArrangemen.cs (93%) rename AIMS/OperationFront/{UI => }/frmPrintingArrangemen.designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmPrintingArrangemen.resx (100%) rename AIMS/OperationFront/{UI => }/frmSchedulePlan.cs (100%) rename AIMS/OperationFront/{UI => }/frmSchedulePlan.designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmSchedulePlan.resx (100%) rename AIMS/OperationFront/{UI => }/frmSchedulePlan2.cs (100%) rename AIMS/OperationFront/{UI => }/frmSchedulePlan2.designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmSchedulePlan2.resx (100%) rename AIMS/OperationFront/{UI => }/frmSelectiveOperationsPrint.cs (93%) rename AIMS/OperationFront/{UI => }/frmSelectiveOperationsPrint.designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmSelectiveOperationsPrint.resx (100%) rename AIMS/OperationFront/{UI => }/frmStopOperation.Designer.cs (100%) rename AIMS/OperationFront/{UI => }/frmStopOperation.cs (90%) rename AIMS/OperationFront/{UI => }/frmStopOperation.resx (100%) rename AIMSEntity/{OldEntity/BLL => BLL/AutoGenerate}/BInstrumentRegistration.cs (100%) rename AIMSEntity/{OldEntity/BLL => BLL/AutoGenerate}/BNoticeContent.cs (100%) rename AIMSEntity/{OldEntity/BLL => BLL/AutoGenerate}/BNoticeTemplate.cs (95%) delete mode 100644 AIMSEntity/BLL/AutoGenerate/BPhysioData.cs delete mode 100644 AIMSEntity/BLL/AutoGenerate/BPhysioDataConfig.cs delete mode 100644 AIMSEntity/BLL/AutoGenerate/BPrintTemplate.cs rename AIMSEntity/{OldEntity/BLL => BLL/AutoGenerate}/BUseDrugsReport.cs (100%) rename AIMSEntity/{OldEntity/BLL => BLL/AutoGenerate}/BUseDrugsReportManager.cs (100%) delete mode 100644 AIMSEntity/BLL/AutoGenerate/BUserTempPurview.cs delete mode 100644 AIMSEntity/BLL/Extension/BPhysioData.cs delete mode 100644 AIMSEntity/BLL/Extension/BPhysioDataConfig.cs delete mode 100644 AIMSEntity/BLL/Extension/BPrintTemplate.cs delete mode 100644 AIMSEntity/BLL/Extension/BUserTempPurview.cs rename AIMSEntity/{OldEntity/DAL => DAL/AutoGenerate}/DInstrumentRegistration.cs (100%) rename AIMSEntity/{OldEntity/DAL => DAL/AutoGenerate}/DNoticeContent.cs (100%) rename AIMSEntity/{OldEntity/DAL => DAL/AutoGenerate}/DNoticeTemplate.cs (100%) delete mode 100644 AIMSEntity/DAL/AutoGenerate/DPhysioData.cs delete mode 100644 AIMSEntity/DAL/AutoGenerate/DPhysioDataConfig.cs delete mode 100644 AIMSEntity/DAL/AutoGenerate/DPrintTemplate.cs rename AIMSEntity/{OldEntity/DAL => DAL/AutoGenerate}/DUseDrugsReport.cs (100%) delete mode 100644 AIMSEntity/DAL/AutoGenerate/DUserTempPurview.cs delete mode 100644 AIMSEntity/DAL/Extension/DPhysioData.cs delete mode 100644 AIMSEntity/DAL/Extension/DPhysioDataConfig.cs delete mode 100644 AIMSEntity/DAL/Extension/DPrintTemplate.cs rename AIMSEntity/{OldEntity/DAL => DAL/Extension}/DUseDrugsReportService.cs (100%) delete mode 100644 AIMSEntity/DAL/Extension/DUserTempPurview.cs create mode 100644 AIMSEntity/Extensions/BOperationReview.cs rename AIMSEntity/{ => Extensions}/Connection.cs (100%) rename {AIMS/OperationDoing/AnasRecordBill/Model => AIMSEntity/Extensions}/DeviceCacheData.cs (98%) rename AIMSEntity/{Model => Extensions}/ParameterList.cs (100%) create mode 100644 AIMSEntity/Extensions/SelectPatient.cs rename {AIMS/OperationDoing/AnasRecordBill/Model => AIMSEntity/Extensions}/TitleTime.cs (97%) rename AIMSEntity/{OldEntity/Model => Model/AutoGenerate}/InstrumentRegistration.cs (100%) rename AIMSEntity/{OldEntity/Model => Model/AutoGenerate}/NoticeContent.cs (100%) rename AIMSEntity/{OldEntity/Model => Model/AutoGenerate}/NoticeTemplate.cs (100%) delete mode 100644 AIMSEntity/Model/AutoGenerate/PhysioData.cs delete mode 100644 AIMSEntity/Model/AutoGenerate/PhysioDataConfig.cs delete mode 100644 AIMSEntity/Model/AutoGenerate/PrintTemplate.cs rename AIMSEntity/{OldEntity/Model => Model/AutoGenerate}/UseDrugsReport.cs (100%) delete mode 100644 AIMSEntity/Model/AutoGenerate/UserTempPurview.cs delete mode 100644 AIMSEntity/Model/Extension/PhysioData.cs delete mode 100644 AIMSEntity/Model/Extension/PhysioDataConfig.cs delete mode 100644 AIMSEntity/Model/Extension/PrintTemplate.cs delete mode 100644 AIMSEntity/Model/Extension/UserTempPurview.cs delete mode 100644 AIMSEntity/ObjectQuery/PhysioDataConfigMap.cs delete mode 100644 AIMSEntity/ObjectQuery/PhysioDataMap.cs delete mode 100644 AIMSEntity/ObjectQuery/PrintTemplateMap.cs delete mode 100644 AIMSEntity/ObjectQuery/UserTempPurviewMap.cs delete mode 100644 AIMSEntity/OldEntity/BLL/AnaesthesiaMethod.cs delete mode 100644 AIMSEntity/OldEntity/BLL/DataDictionary.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Department.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Disease.cs delete mode 100644 AIMSEntity/OldEntity/BLL/DosageKind.cs delete mode 100644 AIMSEntity/OldEntity/BLL/DosageUnit.cs delete mode 100644 AIMSEntity/OldEntity/BLL/DrugKind.cs delete mode 100644 AIMSEntity/OldEntity/BLL/DrugManufacturer.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Drugs.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Events.cs delete mode 100644 AIMSEntity/OldEntity/BLL/MedicalDict.cs delete mode 100644 AIMSEntity/OldEntity/BLL/MedicalItem.cs delete mode 100644 AIMSEntity/OldEntity/BLL/MedicalItemKind.cs delete mode 100644 AIMSEntity/OldEntity/BLL/MedicamentPrice.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Menu.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Notice.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Operation.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OperationBodyPosition.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OperationCutType.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OperationLevel.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OperationPosition.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OperationRecoverRoom.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OperationRoom.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OperationTemplate.cs delete mode 100644 AIMSEntity/OldEntity/BLL/OutputLiquids.cs delete mode 100644 AIMSEntity/OldEntity/BLL/PatientKind.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Person.cs delete mode 100644 AIMSEntity/OldEntity/BLL/PersonDuty.cs delete mode 100644 AIMSEntity/OldEntity/BLL/PharmaCology.cs delete mode 100644 AIMSEntity/OldEntity/BLL/PrintDoc.cs delete mode 100644 AIMSEntity/OldEntity/BLL/Role.cs delete mode 100644 AIMSEntity/OldEntity/BLL/SysConfig.cs delete mode 100644 AIMSEntity/OldEntity/BLL/UserPurview.cs delete mode 100644 AIMSEntity/OldEntity/DAL/AnaesthesiaMethodDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/BasicDictionaryDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/DepartmentDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/DiseaseDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/DosageKindDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/DosageUnitDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/DrugKindDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/DrugManufacturerDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/DrugsDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/EventsDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/MedicalDictDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/MedicalItemDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/MedicalItemKindDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/MedicamentPriceDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/MenuDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/NoticeDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationBodyPositionDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationCutTypeDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationLevelDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationPositionDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationRecoverRoomDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationRoomDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OperationTemplateDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/OutputLiquidsDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/PatientKindDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/PersonDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/PersonDutyDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/PharmaCologyDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/PrintDocDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/RoleDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/SysConfigDB.cs delete mode 100644 AIMSEntity/OldEntity/DAL/UserPurviewDB.cs delete mode 100644 AIMSEntity/OldEntity/Model/AnaesthesiaMethod.cs delete mode 100644 AIMSEntity/OldEntity/Model/BasicDictionary.cs delete mode 100644 AIMSEntity/OldEntity/Model/Department.cs delete mode 100644 AIMSEntity/OldEntity/Model/Disease.cs delete mode 100644 AIMSEntity/OldEntity/Model/DosageKind.cs delete mode 100644 AIMSEntity/OldEntity/Model/DosageUnit.cs delete mode 100644 AIMSEntity/OldEntity/Model/DrugKind.cs delete mode 100644 AIMSEntity/OldEntity/Model/DrugManufacturer.cs delete mode 100644 AIMSEntity/OldEntity/Model/Drugs.cs delete mode 100644 AIMSEntity/OldEntity/Model/Events.cs delete mode 100644 AIMSEntity/OldEntity/Model/MedicalDict.cs delete mode 100644 AIMSEntity/OldEntity/Model/MedicalItem.cs delete mode 100644 AIMSEntity/OldEntity/Model/MedicalItemKind.cs delete mode 100644 AIMSEntity/OldEntity/Model/MedicamentPrice.cs delete mode 100644 AIMSEntity/OldEntity/Model/Menu.cs delete mode 100644 AIMSEntity/OldEntity/Model/Notice.cs delete mode 100644 AIMSEntity/OldEntity/Model/Operation.cs delete mode 100644 AIMSEntity/OldEntity/Model/OperationBodyPosition.cs delete mode 100644 AIMSEntity/OldEntity/Model/OperationCutType.cs delete mode 100644 AIMSEntity/OldEntity/Model/OperationLevel.cs delete mode 100644 AIMSEntity/OldEntity/Model/OperationPosition.cs delete mode 100644 AIMSEntity/OldEntity/Model/OperationRecoverRoom.cs delete mode 100644 AIMSEntity/OldEntity/Model/OperationRoom.cs delete mode 100644 AIMSEntity/OldEntity/Model/OperationTemplate.cs delete mode 100644 AIMSEntity/OldEntity/Model/OutputLiquids.cs delete mode 100644 AIMSEntity/OldEntity/Model/PatientKind.cs delete mode 100644 AIMSEntity/OldEntity/Model/Person.cs delete mode 100644 AIMSEntity/OldEntity/Model/PharmaCology.cs delete mode 100644 AIMSEntity/OldEntity/Model/PrintDoc.cs delete mode 100644 AIMSEntity/OldEntity/Model/Role.cs delete mode 100644 AIMSEntity/OldEntity/Model/SysConfig.cs delete mode 100644 AIMSEntity/OldEntity/Model/UserPurview.cs rename DocumentManagement/{ => DocumentEntity}/AppStartOptions.cs (100%) rename DocumentManagement/{DAL => DocumentEntity}/DocumentDAL.cs (100%) rename DocumentManagement/{ => DocumentEntity}/EventCodeCompiler.cs (100%) rename DocumentManagement/{ => DocumentEntity}/MyCommandNames.cs (100%) rename DocumentManagement/{ => DocumentEntity}/MyListItemsProvider.cs (100%) rename DocumentManagement/{Model => DocumentEntity}/PrintTemplate.cs (100%) rename DocumentManagement/{DAL => DocumentEntity}/PrintTemplateDB.cs (100%) rename DocumentManagement/{Model => DocumentEntity}/UserTempPurview.cs (100%) rename DocumentManagement/{DAL => DocumentEntity}/UserTempPurviewDB.cs (100%) diff --git a/AIMS.sln b/AIMS.sln index 200f0aa..9d4c887 100644 --- a/AIMS.sln +++ b/AIMS.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31424.327 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32819.101 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocumentManagement", "DocumentManagement\DocumentManagement.csproj", "{80E69D05-8436-4342-B0B1-5ADAA8E83D41}" EndProject diff --git a/AIMS/AIMS.csproj b/AIMS/AIMS.csproj index 27e0282..cb8ab37 100644 --- a/AIMS/AIMS.csproj +++ b/AIMS/AIMS.csproj @@ -98,6 +98,10 @@ + + False + D:\OREMR\oremr_new8 - 副本\KHD_OREMRReport\bin\Debug\WLibGPClass.dll + @@ -298,8 +302,6 @@ frmSeleteRoom.cs - - Form @@ -324,16 +326,16 @@ frmSafetyExamine.cs - + Form - + frmAnasRecoverBillNew.cs - + Form - + frmRecoverPatient.cs @@ -421,49 +423,49 @@ PrescriptionDocument.cs - + Component - + Form - + frmSchedulePlan2.cs - + Form - + frmSchedulePlan.cs - + Form - + frmPrintingArrangemen.cs - + Form - + FrmScheduling2.cs - + Form - + FrmScheduling2Option.cs - + Form - + frmSelectiveOperationsPrint.cs - + Component - + Component @@ -582,50 +584,14 @@ frmSelectOperationOne.cs - - Form frmOperationReview.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form @@ -638,94 +604,67 @@ frmSelectPatientNew.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Form - + frmApplyConfigSet.cs - + Form - + frmExeOperationPlan.cs - + Form - + frmOperationApply.cs - + Form - + frmOperationApplyDetail.cs - + Form - + frmOperationFrontVisit.cs - + Form - + frmOperationPlan.cs - + Form - + frmOperationPlanDetail.cs - + Form - + Form - + frmPlanOrder.cs - + Form - + frmPlanPatientInfo.cs - + Form - + frmStopOperation.cs @@ -1142,11 +1081,11 @@ frmSafetyExamine.cs - + frmAnasRecoverBillNew.cs Designer - + frmRecoverPatient.cs @@ -1191,22 +1130,22 @@ PrescriptionDocument.cs - + frmSchedulePlan2.cs - + frmSchedulePlan.cs - + frmPrintingArrangemen.cs - + FrmScheduling2.cs - + FrmScheduling2Option.cs - + frmSelectiveOperationsPrint.cs @@ -1270,37 +1209,37 @@ frmSelectPatientNew.cs - + frmApplyConfigSet.cs - + frmExeOperationPlan.cs - + frmOperationApply.cs - + frmOperationApplyDetail.cs - + frmOperationFrontVisit.cs - + frmOperationPlan.cs - + frmOperationPlanDetail.cs - + frmOperationSchedulePlan.cs - + frmPlanOrder.cs - + frmPlanPatientInfo.cs - + frmStopOperation.cs diff --git a/AIMS/DataDictionary/frmBasicDictionary.cs b/AIMS/DataDictionary/frmBasicDictionary.cs index 5ecc0fa..afbf938 100644 --- a/AIMS/DataDictionary/frmBasicDictionary.cs +++ b/AIMS/DataDictionary/frmBasicDictionary.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,8 +14,8 @@ namespace DataDictionary.UI public partial class frmBasicDictionary : Form { public AIMSExtension.EditState _state; - public List BasicDictionaryObjList; - // private Model.BasicDictionary BasicDictionaryRowData; + public List BasicDictionaryObjList; + // private BasicDictionary BasicDictionaryRowData; public frmBasicDictionary() { InitializeComponent(); @@ -21,8 +23,8 @@ namespace DataDictionary.UI private void frmBasicDictionary_Load(object sender, EventArgs e) { - BasicDictionaryObjList = BLL.DataDictionary.GetModelParentList(); - BasicDictionaryObjList.Insert(0, new Model.BasicDictionary { Id = -1, Name = "无", ParentId = 0 }); + BasicDictionaryObjList = BBasicDictionary.GetModelParentList(); + BasicDictionaryObjList.Insert(0, new BasicDictionary { Id = -1, Name = "无", ParentId = 0 }); this.treeView1.BackColor = System.Drawing.Color.Snow; AIMSExtension.PublicMethod.SetDgvAttribute(dgvBasicDictionary); this.cboParent.DataSource = BasicDictionaryObjList; @@ -39,18 +41,18 @@ namespace DataDictionary.UI private void InitTreeView() { treeView1.Nodes.Clear(); - List BasicDictionaryList = new List(); - Model.BasicDictionary BasicDictionaryObj = new Model.BasicDictionary(); + List BasicDictionaryList = new List(); + BasicDictionary BasicDictionaryObj = new BasicDictionary(); - BasicDictionaryList = BLL.DataDictionary.GetModelList(0); + BasicDictionaryList = BBasicDictionary.GetModelList(0); for (int i = 0; i < BasicDictionaryList.Count; i++) { - BasicDictionaryObj = BLL.DataDictionary.GetModel(BasicDictionaryList[i].Id); + BasicDictionaryObj = BBasicDictionary.GetModel(BasicDictionaryList[i].Id.Value); TreeNode Node = treeView1.Nodes.Add(BasicDictionaryObj.Id.ToString(), BasicDictionaryObj.Name); BuildChildNode(BasicDictionaryObj, Node); } } - private void BuildChildNode(Model.BasicDictionary BasicDictionaryObj, TreeNode ParentNode) + private void BuildChildNode(BasicDictionary BasicDictionaryObj, TreeNode ParentNode) { for (int i = 0; i < BasicDictionaryObj.Children.Count; i++) { @@ -114,7 +116,7 @@ namespace DataDictionary.UI private void tsbSava_Click(object sender, EventArgs e) { - Model.BasicDictionary BasicDictionaryObj = new Model.BasicDictionary(); + BasicDictionary BasicDictionaryObj = new BasicDictionary(); if (ValidInput()) { BasicDictionaryObj.Name = txtName.Text.Trim(); @@ -137,14 +139,14 @@ namespace DataDictionary.UI BasicDictionaryObj.Remark = txtRemark.Text.Trim(); if (_state == AIMSExtension.EditState.ADD) { - BLL.DataDictionary.Add(BasicDictionaryObj); + BBasicDictionary.Add(BasicDictionaryObj); } if (_state == AIMSExtension.EditState.EDIT) { if (dgvBasicDictionary.Rows.Count > 0) { BasicDictionaryObj.Id = int.Parse(dgvBasicDictionary.CurrentRow.Cells["Id"].Value.ToString()); - BLL.DataDictionary.Update(BasicDictionaryObj); + BBasicDictionary.Update(BasicDictionaryObj); } } } @@ -153,7 +155,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.ClearControl(panel4); intOrder.Text = "0"; - dgvBasicDictionary.DataSource = BLL.DataDictionary.GetDataDictionaryDataTable(BasicDictionaryObj.ParentId); + dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(BasicDictionaryObj.ParentId.Value.ToString()); InitTreeView(); } @@ -191,7 +193,7 @@ namespace DataDictionary.UI if (this.treeView1.SelectedNode.Level == 1) { - dgvBasicDictionary.DataSource = BLL.DataDictionary.GetDataDictionaryDataTable(int.Parse(treeView1.SelectedNode.Parent.Name)); + dgvBasicDictionary.DataSource = BBasicDictionary.GetDataDictionaryDataTable(int.Parse(treeView1.SelectedNode.Parent.Name)); } } } diff --git a/AIMS/DataDictionary/frmDisease.cs b/AIMS/DataDictionary/frmDisease.cs index 2dcfe13..105c903 100644 --- a/AIMS/DataDictionary/frmDisease.cs +++ b/AIMS/DataDictionary/frmDisease.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; +using AIMSModel; using HelperDB; namespace DataDictionary.UI @@ -25,7 +27,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; - dgvDisease.DataSource = DataDictionary.BLL.Disease.GetDataTable(); + dgvDisease.DataSource = BDisease.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) @@ -84,7 +86,7 @@ namespace DataDictionary.UI { if (this.ValidInput()) { - Model.Disease DiseaseObj = new Model.Disease(); + Disease DiseaseObj = new Disease(); DiseaseObj.Name = txtName.Text.Trim(); DiseaseObj.IcdCode = txtICDcode.Text.Trim(); DiseaseObj.HelpCode = txtHelpCode.Text; @@ -94,23 +96,23 @@ namespace DataDictionary.UI DiseaseObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - if (BLL.Disease.IsExit(txtName.Text.Trim())) + if (BDisease.IsExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; } - BLL.Disease.Add(DiseaseObj); + BDisease.Add(DiseaseObj); } if (_state == AIMSExtension.EditState.EDIT) { DiseaseObj.Id = SelectDiseaseRowId; - BLL.Disease.Update(DiseaseObj); + BDisease.Update(DiseaseObj); } } _state = AIMSExtension.EditState.BROWSE; AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); - dgvDisease.DataSource = DataDictionary.BLL.Disease.GetDataTable(); + dgvDisease.DataSource = BDisease.GetDataTable(); } private void tsbExit_Click(object sender, EventArgs e) diff --git a/AIMS/DataDictionary/frmDrugs.cs b/AIMS/DataDictionary/frmDrugs.cs index 1b8e554..5198d54 100644 --- a/AIMS/DataDictionary/frmDrugs.cs +++ b/AIMS/DataDictionary/frmDrugs.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -21,7 +23,7 @@ namespace DataDictionary.UI { AIMSExtension.PublicMethod.SetDgvAttribute(dgv); AIMSExtension.PublicMethod.EnabledControl(panel4, false); - cboDosageUnit.DataSource = BLL.Drugs.GetDosageUnitDataTable(1); + cboDosageUnit.DataSource = BDrugs.GetDosageUnitDataTable(1); cboDosageUnit.DisplayMember = "Name"; cboDosageUnit.ValueMember = "Id"; cboDosageUnit.SelectedIndex = -1; @@ -77,7 +79,7 @@ namespace DataDictionary.UI return; } - Model.Drugs DrugsObj = new Model.Drugs(); + Drugs DrugsObj = new Drugs(); DrugsObj.Name = txtName.Text.Trim(); DrugsObj.HelpCode = txtHelpCode.Text.Trim(); DrugsObj.DrugKind = cboDrugKind.Text; @@ -98,12 +100,12 @@ namespace DataDictionary.UI } if (_state == AIMSExtension.EditState.ADD) { - BLL.Drugs.Add(DrugsObj); + BDrugs.Add(DrugsObj); } if (_state == AIMSExtension.EditState.EDIT) { DrugsObj.Id = SelectDrugsRowId; - BLL.Drugs.Update(DrugsObj); + BDrugs.Update(DrugsObj); } _state = AIMSExtension.EditState.BROWSE; @@ -124,7 +126,7 @@ namespace DataDictionary.UI private void GetDrugsDataTable(string DrugKind) { dgv.Rows.Clear(); - DataTable dt = BLL.Drugs.GetDataTable(DrugKind); + DataTable dt = BDrugs.GetDataTable(DrugKind); for (int i = 0; i < dt.Rows.Count; i++) { dgv.Rows.Add(dt.Rows[i]["Id"].ToString(), diff --git a/AIMS/DataDictionary/frmEvents.cs b/AIMS/DataDictionary/frmEvents.cs index 4afde56..89fc4ee 100644 --- a/AIMS/DataDictionary/frmEvents.cs +++ b/AIMS/DataDictionary/frmEvents.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; +using AIMSModel; using HelperDB; namespace DataDictionary.UI @@ -26,7 +28,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; - dgvEventsKind.DataSource = DataDictionary.BLL.Events.GetDataTable(); + dgvEventsKind.DataSource = BEvents.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { @@ -91,7 +93,7 @@ namespace DataDictionary.UI if (this.ValidInput()) { - Model.Events EventsObj = new Model.Events(); + Events EventsObj = new Events(); EventsObj.Name = txtName.Text.Trim(); EventsObj.EventKind = cboEventKind.Text; EventsObj.HelpCode = txtHelpCode.Text; @@ -102,23 +104,23 @@ namespace DataDictionary.UI EventsObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - if (BLL.Events.IsExit(txtName.Text.Trim())) + if (BEvents.IsExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; } - BLL.Events.Add(EventsObj); + BEvents.Add(EventsObj); } if (_state == AIMSExtension.EditState.EDIT) { EventsObj.Id = SelectEventsKindRowId; - BLL.Events.Update(EventsObj); + BEvents.Update(EventsObj); } } _state = AIMSExtension.EditState.BROWSE; AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); - dgvEventsKind.DataSource = DataDictionary.BLL.Events.GetDataTable(); + dgvEventsKind.DataSource = BEvents.GetDataTable(); } private void txtName_TextChanged(object sender, EventArgs e) { diff --git a/AIMS/DataDictionary/frmMedicalItemKind.cs b/AIMS/DataDictionary/frmMedicalItemKind.cs index deeeff7..793ef46 100644 --- a/AIMS/DataDictionary/frmMedicalItemKind.cs +++ b/AIMS/DataDictionary/frmMedicalItemKind.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -67,7 +69,7 @@ namespace DataDictionary.UI { if (this.ValidInput()) { - Model.MedicalItemKind MedicalItemKindObj = new Model.MedicalItemKind(); + MedicalItemKind MedicalItemKindObj = new MedicalItemKind(); MedicalItemKindObj.Name = txtName.Text.Trim(); if(cboIsMed.Text =="药品") { @@ -86,12 +88,12 @@ namespace DataDictionary.UI if (_state == AIMSExtension.EditState.ADD) { - BLL.MedicalItemKind.Add(MedicalItemKindObj); + BMedicalItemKind.Add(MedicalItemKindObj); } if (_state == AIMSExtension.EditState.EDIT) { MedicalItemKindObj.Id = SelectMedicalItemKindRowId; - BLL.MedicalItemKind.Update(MedicalItemKindObj); + BMedicalItemKind.Update(MedicalItemKindObj); } } _state = AIMSExtension.EditState.BROWSE; @@ -102,7 +104,7 @@ namespace DataDictionary.UI private void GetMedicalItemKindDataTable() { dgvMedicalItemKind.Rows.Clear(); - DataTable dt = BLL.MedicalItemKind.GetDataTable(); + DataTable dt = BMedicalItemKind.GetDataTable(); for (int i = 0; i < dt.Rows.Count; i++) { dgvMedicalItemKind.Rows.Add(dt.Rows[i]["Id"].ToString(), diff --git a/AIMS/DataDictionary/frmOperation.cs b/AIMS/DataDictionary/frmOperation.cs index 1c76fee..d981d83 100644 --- a/AIMS/DataDictionary/frmOperation.cs +++ b/AIMS/DataDictionary/frmOperation.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; +using AIMSModel; using HelperDB; namespace DataDictionary.UI @@ -24,7 +26,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; - dgvOperation.DataSource = DataDictionary.BLL.Operation.GetDataTable(); + dgvOperation.DataSource = BOperation.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { @@ -75,7 +77,7 @@ namespace DataDictionary.UI { if (this.ValidInput()) { - Model.Operation OperationObj = new Model.Operation(); + Operation OperationObj = new Operation(); OperationObj.Name = txtName.Text.Trim(); OperationObj.IcdCode = txtICDcode.Text.Trim(); OperationObj.HelpCode = txtHelpCode.Text; @@ -85,23 +87,23 @@ namespace DataDictionary.UI OperationObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - if (BLL.Operation.IsExit(txtName.Text.Trim())) + if (BOperation.IsExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; } - BLL.Operation.Add(OperationObj); + BOperation.Add(OperationObj); } if (_state == AIMSExtension.EditState.EDIT) { OperationObj.Id = SelectOperationRowId; - BLL.Operation.Update(OperationObj); + BOperation.Update(OperationObj); } } _state = AIMSExtension.EditState.BROWSE; AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); - dgvOperation.DataSource = DataDictionary.BLL.Operation.GetDataTable(); + dgvOperation.DataSource = BOperation.GetDataTable(); } private void tsbCancel_Click(object sender, EventArgs e) diff --git a/AIMS/DataDictionary/frmOutputLiquids.cs b/AIMS/DataDictionary/frmOutputLiquids.cs index 6247422..ff08fd4 100644 --- a/AIMS/DataDictionary/frmOutputLiquids.cs +++ b/AIMS/DataDictionary/frmOutputLiquids.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; +using AIMSModel; using HelperDB; namespace DataDictionary.UI @@ -24,7 +26,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; - dgvOutputLiquids.DataSource = DataDictionary.BLL.OutputLiquids.GetDataTable(); + dgvOutputLiquids.DataSource = BOutputLiquids.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) @@ -33,7 +35,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, true); AIMSExtension.PublicMethod.ClearControl(panel1); chkIsValid.Checked = true; - if (BLL.OutputLiquids.IsExit(txtName.Text.Trim())) + if (BOutputLiquids.IsExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; @@ -72,7 +74,7 @@ namespace DataDictionary.UI { if (this.ValidInput()) { - Model.OutputLiquids OutputLiquidsObj = new Model.OutputLiquids(); + OutputLiquids OutputLiquidsObj = new OutputLiquids(); OutputLiquidsObj.Name = txtName.Text.Trim(); OutputLiquidsObj.HelpCode = txtHelpCode.Text; OutputLiquidsObj.IsValid = int.Parse(chkIsValid.Checked ? "1" : "0"); @@ -81,23 +83,23 @@ namespace DataDictionary.UI OutputLiquidsObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - if (BLL.OutputLiquids.IsExit(txtName.Text.Trim())) + if (BOutputLiquids.IsExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; } - BLL.OutputLiquids.Add(OutputLiquidsObj); + BOutputLiquids.Add(OutputLiquidsObj); } if (_state == AIMSExtension.EditState.EDIT) { OutputLiquidsObj.Id = SelectOutputLiquidsRowId; - BLL.OutputLiquids.Update(OutputLiquidsObj); + BOutputLiquids.Update(OutputLiquidsObj); } } _state = AIMSExtension.EditState.BROWSE; AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); - dgvOutputLiquids.DataSource = DataDictionary.BLL.OutputLiquids.GetDataTable(); + dgvOutputLiquids.DataSource = BOutputLiquids.GetDataTable(); } private bool ValidInput() { diff --git a/AIMS/DataDictionary/frmPatientKind.cs b/AIMS/DataDictionary/frmPatientKind.cs index a415ac1..f3131d8 100644 --- a/AIMS/DataDictionary/frmPatientKind.cs +++ b/AIMS/DataDictionary/frmPatientKind.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; +using AIMSModel; using HelperDB; namespace DataDictionary.UI @@ -25,12 +27,12 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; - dgvPatientKind.DataSource = DataDictionary.BLL.PatientKind.GetDataTable(); + dgvPatientKind.DataSource = BPatientKind.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { _state = AIMSExtension.EditState.ADD; - Model.PatientKind PatientKindObj = new Model.PatientKind(); + PatientKind PatientKindObj = new PatientKind(); AIMSExtension.PublicMethod.EnabledControl(panel1, true); AIMSExtension.PublicMethod.ClearControl(panel1); chkIsValid.Checked = true; @@ -67,7 +69,7 @@ namespace DataDictionary.UI { if (this.ValidInput()) { - Model.PatientKind PatientKindObj = new Model.PatientKind(); + PatientKind PatientKindObj = new PatientKind(); PatientKindObj.No = txtNo.Text.Trim(); PatientKindObj.Name = txtName.Text.Trim(); PatientKindObj.HelpCode = txtHelpCode.Text; @@ -77,24 +79,24 @@ namespace DataDictionary.UI PatientKindObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - if (BLL.PatientKind.IsExit(txtNo.Text.Trim())) + if (BPatientKind.IsExit(txtNo.Text.Trim())) { MessageBox.Show("该事件已存在"); return; } - if (BLL.PatientKind.NameExit(txtName.Text.Trim())) + if (BPatientKind.NameExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; } - BLL.PatientKind.Add(PatientKindObj); + BPatientKind.Add(PatientKindObj); } if (_state == AIMSExtension.EditState.EDIT) { PatientKindObj.Id = SelectPatientKindRowId; - BLL.PatientKind.Update(PatientKindObj); + BPatientKind.Update(PatientKindObj); } } } diff --git a/AIMS/DataDictionary/frmSysConfig.cs b/AIMS/DataDictionary/frmSysConfig.cs index c801349..331025c 100644 --- a/AIMS/DataDictionary/frmSysConfig.cs +++ b/AIMS/DataDictionary/frmSysConfig.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; +using AIMSModel; using HelperDB; namespace DataDictionary.UI @@ -24,7 +26,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); _state = AIMSExtension.EditState.BROWSE; - dgvSysConfig.DataSource = DataDictionary.BLL.SysConfig.GetDataTable(); + dgvSysConfig.DataSource = BSysConfig.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) { @@ -32,7 +34,7 @@ namespace DataDictionary.UI AIMSExtension.PublicMethod.EnabledControl(panel1, true); AIMSExtension.PublicMethod.ClearControl(panel1); chkIsValid.Checked = true; - if (BLL.SysConfig.IsExit(txtName.Text.Trim())) + if (BSysConfig.IsExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; @@ -86,7 +88,7 @@ namespace DataDictionary.UI { if (this.ValidInput()) { - Model.SysConfig SysConfigObj = new Model.SysConfig(); + SysConfig SysConfigObj = new SysConfig(); SysConfigObj.Name = txtName.Text.Trim(); SysConfigObj.Value = txtValue.Text.Trim(); SysConfigObj.Note = txtNote.Text; @@ -96,23 +98,23 @@ namespace DataDictionary.UI SysConfigObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - if (BLL.SysConfig.IsExit(txtName.Text.Trim())) + if (BSysConfig.IsExit(txtName.Text.Trim())) { MessageBox.Show("该事件已存在"); return; } - BLL.SysConfig.Add(SysConfigObj); + BSysConfig.Add(SysConfigObj); } if (_state == AIMSExtension.EditState.EDIT) { SysConfigObj.Id = SelectSysConfigRowId; - BLL.SysConfig.Update(SysConfigObj); + BSysConfig.Update(SysConfigObj); } } _state = AIMSExtension.EditState.BROWSE; AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); - dgvSysConfig.DataSource = DataDictionary.BLL.SysConfig.GetDataTable(); + dgvSysConfig.DataSource = BSysConfig.GetDataTable(); } private void tsbExit_Click(object sender, EventArgs e) diff --git a/AIMS/DocManager/frmDocument3.cs b/AIMS/DocManager/frmDocument3.cs index 0d78c97..1dba00a 100644 --- a/AIMS/DocManager/frmDocument3.cs +++ b/AIMS/DocManager/frmDocument3.cs @@ -91,7 +91,7 @@ namespace AIMS.OperationAfter.UI { DateTime beginTime = Convert.ToDateTime(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00")); DateTime endTime = Convert.ToDateTime(dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); - DataTable vPlanedOpeList = AIMS.OperationFront.BLL.OperationApply.GetOperationFrontDataTable(beginTime.ToString("yyyy-MM-dd 00:00:00"), endTime.ToString("yyyy-MM-dd 23:59:59")); + DataTable vPlanedOpeList = BOperationApply.GetOperationFrontDataTable(beginTime.ToString("yyyy-MM-dd 00:00:00"), endTime.ToString("yyyy-MM-dd 23:59:59")); if (vPlanedOpeList.Rows.Count <= 0) return; string roomname = ""; diff --git a/AIMS/DrugManagement/frmDosageKind.cs b/AIMS/DrugManagement/frmDosageKind.cs index ab63f18..baec61b 100644 --- a/AIMS/DrugManagement/frmDosageKind.cs +++ b/AIMS/DrugManagement/frmDosageKind.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -28,7 +30,7 @@ namespace DrugManagement.UI private void GetDosageKindDataTable() { dgvDosageKind.Rows.Clear(); - DataTable dt = BLL.DosageKind.GetDataTable(); + DataTable dt = BDosageKind.GetDataTable(); for (int i = 0; i < dt.Rows.Count; i++) { dgvDosageKind.Rows.Add(dt.Rows[i]["Id"].ToString(), @@ -88,7 +90,7 @@ namespace DrugManagement.UI MessageBox.Show("名称不能为空!"); return; } - Model.DosageKind DosageKindObj = new Model.DosageKind(); + DosageKind DosageKindObj = new DosageKind(); DosageKindObj.Name = txtName.Text.Trim(); DosageKindObj.HelpCode = txtHelpCode.Text.Trim(); DosageKindObj.IsValid = int.Parse(chkIsValid.Checked ? "1" : "0"); @@ -97,13 +99,13 @@ namespace DrugManagement.UI DosageKindObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - BLL.DosageKind.Add(DosageKindObj); + BDosageKind.Add(DosageKindObj); } if (_state == AIMSExtension.EditState.EDIT) { DosageKindObj.Id = SelectDosageKindId; - BLL.DosageKind.Update(DosageKindObj); + BDosageKind.Update(DosageKindObj); } AIMSExtension.PublicMethod.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; diff --git a/AIMS/DrugManagement/frmDosageUnit.cs b/AIMS/DrugManagement/frmDosageUnit.cs index 3b33e90..f1a0a83 100644 --- a/AIMS/DrugManagement/frmDosageUnit.cs +++ b/AIMS/DrugManagement/frmDosageUnit.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -28,7 +30,7 @@ namespace DrugManagement.UI private void GetDosageUnitDataTable() { dgvDosageUnit.Rows.Clear(); - DataTable dt = BLL.DosageUnit.GetDataTable(); + DataTable dt = BDosageUnit.GetDataTable(); for (int i = 0; i < dt.Rows.Count; i++) { dgvDosageUnit.Rows.Add(dt.Rows[i]["Id"].ToString(), @@ -95,7 +97,7 @@ namespace DrugManagement.UI MessageBox.Show("单位类型不能为空!"); return; } - Model.DosageUnit DosageUnitObj = new Model.DosageUnit(); + DosageUnit DosageUnitObj = new DosageUnit(); DosageUnitObj.Name = txtName.Text.Trim(); if (cboUnitType.Text == "剂量单位") @@ -113,13 +115,13 @@ namespace DrugManagement.UI DosageUnitObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - BLL.DosageUnit.Add(DosageUnitObj); + BDosageUnit.Add(DosageUnitObj); } if (_state == AIMSExtension.EditState.EDIT) { DosageUnitObj.Id = SelectDosageUnitId; - BLL.DosageUnit.Update(DosageUnitObj); + BDosageUnit.Update(DosageUnitObj); } AIMSExtension.PublicMethod.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; diff --git a/AIMS/DrugManagement/frmDrugKind.cs b/AIMS/DrugManagement/frmDrugKind.cs index bc2fc37..fd6f207 100644 --- a/AIMS/DrugManagement/frmDrugKind.cs +++ b/AIMS/DrugManagement/frmDrugKind.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,7 +14,7 @@ namespace DrugManagement.UI public partial class frmDrugKind : Form { public AIMSExtension.EditState _state; - private List DrugKindObjList = new List(); + private List DrugKindObjList = new List(); private int SelectRowId = 0; public frmDrugKind() { @@ -24,7 +26,7 @@ namespace DrugManagement.UI AIMSExtension.PublicMethod.EnabledControl(panel2, false); AIMSExtension.PublicMethod.SetDgvAttribute(dgvDrugKind); this.cboMedicalItemKind.DataSource = - AIMSExtension.PublicMethod.GetNewDataTable(DataDictionary.BLL.MedicalItemKind.GetDataTable(), "IsMed='药品'", ""); + AIMSExtension.PublicMethod.GetNewDataTable(BMedicalItemKind.GetDataTable(), "IsMed='药品'", ""); this.cboMedicalItemKind.DisplayMember = "Name"; this.cboMedicalItemKind.ValueMember = "Id"; GetDrugKindDataTable(); @@ -33,7 +35,7 @@ namespace DrugManagement.UI private void GetDrugKindDataTable() { dgvDrugKind.Rows.Clear(); - DataTable dt = BLL.DrugKind.GetDataTable(); + DataTable dt = BDrugKind.GetDataTable(); for (int i = 0; i < dt.Rows.Count; i++) { dgvDrugKind.Rows.Add(dt.Rows[i]["Id"].ToString(), @@ -91,7 +93,7 @@ namespace DrugManagement.UI { if (ValidInput()) { - Model.DrugKind DrugKindObj = new Model.DrugKind(); + DrugKind DrugKindObj = new DrugKind(); DrugKindObj.Name = txtName.Text.Trim(); DrugKindObj.MedicalItemKindId = int.Parse(cboMedicalItemKind.SelectedValue.ToString()); DrugKindObj.IsValid = int.Parse(chkIsValid.Checked ? "1" : "0"); @@ -101,12 +103,12 @@ namespace DrugManagement.UI if (_state == AIMSExtension.EditState.ADD) { - BLL.DrugKind.Add(DrugKindObj); + BDrugKind.Add(DrugKindObj); } if (_state == AIMSExtension.EditState.EDIT) { DrugKindObj.Id = SelectRowId; - BLL.DrugKind.Update(DrugKindObj); + BDrugKind.Update(DrugKindObj); } GetDrugKindDataTable(); AIMSExtension.PublicMethod.EnabledControl(panel2, false); diff --git a/AIMS/DrugManagement/frmDrugManufacturer.cs b/AIMS/DrugManagement/frmDrugManufacturer.cs index 05888f6..93794d8 100644 --- a/AIMS/DrugManagement/frmDrugManufacturer.cs +++ b/AIMS/DrugManagement/frmDrugManufacturer.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -68,7 +70,7 @@ namespace DrugManagement.UI AIMSExtension.PublicMethod.ValidDataGridViewExistsItemName(dgvDrugManufacturer, "NameColumn", txtName.Text); - Model.DrugManufacturer DrugManufacturerObj = new Model.DrugManufacturer(); + DrugManufacturer DrugManufacturerObj = new DrugManufacturer(); DrugManufacturerObj.Name = txtName.Text.Trim(); DrugManufacturerObj.HelpCode = txtHelpCode.Text.Trim(); @@ -82,7 +84,7 @@ namespace DrugManagement.UI if (!AIMSExtension.PublicMethod.ValidDataGridViewExistsItemName(dgvDrugManufacturer, "NameColumn", txtName.Text)) { - BLL.DrugManufacturer.Add(DrugManufacturerObj); + BDrugManufacturer.Add(DrugManufacturerObj); } else { @@ -92,7 +94,7 @@ namespace DrugManagement.UI if (_state == AIMSExtension.EditState.EDIT) { DrugManufacturerObj.Id = SelectDrugManufacturerId; - BLL.DrugManufacturer.Update(DrugManufacturerObj); + BDrugManufacturer.Update(DrugManufacturerObj); } AIMSExtension.PublicMethod.EnabledControl(panel2, false); @@ -113,7 +115,7 @@ namespace DrugManagement.UI { dgvDrugManufacturer.Rows.Clear(); - DataTable dt = BLL.DrugManufacturer.GetDataTable(); + DataTable dt = BDrugManufacturer.GetDataTable(); for (int i = 0; i < dt.Rows.Count; i++) { dgvDrugManufacturer.Rows.Add(dt.Rows[i]["Id"].ToString(), diff --git a/AIMS/DrugManagement/frmDrugManufacturerList.cs b/AIMS/DrugManagement/frmDrugManufacturerList.cs index dfc852c..8fda4e2 100644 --- a/AIMS/DrugManagement/frmDrugManufacturerList.cs +++ b/AIMS/DrugManagement/frmDrugManufacturerList.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -26,7 +27,7 @@ namespace DrugManagement.UI int y = (System.Windows.Forms.SystemInformation.WorkingArea.Height - this.Size.Height) / 2; this.StartPosition = FormStartPosition.Manual; this.Location = (Point)new Size(x, y); - dgvDrugManufacturer.DataSource = BLL.DrugManufacturer.GetDataTable(HelpCode); + dgvDrugManufacturer.DataSource = BDrugManufacturer.GetDataTable(HelpCode); } private void dgvDrugManufacturer_KeyDown(object sender, KeyEventArgs e) diff --git a/AIMS/DrugManagement/frmMedicalDict.cs b/AIMS/DrugManagement/frmMedicalDict.cs index 923b3ed..0455cd3 100644 --- a/AIMS/DrugManagement/frmMedicalDict.cs +++ b/AIMS/DrugManagement/frmMedicalDict.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -31,13 +33,13 @@ namespace DrugManagement.UI _state = AIMSExtension.EditState.BROWSE; AIMSExtension.PublicMethod.EnabledControl(panel6, false); - DataTable dt = AIMSExtension.PublicMethod.GetNewDataTable(DataDictionary.BLL.MedicalItemKind.GetDataTable(), "IsMed='药品'", ""); + DataTable dt = AIMSExtension.PublicMethod.GetNewDataTable(BMedicalItemKind.GetDataTable(), "IsMed='药品'", ""); for (int i = 0; i < dt.Rows.Count; i++) { TreeNode Node = treeView1.Nodes.Add(dt.Rows[i]["Id"].ToString(), dt.Rows[i]["Name"].ToString()); - DataTable dt1 = BLL.DrugKind.GetDataTable(dt.Rows[i]["Id"].ToString()); + DataTable dt1 = BDrugKind.GetDataTable(dt.Rows[i]["Id"].ToString()); for (int j = 0; j < dt1.Rows.Count; j++) { @@ -45,13 +47,13 @@ namespace DrugManagement.UI } } - cboDrugKind.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BLL.DrugKind.GetDataTable(), "IsValid='有效'", ""); + cboDrugKind.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BDrugKind.GetDataTable(), "IsValid='有效'", ""); cboDrugKind.DisplayMember = "Name"; cboDrugKind.ValueMember = "Id"; cboDrugKind.SelectedIndex = -1; - cboDosageKind.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BLL.DosageKind.GetDataTable(), "IsValid='有效'", ""); + cboDosageKind.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BDosageKind.GetDataTable(), "IsValid='有效'", ""); cboDosageKind.DisplayMember = "Name"; cboDosageKind.ValueMember = "Id"; @@ -68,7 +70,7 @@ namespace DrugManagement.UI TreeNode sNode = treeView1.SelectedNode; if (sNode.Parent != null) { - Model.DrugKind DrugKindObj = new Model.DrugKind(); + DrugKind DrugKindObj = new DrugKind(); cboDrugKind.SelectedValue = sNode.Name; } } @@ -114,7 +116,7 @@ namespace DrugManagement.UI { if(ValidInput()) { - Model.MedicalDict MedicalDictObj = new Model.MedicalDict(); + MedicalDict MedicalDictObj = new MedicalDict(); MedicalDictObj.No = txtNo.Text.Trim(); MedicalDictObj.Name = txtName.Text.Trim(); MedicalDictObj.HelpCode = txtHelpCode.Text; @@ -127,13 +129,13 @@ namespace DrugManagement.UI if (_state == AIMSExtension.EditState.ADD) { - BLL.MedicalDict.Add(MedicalDictObj); + BMedicalDict.Add(MedicalDictObj); } if (_state == AIMSExtension.EditState.EDIT) { MedicalDictObj.Id = SelectMedicalDictRowId; - BLL.MedicalDict.Update(MedicalDictObj); + BMedicalDict.Update(MedicalDictObj); } } _state = AIMSExtension.EditState.BROWSE; @@ -144,9 +146,9 @@ namespace DrugManagement.UI if (sNode.Parent != null) { - Model.DrugKind DrugKindObj = new Model.DrugKind(); + DrugKind DrugKindObj = new DrugKind(); cboDrugKind.SelectedValue = sNode.Name; - dgvMedicalDict.DataSource = BLL.MedicalDict.GetDataTable(int.Parse(cboDrugKind.SelectedValue.ToString())); + dgvMedicalDict.DataSource = BMedicalDict.GetDataTable(int.Parse(cboDrugKind.SelectedValue.ToString())); } } @@ -170,7 +172,7 @@ namespace DrugManagement.UI { MessageBox.Show("剂型不能为空!"); } - else if (_state == AIMSExtension.EditState.ADD && BLL.MedicalDict.Exists(txtNo.Text)) + else if (_state == AIMSExtension.EditState.ADD && BMedicalDict.Exists(txtNo.Text)) { MessageBox.Show("编码不能重复!"); } @@ -198,16 +200,16 @@ namespace DrugManagement.UI if (sNode.Parent != null) { - Model.DrugKind DrugKindObj = new Model.DrugKind(); + DrugKind DrugKindObj = new DrugKind(); cboDrugKind.SelectedValue = sNode.Name; - dgvMedicalDict.DataSource = BLL.MedicalDict.GetDataTable(int.Parse(cboDrugKind.SelectedValue.ToString())); + dgvMedicalDict.DataSource = BMedicalDict.GetDataTable(int.Parse(cboDrugKind.SelectedValue.ToString())); } } private void btnFind_Click(object sender, EventArgs e) { - dgvMedicalDict.DataSource = BLL.MedicalDict.GetDataTableByName(txtInput.Text.Trim()); + dgvMedicalDict.DataSource = BMedicalDict.GetDataTableByName(txtInput.Text.Trim()); } } } diff --git a/AIMS/DrugManagement/frmMedicalDictList.cs b/AIMS/DrugManagement/frmMedicalDictList.cs index 1b69613..2dfb108 100644 --- a/AIMS/DrugManagement/frmMedicalDictList.cs +++ b/AIMS/DrugManagement/frmMedicalDictList.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -21,7 +22,7 @@ namespace DrugManagement.UI private void frmMedicalDictList_Load(object sender, EventArgs e) { AIMSExtension.PublicMethod.SetDgvAttribute(dgvMedicalDictList); - dgvMedicalDictList.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BLL.MedicalDict.GetDataTableByName(HelpCode), "IsValid='有效'", ""); + dgvMedicalDictList.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BMedicalDict.GetDataTableByName(HelpCode), "IsValid='有效'", ""); } private void dgvMedicalDictList_KeyDown(object sender, KeyEventArgs e) diff --git a/AIMS/DrugManagement/frmMedicalItem.cs b/AIMS/DrugManagement/frmMedicalItem.cs index 3f10f3e..8868efa 100644 --- a/AIMS/DrugManagement/frmMedicalItem.cs +++ b/AIMS/DrugManagement/frmMedicalItem.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -29,11 +31,11 @@ namespace DrugManagement.UI AIMSExtension.PublicMethod.SetDgvAttribute(dgvMedicalItem); AIMSExtension.PublicMethod.SetDgvAttribute(dgvMedicamentPrice); _state = AIMSExtension.EditState.BROWSE; - DataTable dt = AIMSExtension.PublicMethod.GetNewDataTable(DataDictionary.BLL.MedicalItemKind.GetDataTable(), "IsMed='药品'", ""); + DataTable dt = AIMSExtension.PublicMethod.GetNewDataTable(BMedicalItemKind.GetDataTable(), "IsMed='药品'", ""); for (int i = 0; i < dt.Rows.Count; i++) { TreeNode Node = treeView1.Nodes.Add(dt.Rows[i]["Id"].ToString(), dt.Rows[i]["Name"].ToString()); - DataTable dt1 = BLL.DrugKind.GetDataTable(dt.Rows[i]["Id"].ToString()); + DataTable dt1 = BDrugKind.GetDataTable(dt.Rows[i]["Id"].ToString()); for (int j = 0; j < dt1.Rows.Count; j++) { Node.Nodes.Add(dt1.Rows[j]["Id"].ToString(), dt1.Rows[j]["Name"].ToString()); @@ -49,7 +51,7 @@ namespace DrugManagement.UI if (sNode != null) { - Model.DrugKind DrugKindObj = new Model.DrugKind(); + DrugKind DrugKindObj = new DrugKind(); frmMedicalItemDetail.DrugKindId =int.Parse(sNode.Name); } @@ -78,7 +80,7 @@ namespace DrugManagement.UI { IsValid = 1; } - dgvMedicalItem.DataSource = BLL.MedicalItem.GetMedicalItemDrugDataTable(txtInput.Text.Trim(), IsValid); + dgvMedicalItem.DataSource = BMedicalItem.GetMedicalItemDrugDataTable(txtInput.Text.Trim(), IsValid); if (dgvMedicalItem.Rows.Count > 0) { dgvMedicalItem.ClearSelection(); @@ -94,8 +96,8 @@ namespace DrugManagement.UI if (sNode != null) { - Model.DrugKind DrugKindObj = new Model.DrugKind(); - dgvMedicalItem.DataSource = BLL.MedicalItem.GetMedicalItemByDrugKindId(int.Parse(sNode.Name)); + DrugKind DrugKindObj = new DrugKind(); + dgvMedicalItem.DataSource = BMedicalItem.GetMedicalItemByDrugKindId(int.Parse(sNode.Name)); } } @@ -111,7 +113,7 @@ namespace DrugManagement.UI { frmMedicamentPrice.MedicamentPriceId = int.Parse(dgvMedicamentPrice.CurrentRow.Cells["IdColumn1"].Value.ToString()); } - frmMedicamentPrice.SelectRowMedicalItemObj = BLL.MedicalItem.GetModel(int.Parse(dgvMedicalItem.CurrentRow.Cells["Id"].Value.ToString())); + frmMedicamentPrice.SelectRowMedicalItemObj = BMedicalItem.GetModel(int.Parse(dgvMedicalItem.CurrentRow.Cells["Id"].Value.ToString())); frmMedicamentPrice.ShowDialog(); } } @@ -174,7 +176,7 @@ namespace DrugManagement.UI if (dgvMedicalItem.Rows.Count > 0) { int MedicalItemId = int.Parse(dgvMedicalItem.CurrentRow.Cells["Id"].Value.ToString()); - dgvMedicamentPrice.DataSource = BLL.MedicamentPrice.GetDataTable(MedicalItemId); + dgvMedicamentPrice.DataSource = BMedicamentPrice.GetDataTable(MedicalItemId); } } } diff --git a/AIMS/DrugManagement/frmMedicalItemDetail.cs b/AIMS/DrugManagement/frmMedicalItemDetail.cs index fbee188..f54eb90 100644 --- a/AIMS/DrugManagement/frmMedicalItemDetail.cs +++ b/AIMS/DrugManagement/frmMedicalItemDetail.cs @@ -7,13 +7,16 @@ using System.Linq; using System.Text; using System.Windows.Forms; using System.Text.RegularExpressions; +using AIMSBLL; +using AIMSModel; + namespace DrugManagement.UI { public partial class frmMedicalItemDetail : Form { public int DrugKindId = 0; private frmMedicalDictList frmMedicalDictList; - private Model.MedicalDict MedicalDictObj = new Model.MedicalDict(); + private MedicalDict MedicalDictObj = new MedicalDict(); public AIMSExtension.EditState _State; public int MedicalItemEditId = 0; public frmMedicalItemDetail() @@ -32,9 +35,9 @@ namespace DrugManagement.UI Init(); if (DrugKindId != 0) { - Model.DrugKind DrugKindObj = BLL.DrugKind.GetModel(DrugKindId); + DrugKind DrugKindObj = BDrugKind.GetModel(DrugKindId); cboDrugKind.Text = DrugKindObj.Name; - cboDrugKindTotal.Text = DataDictionary.BLL.MedicalItemKind.GetModel(DrugKindObj.MedicalItemKindId).Name; + cboDrugKindTotal.Text = BMedicalItemKind.GetModel(DrugKindObj.MedicalItemKindId.Value).Name; } chkIsValid.Checked = true; @@ -45,8 +48,8 @@ namespace DrugManagement.UI if (_State == AIMSExtension.EditState.EDIT) { - Model.MedicalItem MedicalItemObj = new Model.MedicalItem(); - MedicalItemObj = BLL.MedicalItem.GetModel(MedicalItemEditId); + MedicalItem MedicalItemObj = new MedicalItem(); + MedicalItemObj = BMedicalItem.GetModel(MedicalItemEditId); txtNo.Text = MedicalItemObj.No; txtName.Text = MedicalItemObj.Name; txtHelpCode.Text = MedicalItemObj.HelpCode; @@ -56,7 +59,7 @@ namespace DrugManagement.UI txtStand.Text = MedicalItemObj.Stand; txtBarCode.Text = MedicalItemObj.BarCode; txtMedicalDictNo.Text = MedicalItemObj.MedicalDictNo; - cboDrugKindTotal.SelectedValue = BLL.DrugKind.GetModel(MedicalItemObj.DrugKindId).MedicalItemKindId; + cboDrugKindTotal.SelectedValue = BDrugKind.GetModel(MedicalItemObj.DrugKindId.Value).MedicalItemKindId; cboDrugKind.SelectedValue = MedicalItemObj.DrugKindId; cboPharmaCology.SelectedValue = MedicalItemObj.PharmaCologyId; @@ -93,56 +96,56 @@ namespace DrugManagement.UI private void Init() { - cboDosageKind.DataSource = BLL.DosageKind.GetDataTable(); + cboDosageKind.DataSource = BDosageKind.GetDataTable(); cboDosageKind.DisplayMember = "Name"; cboDosageKind.ValueMember = "Id"; cboDosageKind.SelectedIndex = -1; - cboDrugKind.DataSource = BLL.DrugKind.GetDataTable(); + cboDrugKind.DataSource = BDrugKind.GetDataTable(); cboDrugKind.DisplayMember = "Name"; cboDrugKind.ValueMember = "Id"; cboDrugKind.SelectedIndex = -1; - cboDrugKindTotal.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(DataDictionary.BLL.MedicalItemKind.GetDataTable(), "IsMed='药品'", ""); + cboDrugKindTotal.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BMedicalItemKind.GetDataTable(), "IsMed='药品'", ""); cboDrugKindTotal.DisplayMember = "Name"; cboDrugKindTotal.ValueMember = "Id"; cboDrugKindTotal.SelectedIndex = -1; cboInsuranceKind.DisplayMember = "Name"; cboInsuranceKind.ValueMember = "Id"; - cboInsuranceKind.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='医保用药类别')"); + cboInsuranceKind.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='医保用药类别')"); cboInsuranceKind.SelectedIndex = -1; cboInsuranceKindNH.DisplayMember = "Name"; cboInsuranceKindNH.ValueMember = "Id"; - cboInsuranceKindNH.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='医保用药类别')"); + cboInsuranceKindNH.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='医保用药类别')"); cboInsuranceKindNH.SelectedIndex = -1; - cboDosageUnit.DataSource = BLL.DosageUnit.GetDataTable(1); + cboDosageUnit.DataSource = BDosageUnit.GetDataTable(1); cboDosageUnit.DisplayMember = "Name"; cboDosageUnit.ValueMember = "Id"; cboDosageUnit.SelectedIndex = -1; - cboPharmaCology.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BLL.PharmaCology.GetDataTable(), "IsValid='有效'", ""); + cboPharmaCology.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(BPharmaCology.GetDataTable(), "IsValid='有效'", ""); cboPharmaCology.DisplayMember = "Name"; cboPharmaCology.ValueMember = "Id"; cboPharmaCology.SelectedIndex = -1; - cboDosageUnit.DataSource = BLL.DosageUnit.GetDataTable(1); + cboDosageUnit.DataSource = BDosageUnit.GetDataTable(1); cboDosageUnit.DisplayMember = "Name"; cboDosageUnit.ValueMember = "Id"; cboDosageUnit.SelectedIndex = -1; - cboPackingUnit.DataSource = BLL.DosageUnit.GetDataTable(2); + cboPackingUnit.DataSource = BDosageUnit.GetDataTable(2); cboPackingUnit.DisplayMember = "Name"; cboPackingUnit.ValueMember = "Id"; cboPackingUnit.SelectedIndex = -1; - cboSplitUnit.DataSource = BLL.DosageUnit.GetDataTable(2); + cboSplitUnit.DataSource = BDosageUnit.GetDataTable(2); cboSplitUnit.DisplayMember = "Name"; cboSplitUnit.ValueMember = "Id"; cboSplitUnit.SelectedIndex = -1; @@ -154,7 +157,7 @@ namespace DrugManagement.UI frmMedicalDictList.HelpCode = txtName.Text.Trim(); frmMedicalDictList.FormClosed += new FormClosedEventHandler(frmMedicalDictList_FormClosed); - if (AIMSExtension.PublicMethod.GetNewDataTable(BLL.MedicalDict.GetDataTableByName(txtName.Text.Trim()), "IsValid='有效'", "").Rows.Count > 0) + if (AIMSExtension.PublicMethod.GetNewDataTable(BMedicalDict.GetDataTableByName(txtName.Text.Trim()), "IsValid='有效'", "").Rows.Count > 0) { frmMedicalDictList.ShowDialog(); } @@ -162,8 +165,8 @@ namespace DrugManagement.UI void frmMedicalDictList_FormClosed(object sender, FormClosedEventArgs e) { - MedicalDictObj = BLL.MedicalDict.GetModel(frmMedicalDictList.MedicalDictId); - int RowsCount =BLL.MedicalItem.GetMedicalItemByDictNo(MedicalDictObj.No); + MedicalDictObj = BMedicalDict.GetModel(frmMedicalDictList.MedicalDictId); + int RowsCount =BMedicalItem.GetMedicalItemByDictNo(MedicalDictObj.No); if (RowsCount == 0) { txtNo.Text = MedicalDictObj.No; @@ -174,11 +177,11 @@ namespace DrugManagement.UI txtNo.Text = MedicalDictObj.No + (RowsCount + 1); } txtName.Text = MedicalDictObj.Name; - cboDosageKind.Text = BLL.DosageKind.GetModel(MedicalDictObj.DosageKindId).Name; + cboDosageKind.Text = BDosageKind.GetModel(MedicalDictObj.DosageKindId.Value).Name; txtMedicalDictNo.Text = MedicalDictObj.No; - cboDrugKind.Text = BLL.DrugKind.GetModel(MedicalDictObj.DrugKindId).Name; - cboDrugKindTotal.Text = DataDictionary.BLL.MedicalItemKind.GetModel(BLL.DrugKind.GetModel(MedicalDictObj.DrugKindId).MedicalItemKindId).Name; + cboDrugKind.Text = BDrugKind.GetModel(MedicalDictObj.DrugKindId.Value).Name; + cboDrugKindTotal.Text = BMedicalItemKind.GetModel(BDrugKind.GetModel(MedicalDictObj.DrugKindId.Value).MedicalItemKindId.Value).Name; chkIsValid.Checked = true; txtStand.Select(); @@ -190,9 +193,9 @@ namespace DrugManagement.UI AIMSExtension.PublicMethod.ClearControl(panel1); if (DrugKindId != 0) { - Model.DrugKind DrugKindObj = BLL.DrugKind.GetModel(DrugKindId); + DrugKind DrugKindObj = BDrugKind.GetModel(DrugKindId); cboDrugKind.Text = DrugKindObj.Name; - cboDrugKindTotal.Text = DataDictionary.BLL.MedicalItemKind.GetModel(DrugKindObj.MedicalItemKindId).Name; + cboDrugKindTotal.Text = BMedicalItemKind.GetModel(DrugKindObj.MedicalItemKindId.Value).Name; } chkIsValid.Checked = true; txtName.Select(); @@ -205,7 +208,7 @@ namespace DrugManagement.UI { if (ValidInput()) { - Model.MedicalItem MedicalItemObj = new Model.MedicalItem(); + MedicalItem MedicalItemObj = new MedicalItem(); MedicalItemObj.No = txtNo.Text.Trim(); MedicalItemObj.Name = txtName.Text.Trim(); MedicalItemObj.HelpCode = txtHelpCode.Text.Trim(); @@ -234,12 +237,12 @@ namespace DrugManagement.UI if (_State == AIMSExtension.EditState.ADD) { - BLL.MedicalItem.Add(MedicalItemObj); + BMedicalItem.Add(MedicalItemObj); } if (_State == AIMSExtension.EditState.EDIT) { MedicalItemObj.Id = MedicalItemEditId; - BLL.MedicalItem.Update(MedicalItemObj); + BMedicalItem.Update(MedicalItemObj); } tsbCancel_Click(null, null); diff --git a/AIMS/DrugManagement/frmMedicamentPrice.cs b/AIMS/DrugManagement/frmMedicamentPrice.cs index b41391f..9590305 100644 --- a/AIMS/DrugManagement/frmMedicamentPrice.cs +++ b/AIMS/DrugManagement/frmMedicamentPrice.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,7 +14,7 @@ namespace DrugManagement.UI public partial class frmMedicamentPrice : Form { public AIMSExtension.EditState _state; - public Model.MedicalItem SelectRowMedicalItemObj; + public MedicalItem SelectRowMedicalItemObj; public int DrugManufacturerId =0; public string DrugManufacturerName; private frmDrugManufacturerList frmDrugManufacturerList; @@ -53,13 +55,13 @@ namespace DrugManagement.UI txtRetailPrice.Enabled = false; txtDrugManufacturer.Enabled = false; - Model.MedicamentPrice MedicamentPriceObj = BLL.MedicamentPrice.GetModel(MedicamentPriceId); - Model.MedicalItem MedicalItemObj = BLL.MedicalItem.GetModel(MedicamentPriceObj.MedicalItemId); + MedicamentPrice MedicamentPriceObj = BMedicamentPrice.GetModel(MedicamentPriceId); + MedicalItem MedicalItemObj = BMedicalItem.GetModel(MedicamentPriceObj.MedicalItemId.Value); txtNo.Text = MedicalItemObj.No; txtName.Text = MedicalItemObj.Name; txtPackingUnit.Text = MedicalItemObj.PackingUnit; - txtDrugManufacturer.Text = BLL.DrugManufacturer.GetModel(MedicamentPriceObj.DrugManufacturerId).Name; + txtDrugManufacturer.Text = BDrugManufacturer.GetModel(MedicamentPriceObj.DrugManufacturerId.Value).Name; txtPurchasePrice.Text = MedicamentPriceObj.PurchasePrice.ToString(); txtRetailPrice.Text = MedicamentPriceObj.RetailPrice.ToString(); txtTradePrice.Text = MedicamentPriceObj.TradePrice.ToString(); @@ -126,7 +128,7 @@ namespace DrugManagement.UI { if (_state == AIMSExtension.EditState.ADD) { - Model.MedicamentPrice MedicamentPriceObj = new Model.MedicamentPrice(); + MedicamentPrice MedicamentPriceObj = new MedicamentPrice(); MedicamentPriceObj.MedicalItemId = SelectRowMedicalItemObj.Id; MedicamentPriceObj.DrugManufacturerId = DrugManufacturerId; MedicamentPriceObj.PurchasePrice = decimal.Parse(txtPurchasePrice.Text.Trim()); @@ -136,7 +138,7 @@ namespace DrugManagement.UI MedicamentPriceObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; MedicamentPriceObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; MedicamentPriceObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - BLL.MedicamentPrice.Add(MedicamentPriceObj); + BMedicamentPrice.Add(MedicamentPriceObj); } else { @@ -146,13 +148,13 @@ namespace DrugManagement.UI if (_state == AIMSExtension.EditState.EDIT) { - Model.MedicamentPrice MedicamentPriceObj = new Model.MedicamentPrice(); + MedicamentPrice MedicamentPriceObj = new MedicamentPrice(); MedicamentPriceObj.Id = MedicamentPriceId; MedicamentPriceObj.IsValid = int.Parse(chkIsValid.Checked ? "1" : "0"); MedicamentPriceObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; MedicamentPriceObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; MedicamentPriceObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - BLL.MedicamentPrice.Update(MedicamentPriceObj); + BMedicamentPrice.Update(MedicamentPriceObj); } Close(); } diff --git a/AIMS/DrugManagement/frmPharmaCology.cs b/AIMS/DrugManagement/frmPharmaCology.cs index 42368a1..70f838a 100644 --- a/AIMS/DrugManagement/frmPharmaCology.cs +++ b/AIMS/DrugManagement/frmPharmaCology.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -70,7 +72,7 @@ namespace DrugManagement.UI MessageBox.Show("名称不能为空!"); return; } - Model.PharmaCology PharmaCologyObj = new Model.PharmaCology(); + PharmaCology PharmaCologyObj = new PharmaCology(); PharmaCologyObj.Name = txtName.Text.Trim(); PharmaCologyObj.HelpCode = txtHelpCode.Text.Trim(); PharmaCologyObj.IsValid = int.Parse(chkIsValid.Checked ? "1" : "0"); @@ -79,13 +81,13 @@ namespace DrugManagement.UI PharmaCologyObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - BLL.PharmaCology.Add(PharmaCologyObj); + BPharmaCology.Add(PharmaCologyObj); } if (_state == AIMSExtension.EditState.EDIT) { PharmaCologyObj.Id = SelectPharmaCologyId; - BLL.PharmaCology.Update(PharmaCologyObj); + BPharmaCology.Update(PharmaCologyObj); } AIMSExtension.PublicMethod.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; @@ -107,7 +109,7 @@ namespace DrugManagement.UI { dgvPharmaCology.Rows.Clear(); - DataTable dt = BLL.PharmaCology.GetDataTable(); + DataTable dt = BPharmaCology.GetDataTable(); for (int i = 0; i < dt.Rows.Count; i++) { dgvPharmaCology.Rows.Add(dt.Rows[i]["Id"].ToString(), diff --git a/AIMS/FormLogin.cs b/AIMS/FormLogin.cs index 3c60bed..477aade 100644 --- a/AIMS/FormLogin.cs +++ b/AIMS/FormLogin.cs @@ -6,6 +6,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; +using AIMSModel; using DevComponents.DotNetBar; namespace AIMS @@ -27,31 +29,31 @@ namespace AIMS //label2.Text = "@山西瑞禾康医疗科技有限公司 V" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); txtNo.Select(); txtNo.Focus(); -//#if DEBUG -// txtNo.Text = "admin"; -// txtPassWord.Text = "1"; -// btnOk_Click(null, null); -//#endif + //#if DEBUG + // txtNo.Text = "admin"; + // txtPassWord.Text = "1"; + // btnOk_Click(null, null); + //#endif } private void btnOk_Click(object sender, EventArgs e) { - if (AIMS.PublicUI.BLL.Person.Login(txtNo.Text, txtPassWord.Text)) + if (BPerson.Login(txtNo.Text, txtPassWord.Text)) { - AIMS.PublicUI.Model.Person PersonObj = AIMS.PublicUI.BLL.Person.GetModelByNo(txtNo.Text); - AIMSExtension.PublicMethod.OperatorId = PersonObj.Id; + Person PersonObj = BPerson.GetModelByNo(txtNo.Text); + AIMSExtension.PublicMethod.OperatorId = PersonObj.Id.Value; AIMSExtension.PublicMethod.OperatorNo = PersonObj.No; AIMSExtension.PublicMethod.OperatorName = PersonObj.Name; - AIMSExtension.PublicMethod.RoleId = PersonObj.RoleId; - AIMSExtension.PublicMethod.DepId = PersonObj.DepId; - AIMSExtension.PublicMethod.DeptName = AIMS.PublicUI.BLL.Department.GetModel(PersonObj.DepId).Name; - AIMS.PublicUI.Model.Role role = AIMS.PublicUI.BLL.Role.GetModel(PersonObj.RoleId); - AIMSExtension.PublicMethod.PermissionLevel = role.PermissionLevel; + AIMSExtension.PublicMethod.RoleId = PersonObj.RoleId.Value; + AIMSExtension.PublicMethod.DepId = PersonObj.DepId.Value; + AIMSExtension.PublicMethod.DeptName = BDepartment.GetModel(PersonObj.DepId.Value).Name; + Role role = BRole.GetModel(PersonObj.RoleId.Value); + AIMSExtension.PublicMethod.PermissionLevel = role.PermissionLevel == null ? 0 : role.PermissionLevel.Value; Hide(); //在这里为编辑器注册 new System.Threading.Thread(Reg).Start(); //DevComponents.DotNetBar.StyleManager.MetroColorGeneratorParameters = DevComponents.DotNetBar.Metro.ColorTables.MetroColorGeneratorParameters.Office2016Blue; - new FormMainManage().ShowDialog(); + new FormMainManage().ShowDialog(); } else { diff --git a/AIMS/FormMainManage.cs b/AIMS/FormMainManage.cs index 56de477..42ddb2d 100644 --- a/AIMS/FormMainManage.cs +++ b/AIMS/FormMainManage.cs @@ -1,17 +1,14 @@ +using AIMS.DocManager; +using AIMSBLL; +using AIMSModel; +using DevComponents.DotNetBar; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; using System.Drawing; -using System.Linq; using System.Reflection; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -using AIMS.DocManager; -using AIMS.OperationDoing.AnasRecordBill.UI; -using AIMS.PublicUI.Model; -using DevComponents.DotNetBar; namespace AIMS { @@ -126,9 +123,9 @@ namespace AIMS lv7.Size = new Size(PanelWidth - 5, PanelHeight - 35); lv7.Location = new Point(2, 28); - List menuListP = new List(); - AIMS.PublicUI.Model.Menu menu = new AIMS.PublicUI.Model.Menu(); - menuListP = AIMS.PublicUI.BLL.Menu.GetMenuRootListManage(AIMSExtension.PublicMethod.RoleId, "0"); + List menuListP = new List(); + AIMSModel.Menu menu = new AIMSModel.Menu(); + menuListP = BMenu.GetMenuRootListManage(AIMSExtension.PublicMethod.RoleId, "0"); for (int i = 0; i < menuListP.Count; i++) { var menuSec = menuListP[i]; @@ -207,7 +204,7 @@ namespace AIMS public void BindOperationsList(DevComponents.DotNetBar.Controls.DataGridViewX lvex, DateTime beginTime, DateTime endTime, bool isLoginPerson, bool isEnOpe = false) { lvex.Rows.Clear(); - DataTable dt = OperationDoing.AnasRecordBill.BLL.SelectPatient.GetSelectPatientDataTable + DataTable dt = SelectPatient.GetSelectPatientDataTable (beginTime, endTime, isLoginPerson, AIMSExtension.PublicMethod.OperatorName, isEnOpe); for (int i = 0; i < dt.Rows.Count; i++) @@ -246,7 +243,7 @@ namespace AIMS { try { - DataTable dt = OperationDoing.AnasRecordBill.BLL.SelectPatient.GetSelectPatientChart(); + DataTable dt = SelectPatient.GetSelectPatientChart(); List xData = new List(); List yData = new List(); @@ -263,7 +260,7 @@ namespace AIMS } public void BindOperationsListChart2() { - DataTable dt = OperationDoing.AnasRecordBill.BLL.SelectPatient.GetSelectPatientChart2(); + DataTable dt = SelectPatient.GetSelectPatientChart2(); List xData = new List(); List yData = new List(); @@ -284,7 +281,7 @@ namespace AIMS if (sideNavItem.Tag == null) return; selsideNavItem = sideNavItem; sideNavItem.Text = sideNavItem.Text + " "; - AIMS.PublicUI.Model.Menu menu = sideNavItem.Tag as AIMS.PublicUI.Model.Menu; + AIMSModel.Menu menu = sideNavItem.Tag as AIMSModel.Menu; string path = menu.Path; if (path.Length > 0) { @@ -384,14 +381,14 @@ namespace AIMS public void BindfrmNoticeMain() { - List NoticeList = PublicUI.BLL.NoticeTemplate.HistoryNoticeData(); + List NoticeList = BNotice.HistoryNoticeData(); System.Windows.Forms.ListViewItem[] lists = new System.Windows.Forms.ListViewItem[NoticeList.Count]; lv7.Items.Clear(); for (int i = 0; i < NoticeList.Count; i++) { - lists[i] = new System.Windows.Forms.ListViewItem(new string[] { NoticeList[i].Id.ToString(), NoticeList[i].Contents, NoticeList[i].OperateDate.ToString("yyyy-MM-dd") }, i); + lists[i] = new System.Windows.Forms.ListViewItem(new string[] { NoticeList[i].Id.ToString(), NoticeList[i].Contents, NoticeList[i].OperateDate.Value.ToString("yyyy-MM-dd") }, i); } lv7.Items.AddRange(lists); @@ -471,10 +468,10 @@ namespace AIMS int SelApplyId = int.Parse(dataGridView.CurrentRow.Cells[0].Value.ToString()); if (SelApplyId != 0) { - AIMS.OperationFront.Model.OperationApply apply = AIMS.OperationFront.BLL.OperationApply.GetModel(SelApplyId); - AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBillNew frmAnasRecord = new frmAnasRecordBillNew(); - frmAnasRecord.PatientId = apply.Oris_PatientId; - frmAnasRecord.ApplyId = apply.Id; + OperationApply apply = BOperationApply.GetModel(SelApplyId); + AIMS.OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBillNew frmAnasRecord = new OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBillNew(); + frmAnasRecord.PatientId = apply.OrisPatientId.Value; + frmAnasRecord.ApplyId = apply.Id.Value; frmAnasRecord.State = AIMSExtension.EditState.BROWSE; frmAnasRecord.Show(); } diff --git a/AIMS/OperationAfter/OperationReview.cs b/AIMS/OperationAfter/OperationReview.cs deleted file mode 100644 index 73c10f7..0000000 --- a/AIMS/OperationAfter/OperationReview.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationAfter.BLL -{ - public class OperationReview - { - public static DataTable GetOperationReviewDataTable(string MdrecNo, string PatientName, string OperationBeginTime, string OperationEndTime) - { - return new DAL.OperationReviewDB().GetOperationReviewDataTable(MdrecNo, PatientName, OperationBeginTime, OperationEndTime); - } - } -} diff --git a/AIMS/OperationAfter/OperationReviewDB.cs b/AIMS/OperationAfter/OperationReviewDB.cs deleted file mode 100644 index fafaf93..0000000 --- a/AIMS/OperationAfter/OperationReviewDB.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationAfter.DAL -{ - public class OperationReviewDB - { - public DataTable GetOperationReviewDataTable(string MdrecNo, string PatientName, string OperationBeginTime, string OperationEndTime) - { - string strSql = " SELECT of1.PatientId, of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind,"+ - " of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType,"+ - " of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType,"+ - " of1.[State],od.DiagnoseInfoName, od.OperationInfoName,"+ - " od.OperationBeginTime,od.OperationEndTime,"+ - " od.AnaesthesiaMethodName, od.OperationCutTypeName,"+ - " od.OperationBodyPositionName, od.OperationPositionName,"+ - " od.OperationDoctor, od.Assistant, od.AnesthesiaDoctor,"+ - " od.Nurse, od.Remarks,of1.MedicalRecord,of1.MedicalRecordTime FROM V_OperationDoing od" + - " LEFT JOIN V_OperationFront of1 ON of1.PatientId = od.PatientId WHERE (of1.MdrecNo ='" + MdrecNo + "' OR of1.PatientName LIKE '" + PatientName + "%')" + - " AND od.OperationBeginTime >='" + OperationBeginTime + "' AND od.OperationBeginTime <'" + OperationEndTime + "' AND " + - " od.[State] IN ('手术结束','麻醉恢复结束')"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMS/OperationAfter/frmOperationManage.cs b/AIMS/OperationAfter/frmOperationManage.cs index 87f2468..0c5e424 100644 --- a/AIMS/OperationAfter/frmOperationManage.cs +++ b/AIMS/OperationAfter/frmOperationManage.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -29,9 +31,9 @@ namespace AIMS.OperationAfter.UI AIMSExtension.PublicMethod.SetDgvAttribute(dgv); dgv.BackgroundColor = System.Drawing.Color.Snow; - List list = new List(); - list = AIMS.PublicUI.BLL.Department.GetDepartmentAllList("诊疗部门"); - list.Insert(0, new AIMS.PublicUI.Model.Department + List list = new List(); + list = BDepartment.GetDepartmentAllList("诊疗部门"); + list.Insert(0, new Department { Id = -1, Name = "全部科室" @@ -55,7 +57,7 @@ namespace AIMS.OperationAfter.UI tokenEditor1.SelectedTokens.Add(tokenEditor1.Tokens[1]); - List rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); + List rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); foreach (var item in rooms) { tokenEditor2.Tokens.Add(new DevComponents.DotNetBar.Controls.EditToken(item.Id.ToString(), item.Name)); @@ -100,7 +102,7 @@ namespace AIMS.OperationAfter.UI string name = txtName.Text; - DataTable dt = OperationFront.BLL.OperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.AddDays(1).ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.AddDays(1).ToString("yyyy-MM-dd")); dgv.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(dt, "State IN ('已排程','已访视') and ApplyDepName LIKE '%" + Department + "%'", ""); for (int i = 0; i < dgv.Rows.Count; i++) diff --git a/AIMS/OperationAfter/frmOperationReview.cs b/AIMS/OperationAfter/frmOperationReview.cs index cb92128..b73eded 100644 --- a/AIMS/OperationAfter/frmOperationReview.cs +++ b/AIMS/OperationAfter/frmOperationReview.cs @@ -30,7 +30,7 @@ namespace AIMS.OperationAfter.UI toolStripSeparator2.Visible = false; tsbSet.Visible = false; } - dgv.DataSource = AIMS.OperationAfter.BLL.OperationReview.GetOperationReviewDataTable(txtMdrecNo.Text.Trim(), txtPatientName.Text.Trim(), + dgv.DataSource = BOperationReview.GetOperationReviewDataTable(txtMdrecNo.Text.Trim(), txtPatientName.Text.Trim(), dtpOperationBeginTime.Value.ToString("yyyy-MM-dd"), dtpOperationEndTime.Value.AddDays(1).ToString("yyyy-MM-dd") ); @@ -80,10 +80,10 @@ namespace AIMS.OperationAfter.UI int PatientId = int.Parse(dgv.CurrentRow.Cells["PatientId"].Value.ToString()); int ApplyId = int.Parse(dgv.CurrentRow.Cells["ApplyId"].Value.ToString()); - DataTable OperationDoingdt = AIMS.OperationDoing.AnasRecordBill.BLL.OperationRecord.GetOperationDoingDataTableByPatientId(PatientId, 2); + DataTable OperationDoingdt = BOperationRecord.GetOperationDoingDataTableByPatientId(PatientId, 2); if (OperationDoingdt.Rows.Count > 0) { - AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecoverBillNew frmAnasRecord = new AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecoverBillNew(); + AIMS.OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBillNew frmAnasRecord = new AIMS.OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBillNew(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = ApplyId; frmAnasRecord.State = AIMSExtension.EditState.BROWSE; @@ -108,7 +108,7 @@ namespace AIMS.OperationAfter.UI private void btnFind_Click(object sender, EventArgs e) { - dgv.DataSource = AIMS.OperationAfter.BLL.OperationReview.GetOperationReviewDataTable(txtMdrecNo.Text.Trim(), txtPatientName.Text.Trim(), + dgv.DataSource = BOperationReview.GetOperationReviewDataTable(txtMdrecNo.Text.Trim(), txtPatientName.Text.Trim(), dtpOperationBeginTime.Value.ToString("yyyy-MM-dd"), dtpOperationEndTime.Value.AddDays(1).ToString("yyyy-MM-dd") ); diff --git a/AIMS/OperationAfter/frmPhysiologyLargeScreen.cs b/AIMS/OperationAfter/frmPhysiologyLargeScreen.cs index 5bda3f9..bfefd4e 100644 --- a/AIMS/OperationAfter/frmPhysiologyLargeScreen.cs +++ b/AIMS/OperationAfter/frmPhysiologyLargeScreen.cs @@ -8,6 +8,7 @@ using System.Text; using System.Windows.Forms; using System.Drawing.Drawing2D; using AIMSModel; +using AIMSBLL; namespace AIMS.OperationAfter.UI { @@ -27,7 +28,7 @@ namespace AIMS.OperationAfter.UI /// private void Initial() { - List rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); + List rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); SetTabPages(rooms ); //DataTable dt = BLL.BPatients.GetPatientOperationInfo(); //FullUCControlData(dt); @@ -38,7 +39,7 @@ namespace AIMS.OperationAfter.UI /// /// 根据手术间数量设置有多少个TabPages,每个TabPages显示10个手术间 /// - private void SetTabPages(List list) + private void SetTabPages(List list) { tabControl.TabPages.Clear(); if (list.Count > 0 && list.Count <= 10) @@ -68,10 +69,10 @@ namespace AIMS.OperationAfter.UI /// /// /// - private void FullControlToTabPages(int tabPagesIndex, List roomlist) + private void FullControlToTabPages(int tabPagesIndex, List roomlist) { int i = 0, j = 0; - foreach (DataDictionary.Model.OperationRoom room in roomlist) + foreach (OperationRoom room in roomlist) { AIMS.OremrUserControl.UCPatientPhysiology uc = new AIMS.OremrUserControl.UCPatientPhysiology(); uc.OperationRoom = room.Name; diff --git a/AIMS/OperationAfter/frmQualityControlViewParent.cs b/AIMS/OperationAfter/frmQualityControlViewParent.cs index 78ed2ec..b541e38 100644 --- a/AIMS/OperationAfter/frmQualityControlViewParent.cs +++ b/AIMS/OperationAfter/frmQualityControlViewParent.cs @@ -85,7 +85,7 @@ namespace AIMS.OperationAfter.UI { DateTime beginTime = Convert.ToDateTime(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00")); DateTime endTime = Convert.ToDateTime(dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); - DataTable vPlanedOpeList = AIMS.OperationFront.BLL.OperationApply.GetOperationFrontDataTable(beginTime.ToString("yyyy-MM-dd 00:00:00"), endTime.ToString("yyyy-MM-dd 23:59:59")); + DataTable vPlanedOpeList = BOperationApply.GetOperationFrontDataTable(beginTime.ToString("yyyy-MM-dd 00:00:00"), endTime.ToString("yyyy-MM-dd 23:59:59")); if (vPlanedOpeList.Rows.Count <= 0) return; string roomname = ""; diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FactAnaesthesiaMethod.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FactAnaesthesiaMethod.cs deleted file mode 100644 index 344721d..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FactAnaesthesiaMethod.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class FactAnaesthesiaMethod - { - public static void Add(Model.FactAnaesthesiaMethod FactAnaesthesiaMethodObj) - { - new DAL.FactAnaesthesiaMethodDB().Add(FactAnaesthesiaMethodObj); - } - - public static void Update(Model.FactAnaesthesiaMethod FactAnaesthesiaMethodObj) - { - new DAL.FactAnaesthesiaMethodDB().Update(FactAnaesthesiaMethodObj); - } - - - public static void Delete(int PatientId) - { - new DAL.FactAnaesthesiaMethodDB().Delete(PatientId); - } - - public static Model.FactAnaesthesiaMethod GetModel(int Id) - { - return new DAL.FactAnaesthesiaMethodDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.FactAnaesthesiaMethodDB().GetDataTable(strWhere); - } - - public static List GetFactAnaesthesiaMethodIdList(int PatientId) - { - return new DAL.FactAnaesthesiaMethodDB().GetFactAnaesthesiaMethodIdList(PatientId); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FactDiagnoseInfo.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FactDiagnoseInfo.cs deleted file mode 100644 index 51f2923..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FactDiagnoseInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class FactDiagnoseInfo - { - public static void Add(Model.FactDiagnoseInfo FactDiagnoseInfoObj) - { - new DAL.FactDiagnoseInfoDB().Add(FactDiagnoseInfoObj); - } - - public static void Delete(int PatientId) - { - new DAL.FactDiagnoseInfoDB().Delete(PatientId); - } - - public static Model.FactDiagnoseInfo GetModel(int Id) - { - return new DAL.FactDiagnoseInfoDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.FactDiagnoseInfoDB().GetDataTable(strWhere); - } - - public static List GetFactDiagnoseInfoIdList(int PatientId) - { - return new DAL.FactDiagnoseInfoDB().GetFactDiagnoseInfoIdList(PatientId); - } - - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationBodyPosition.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationBodyPosition.cs deleted file mode 100644 index 9d8c940..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationBodyPosition.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class FactOperationBodyPosition - { - public static void Add(Model.FactOperationBodyPosition FactOperationBodyPositionObj) - { - new DAL.FactOperationBodyPositionDB().Add(FactOperationBodyPositionObj); - } - - public static void Delete(int PatientId) - { - new DAL.FactOperationBodyPositionDB().Delete(PatientId); - } - - public static Model.FactOperationBodyPosition GetModel(int Id) - { - return new DAL.FactOperationBodyPositionDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.FactOperationBodyPositionDB().GetDataTable(strWhere); - } - public static List GetFactOperationBodyPositionIdList(int PatientId) - { - return new DAL.FactOperationBodyPositionDB().GetFactOperationBodyPositionIdList(PatientId); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationCutType.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationCutType.cs deleted file mode 100644 index 2a6e0fa..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationCutType.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class FactOperationCutType - { - public static void Add(Model.FactOperationCutType FactOperationCutTypeObj) - { - new DAL.FactOperationCutTypeDB().Add(FactOperationCutTypeObj); - } - public static void Delete(int PatientId) - { - new DAL.FactOperationCutTypeDB().Delete(PatientId); - } - public static Model.FactOperationCutType GetModel(int Id) - { - return new DAL.FactOperationCutTypeDB().GetModel(Id); - } - public static DataTable GetDataTable(string strWhere) - { - return new DAL.FactOperationCutTypeDB().GetDataTable(strWhere); - } - public static List GetFactOperationCutTypeIdList(int PatientId) - { - return new DAL.FactOperationCutTypeDB().GetFactOperationCutTypeIdList(PatientId); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationInfo.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationInfo.cs deleted file mode 100644 index 9a2f5ac..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class FactOperationInfo - { - public static void Add(Model.FactOperationInfo FactOperationInfoObj) - { - new DAL.FactOperationInfoDB().Add(FactOperationInfoObj); - } - - public static void Delete(int PatientId) - { - new DAL.FactOperationInfoDB().Delete(PatientId); - } - - public static Model.FactOperationInfo GetModel(int Id) - { - return new DAL.FactOperationInfoDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.FactOperationInfoDB().GetDataTable(strWhere); - } - public static List GetFactOperationInfoIdList(int PatientId) - { - return new DAL.FactOperationInfoDB().GetFactOperationInfoIdList(PatientId); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationPosition.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationPosition.cs deleted file mode 100644 index edcb7af..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FactOperationPosition.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - class FactOperationPosition - { - public static void Add(Model.FactOperationPosition FactOperationPositionObj) - { - new DAL.FactOperationPositionDB().Add(FactOperationPositionObj); - } - public static void Delete(int PatientId) - { - new DAL.FactOperationPositionDB().Delete(PatientId); - } - public static Model.FactOperationPosition GetModel(int Id) - { - return new DAL.FactOperationPositionDB().GetModel(Id); - } - public static DataTable GetDataTable(string strWhere) - { - return new DAL.FactOperationPositionDB().GetDataTable(strWhere); - } - public static List GetFactOperationPositionIdList(int PatientId) - { - return new DAL.FactOperationPositionDB().GetFactOperationPositionIdList(PatientId); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FactPersonDuty.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FactPersonDuty.cs deleted file mode 100644 index fc28d2f..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FactPersonDuty.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class FactPersonDuty - { - public static void Add(Model.FactPersonDuty FactPersonDutyObj) - { - new DAL.FactPersonDutyDB().Add(FactPersonDutyObj); - } - - public static void Delete(int PatientId, int PersonDutyId) - { - new DAL.FactPersonDutyDB().Delete(PatientId, PersonDutyId); - } - - public static Model.FactPersonDuty GetModel(int Id) - { - return new DAL.FactPersonDutyDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.FactPersonDutyDB().GetDataTable(strWhere); - } - public static List GetPersonIdList(int PatientId, int PersonDutyId) - { - return new DAL.FactPersonDutyDB().GetPersonIdList(PatientId, PersonDutyId); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/FillAnasRecordBillData.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/FillAnasRecordBillData.cs deleted file mode 100644 index 24f1ebe..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/FillAnasRecordBillData.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using AIMS.OperationDoing.AnasRecordBill.Model; -using DrawGraph; -using AIMSBLL; - -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class FillAnasRecordBillData - { - public static DateTime GetMaxTime(int PatientId,int Type) - { - return new DAL.FillAnasRecordBillDataDB().GetMaxTime(PatientId, Type); - } - public static int GetDataCount(int RecorId,int PatientId, int Type) - { - return new DAL.FillAnasRecordBillDataDB().GetDataCount( RecorId,PatientId, Type); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/InRoom.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/InRoom.cs deleted file mode 100644 index 113959c..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/InRoom.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using DrawGraph; -using AIMSBLL; - -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class InRoom - { - public static void UpdateApplyState(int PatientId, int ApplyId) - { - try - { - HelperDB.DbHelperSQL.BeginTrans(); - AIMS.OperationFront.BLL.OperationApply.UpdateApplyState(ApplyId, 6); //修改状态为手术中 - - //手术诊断 - List ApplyDiagnoseIdList = AIMS.OperationFront.BLL.ApplyDiagnoseInfo.GetApplyDiagnoseIdList(ApplyId); - for (int i = 0; i < ApplyDiagnoseIdList.Count; i++) - { - OperationDoing.AnasRecordBill.Model.FactDiagnoseInfo FactDiagnoseInfoObj = new OperationDoing.AnasRecordBill.Model.FactDiagnoseInfo(); - FactDiagnoseInfoObj.PatientId = PatientId; - FactDiagnoseInfoObj.ApplyId = ApplyId; - FactDiagnoseInfoObj.DiagnoseId = ApplyDiagnoseIdList[i]; - FactDiagnoseInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactDiagnoseInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactDiagnoseInfoObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationDoing.AnasRecordBill.BLL.FactDiagnoseInfo.Add(FactDiagnoseInfoObj); - } - //实施手术 - List ApplyOperationInfoList = AIMS.OperationFront.BLL.ApplyOperationInfo.GetApplyOperationIdList(ApplyId); - for (int i = 0; i < ApplyOperationInfoList.Count; i++) - { - OperationDoing.AnasRecordBill.Model.FactOperationInfo FactOperationInfoObj = new OperationDoing.AnasRecordBill.Model.FactOperationInfo(); - FactOperationInfoObj.PatientId = PatientId; - FactOperationInfoObj.ApplyId = ApplyId; - FactOperationInfoObj.OperationId = ApplyOperationInfoList[i].OperationId; - FactOperationInfoObj.OperationName = ApplyOperationInfoList[i].OperationName; - FactOperationInfoObj.LeftRemark = ApplyOperationInfoList[i].LeftRemark; - FactOperationInfoObj.RightRemark = ApplyOperationInfoList[i].RightRemark; - FactOperationInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactOperationInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactOperationInfoObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationDoing.AnasRecordBill.BLL.FactOperationInfo.Add(FactOperationInfoObj); - } - //实施麻醉 - List ApplyAnaesthesiaMethodList = AIMS.OperationFront.BLL.ApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(ApplyId); - for (int i = 0; i < ApplyAnaesthesiaMethodList.Count; i++) - { - OperationDoing.AnasRecordBill.Model.FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new Model.FactAnaesthesiaMethod(); - FactAnaesthesiaMethodObj.PatientId = PatientId; - FactAnaesthesiaMethodObj.ApplyId = ApplyId; - FactAnaesthesiaMethodObj.AnaesthesiaMethodId = ApplyAnaesthesiaMethodList[i]; - FactAnaesthesiaMethodObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactAnaesthesiaMethodObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactAnaesthesiaMethodObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationDoing.AnasRecordBill.BLL.FactAnaesthesiaMethod.Add(FactAnaesthesiaMethodObj); - } - - //手术部位 - List ApplyOperationPositionList = AIMS.OperationFront.BLL.ApplyOperationPosition.GetApplyOperationPositionIdList(ApplyId); - for (int i = 0; i < ApplyOperationPositionList.Count; i++) - { - OperationDoing.AnasRecordBill.Model.FactOperationPosition FactOperationPositionObj = new Model.FactOperationPosition(); - FactOperationPositionObj.PatientId = PatientId; - FactOperationPositionObj.ApplyId = ApplyId; - FactOperationPositionObj.OperationPositionId = ApplyOperationPositionList[i]; - FactOperationPositionObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactOperationPositionObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactOperationPositionObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationDoing.AnasRecordBill.BLL.FactOperationPosition.Add(FactOperationPositionObj); - } - - //手术切口 - List ApplyOperationCutTypeList = AIMS.OperationFront.BLL.ApplyOperationCutType.GetApplyOperationCutTypeIdList(ApplyId); - for (int i = 0; i < ApplyOperationCutTypeList.Count; i++) - { - OperationDoing.AnasRecordBill.Model.FactOperationCutType FactOperationCutTypeObj = new Model.FactOperationCutType(); - FactOperationCutTypeObj.PatientId = PatientId; - FactOperationCutTypeObj.ApplyId = ApplyId; - FactOperationCutTypeObj.OperationCutTypeId = ApplyOperationCutTypeList[i]; - FactOperationCutTypeObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactOperationCutTypeObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactOperationCutTypeObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationDoing.AnasRecordBill.BLL.FactOperationCutType.Add(FactOperationCutTypeObj); - } - //医生信息 - - DataTable dt = OperationFront.BLL.ApplyPersonDuty.GetPersonDataTable(ApplyId); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.FactPersonDuty FactPersonDutyObj = new Model.FactPersonDuty(); - FactPersonDutyObj.PatientId = PatientId; - FactPersonDutyObj.ApplyId = ApplyId; - FactPersonDutyObj.PersonDutyId = int.Parse(dt.Rows[i]["PersonDutyId"].ToString()); - FactPersonDutyObj.PersonId = int.Parse(dt.Rows[i]["PersonId"].ToString()); - FactPersonDutyObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactPersonDutyObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactPersonDutyObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - BLL.FactPersonDuty.Add(FactPersonDutyObj); - } - - //增加入室事件 - DataDictionary.Model.Events EventsObj = DataDictionary.BLL.Events.GetModelByName("入室"); - - if (EventsObj.Name != null) - { - FactEvents FactEventsObj = new FactEvents(); - FactEventsObj.EventId = EventsObj.Id; - FactEventsObj.EventTypeId = 1; - FactEventsObj.EventBeginTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")); - FactEventsObj.EventEndTime = FactEventsObj.EventBeginTime; - FactEventsObj.IsContinue = 0; - FactEventsObj.PatientId = PatientId; - FactEventsObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactEventsObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactEventsObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - - BFactEvents.Add(FactEventsObj); - } - - - - HelperDB.DbHelperSQL.CommitTrans(); - - } - catch - { - HelperDB.DbHelperSQL.RollbackTrans(); - } - } - - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/OperationRecord.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/OperationRecord.cs deleted file mode 100644 index 84d3a79..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/OperationRecord.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class OperationRecord - { - public static int AddTitleTime(int PatientId, int ApplyId, int RecoverId, string TableColumnName, DateTime Time,int RoomId) - { - return new DAL.OperationRecordDB().AddTitleTime(PatientId, ApplyId, RecoverId, TableColumnName, Time, RoomId); - } - public static void UpdateTitleTime(int PatientId, string TableColumnName, DateTime Time) - { - new DAL.OperationRecordDB().UpdateTitleTime(PatientId, TableColumnName, Time); - } - - public static Model.TitleTime GetTitleTime(int PatientId,int RecoverId) - { - return new DAL.OperationRecordDB().GetTitleTime(PatientId, RecoverId); - } - public static void Update(Model.OperationRecord OperationRecordObj) - { - new DAL.OperationRecordDB().Update(OperationRecordObj); - } - public static void UpdateState(int PatientId, int TypeId, int State) - { - new DAL.OperationRecordDB().UpdateState(PatientId,TypeId, State); - } - public static void DeleteOperationRecordData(int RecorId,int PatientId, int TypeId) - { - new DAL.OperationRecordDB().DeleteOperationRecordData(RecorId,PatientId, TypeId); - } - public static void DeleteOperationRecorvreData(int PatientId, int TypeId) - { - new DAL.OperationRecordDB().DeleteOperationRecorvreData(PatientId, TypeId); - } - public static void DeleteEvent(int PatientId, int eventId) - { - new DAL.OperationRecordDB().DeleteEvent(PatientId, eventId); - } - public static Model.OperationRecord GetModel(int PatientId) - { - return new DAL.OperationRecordDB().GetModel(PatientId); - } - public static DataTable GetOperationDoingDataTableByPatientId(int PatientId, int TypeId) - { - return new DAL.OperationRecordDB().GetOperationDoingMainInfo(PatientId, TypeId); - } - public static bool ValidInput(int PatientId, int TypeId) - { - - bool result = false; - DataTable dt = new DAL.OperationRecordDB().GetOperationDoingMainInfo(PatientId, TypeId); - if (dt.Rows[0]["InRoomTime"].ToString().Length < 1) - { - MessageBox.Show("入室不能为空!"); - } - else if (dt.Rows[0]["OutRoomTime"].ToString().Length < 1) - { - MessageBox.Show("出室不能为空!"); - } - else if (dt.Rows[0]["OperationBeginTime"].ToString().Length < 1) - { - MessageBox.Show("手术开始时间不能为空!"); - } - else if (dt.Rows[0]["OperationEndTime"].ToString().Length < 1) - { - MessageBox.Show("手术结束时间不能为空!"); - } - else if (dt.Rows[0]["DiagnoseInfoName"].ToString().Length < 1) - { - MessageBox.Show("术后诊断不能为空!"); - } - else if (dt.Rows[0]["OperationInfoName"].ToString().Length < 1) - { - MessageBox.Show("实施手术不能为空!"); - } - else if (dt.Rows[0]["AnaesthesiaMethodName"].ToString().Length < 1) - { - MessageBox.Show("麻醉方式不能为空!"); - } - else if (dt.Rows[0]["OperationDoctor"].ToString().Length < 1) - { - MessageBox.Show("手术医生不能为空!"); - } - else if (dt.Rows[0]["AnesthesiaDoctor"].ToString().Length < 1) - { - MessageBox.Show("麻醉医生不能为空!"); - } - else - { - result = true; - } - return result; - } - } -} - diff --git a/AIMS/OperationDoing/AnasRecordBill/BLL/SelectPatient.cs b/AIMS/OperationDoing/AnasRecordBill/BLL/SelectPatient.cs deleted file mode 100644 index 9965343..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/BLL/SelectPatient.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.BLL -{ - public class SelectPatient - { - public static DataTable GetSelectPatientDataTable(DateTime BeginDate) - { - return new DAL.SelectPatient().GetSelectPatientDataTable(BeginDate); - } - - public static DataTable GetSelectPatientDataTable(DateTime BeginDate,string Room) - { - return new DAL.SelectPatient().GetSelectPatientDataTable(BeginDate,Room); - } - - public static DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate) - { - return new DAL.SelectPatient().GetRelieveLockingPatientDataTable(BeginDate); - } - public static DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate,string Room) - { - return new DAL.SelectPatient().GetRelieveLockingPatientDataTable(BeginDate,Room); - } - public static DataTable GetRecoverPatientDataTable(DateTime BeginDate ) - { - return new DAL.SelectPatient().GetRecoverPatientDataTable(BeginDate); - } - public static DataTable GetSelectPatientDataTable(DateTime BeginDate, DateTime EndDate, bool isLoginPerson, string person, bool isEnOpe) - { - return new DAL.SelectPatient().GetSelectPatientDataTable(BeginDate, EndDate, isLoginPerson, person, isEnOpe); - } - public static DataTable GetSelectPatientChart() - { - return new DAL.SelectPatient().GetSelectPatientChart(); - } - public static DataTable GetSelectPatientChart2() - { - return new DAL.SelectPatient().GetSelectPatientChart2(); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/AddPhysioParamDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/AddPhysioParamDB.cs deleted file mode 100644 index b3b474b..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/AddPhysioParamDB.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class AddPhysioParamDB - { - public List AddPhysioParamList() - { - List AddPhysioParamList = new List(); - string strSql = "SELECT pc.Id, pc.Name, pc.Color, pc.imgPath, pc.decHighLimit, pc.decLowLimit,pc.IsValid" + - " FROM PhysioDataConfig pc WHERE pc.IsValid=1"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.AddPhysioParam AddPhysioParam = new Model.AddPhysioParam(); - AddPhysioParam.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - AddPhysioParam.Name = dt.Rows[i]["Name"].ToString(); - AddPhysioParam.ImgPath = dt.Rows[i]["imgPath"].ToString(); - AddPhysioParam.Color = dt.Rows[i]["Color"].ToString(); - AddPhysioParam.DecHighLimit = double.Parse(dt.Rows[i]["decHighLimit"].ToString()); - AddPhysioParam.DecLowLimit = double.Parse(dt.Rows[i]["decLowLimit"].ToString()); - AddPhysioParamList.Add(AddPhysioParam); - } - return AddPhysioParamList; - } - public List AddOtherPhysioParamList() - { - List AddPhysioParamList = new List(); - string strSql = "SELECT pc.Id, pc.Name, pc.Color, pc.imgPath, pc.decHighLimit, pc.decLowLimit,pc.IsValid" + - " FROM PhysioDataConfig pc WHERE pc.NAME IN ('入室','麻醉开始','手术开始','手术结束','麻醉完成','出室','插管','拔管')"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.AddPhysioParam AddPhysioParam = new Model.AddPhysioParam(); - AddPhysioParam.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - AddPhysioParam.Name = dt.Rows[i]["Name"].ToString(); - AddPhysioParam.ImgPath = dt.Rows[i]["imgPath"].ToString(); - AddPhysioParam.Color = dt.Rows[i]["Color"].ToString(); - AddPhysioParam.DecHighLimit = double.Parse(dt.Rows[i]["decHighLimit"].ToString()); - AddPhysioParam.DecLowLimit = double.Parse(dt.Rows[i]["decLowLimit"].ToString()); - AddPhysioParamList.Add(AddPhysioParam); - } - return AddPhysioParamList; - } - - public DataTable GetPhysioData(int PatientId, int PhysioDataType) - { - string strSql = "SELECT p.PhysioDataConfigId, pdc.Name, p.RecordTime,p.VALUE FROM dbo.PhysioData p " + - "LEFT JOIN PhysioDataConfig pdc ON pdc.Id = p.PhysioDataConfigId where p.PatientId='" + PatientId + "' and p.PhysioDataType='" + PhysioDataType + "' ORDER BY p.RecordTime"; - return HelperDB.DbHelperSQL.GetDataTable(strSql); ; - } - - public void Add(Model.PhysioData PhysioDataObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [PhysioData]("); - strSql.Append("PatientId,PhysioDataType,PhysioDataConfigId,RecordTime,Value,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("" + PhysioDataObj.PatientId + ","); - strSql.Append("" + PhysioDataObj.PhysioDataType + ","); - strSql.Append("" + PhysioDataObj.PhysioParamID + ","); - strSql.Append("'" + PhysioDataObj.RecordTime + "',"); - strSql.Append("" + PhysioDataObj.Value + ","); - strSql.Append("" + 1 + ","); - strSql.Append("'" + AIMSExtension.PublicMethod.OperatorNo + "',"); - strSql.Append("'" + AIMSExtension.PublicMethod.OperatorName + "',"); - strSql.Append("'" + AIMSExtension.PublicMethod.SystemDate() + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FactAnaesthesiaMethodDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FactAnaesthesiaMethodDB.cs deleted file mode 100644 index 2c6d92d..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FactAnaesthesiaMethodDB.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FactAnaesthesiaMethodDB - { - public void Add(Model.FactAnaesthesiaMethod FactAnaesthesiaMethodObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [FactAnaesthesiaMethod]("); - strSql.Append("PatientId,ApplyId,AnaesthesiaMethodId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+FactAnaesthesiaMethodObj.PatientId+","); - strSql.Append(""+FactAnaesthesiaMethodObj.ApplyId+","); - strSql.Append(""+FactAnaesthesiaMethodObj.AnaesthesiaMethodId+","); - strSql.Append("'"+FactAnaesthesiaMethodObj.OperatorNo+"',"); - strSql.Append("'"+FactAnaesthesiaMethodObj.OperatorName+"',"); - strSql.Append("'"+FactAnaesthesiaMethodObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.FactAnaesthesiaMethod FactAnaesthesiaMethodObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update FactAnaesthesiaMethod set "); - strSql.Append("PatientId="+FactAnaesthesiaMethodObj.PatientId+","); - strSql.Append("ApplyId="+FactAnaesthesiaMethodObj.ApplyId+","); - strSql.Append("AnaesthesiaMethodId="+FactAnaesthesiaMethodObj.AnaesthesiaMethodId+","); - strSql.Append("OperatorNo='"+FactAnaesthesiaMethodObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+FactAnaesthesiaMethodObj.OperatorName+"',"); - strSql.Append("OperateDate='"+FactAnaesthesiaMethodObj.OperateDate+"'"); - strSql.Append(" where Id="+FactAnaesthesiaMethodObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int PatientId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete FactAnaesthesiaMethod "); - strSql.Append(" where PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.FactAnaesthesiaMethod GetModel(int Id) - { - Model.FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new Model.FactAnaesthesiaMethod(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,PatientId,ApplyId,AnaesthesiaMethodId,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from FactAnaesthesiaMethod "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - FactAnaesthesiaMethodObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") - { - FactAnaesthesiaMethodObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - FactAnaesthesiaMethodObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["AnaesthesiaMethodId"].ToString()!="") - { - FactAnaesthesiaMethodObj.AnaesthesiaMethodId = int.Parse(ds.Tables[0].Rows[0]["AnaesthesiaMethodId"].ToString()); - } - FactAnaesthesiaMethodObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - FactAnaesthesiaMethodObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - FactAnaesthesiaMethodObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return FactAnaesthesiaMethodObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[PatientId],[ApplyId],[AnaesthesiaMethodId],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM FactAnaesthesiaMethod "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetFactAnaesthesiaMethodIdList(int PatientId) - { - List AnaesthesiaMethodIdList = new List(); - string strSql = "SELECT AnaesthesiaMethodId FROM FactAnaesthesiaMethod WHERE PatientId='" + PatientId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - AnaesthesiaMethodIdList.Add(int.Parse(dt.Rows[i]["AnaesthesiaMethodId"].ToString())); - - } - return AnaesthesiaMethodIdList; - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FactDiagnoseInfoDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FactDiagnoseInfoDB.cs deleted file mode 100644 index 70513c0..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FactDiagnoseInfoDB.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FactDiagnoseInfoDB - { - public void Add(Model.FactDiagnoseInfo FactDiagnoseInfoObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [FactDiagnoseInfo]("); - strSql.Append("PatientId,ApplyId,DiagnoseId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+FactDiagnoseInfoObj.PatientId+","); - strSql.Append(""+FactDiagnoseInfoObj.ApplyId+","); - strSql.Append(""+FactDiagnoseInfoObj.DiagnoseId+","); - strSql.Append("'"+FactDiagnoseInfoObj.OperatorNo+"',"); - strSql.Append("'"+FactDiagnoseInfoObj.OperatorName+"',"); - strSql.Append("'"+FactDiagnoseInfoObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int PatientId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete FactDiagnoseInfo "); - strSql.Append(" where PatientId="+PatientId+"" ); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.FactDiagnoseInfo GetModel(int Id) - { - Model.FactDiagnoseInfo FactDiagnoseInfoObj = new Model.FactDiagnoseInfo(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,PatientId,ApplyId,DiagnoseId,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from FactDiagnoseInfo "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - FactDiagnoseInfoObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") - { - FactDiagnoseInfoObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - FactDiagnoseInfoObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["DiagnoseId"].ToString()!="") - { - FactDiagnoseInfoObj.DiagnoseId = int.Parse(ds.Tables[0].Rows[0]["DiagnoseId"].ToString()); - } - FactDiagnoseInfoObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - FactDiagnoseInfoObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - FactDiagnoseInfoObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return FactDiagnoseInfoObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[PatientId],[ApplyId],[DiagnoseId],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM FactDiagnoseInfo "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetFactDiagnoseInfoIdList(int PatientId) - { - List DiagnoseIdList = new List(); - string strSql = "SELECT DiagnoseId FROM FactDiagnoseInfo WHERE PatientId='" + PatientId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - DiagnoseIdList.Add(int.Parse(dt.Rows[i]["DiagnoseId"].ToString())); - - } - return DiagnoseIdList; - } - - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationBodyPositionDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationBodyPositionDB.cs deleted file mode 100644 index da613b8..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationBodyPositionDB.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FactOperationBodyPositionDB - { - public void Add(Model.FactOperationBodyPosition FactOperationBodyPositionObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [FactOperationBodyPosition]("); - strSql.Append("PatientId,ApplyId,OperationBodyPositionId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+FactOperationBodyPositionObj.PatientId+","); - strSql.Append(""+FactOperationBodyPositionObj.ApplyId+","); - strSql.Append(""+FactOperationBodyPositionObj.OperationBodyPositionId+","); - strSql.Append("'"+FactOperationBodyPositionObj.OperatorNo+"',"); - strSql.Append("'"+FactOperationBodyPositionObj.OperatorName+"',"); - strSql.Append("'"+FactOperationBodyPositionObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int PatientId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete FactOperationBodyPosition "); - strSql.Append(" where PatientId="+PatientId+"" ); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.FactOperationBodyPosition GetModel(int Id) - { - StringBuilder strSql=new StringBuilder(); - Model.FactOperationBodyPosition FactOperationBodyPositionObj = new Model.FactOperationBodyPosition(); - strSql.Append("select "); - strSql.Append("Id,PatientId,ApplyId,OperationBodyPositionId,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from FactOperationBodyPosition "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - FactOperationBodyPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") - { - FactOperationBodyPositionObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - FactOperationBodyPositionObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["OperationBodyPositionId"].ToString()!="") - { - FactOperationBodyPositionObj.OperationBodyPositionId = int.Parse(ds.Tables[0].Rows[0]["OperationBodyPositionId"].ToString()); - } - FactOperationBodyPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - FactOperationBodyPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - FactOperationBodyPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return FactOperationBodyPositionObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[PatientId],[ApplyId],[OperationBodyPositionId],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM FactOperationBodyPosition "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetFactOperationBodyPositionIdList(int PatientId) - { - List FactOperationBodyPositionIdList = new List(); - string strSql = "SELECT OperationBodyPositionId FROM FactOperationBodyPosition WHERE PatientId='" + PatientId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - FactOperationBodyPositionIdList.Add(int.Parse(dt.Rows[i]["OperationBodyPositionId"].ToString())); - - } - return FactOperationBodyPositionIdList; - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationCutTypeDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationCutTypeDB.cs deleted file mode 100644 index 955472a..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationCutTypeDB.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FactOperationCutTypeDB - { - public void Add(Model.FactOperationCutType FactOperationCutTypeObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [FactOperationCutType]("); - strSql.Append("PatientId,ApplyId,OperationCutTypeId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+FactOperationCutTypeObj.PatientId+","); - strSql.Append(""+FactOperationCutTypeObj.ApplyId+","); - strSql.Append(""+FactOperationCutTypeObj.OperationCutTypeId+","); - strSql.Append("'"+FactOperationCutTypeObj.OperatorNo+"',"); - strSql.Append("'"+FactOperationCutTypeObj.OperatorName+"',"); - strSql.Append("'"+FactOperationCutTypeObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void Delete(int PatientId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete FactOperationCutType "); - strSql.Append(" where PatientId="+PatientId+"" ); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public Model.FactOperationCutType GetModel(int Id) - { - Model.FactOperationCutType FactOperationCutTypeObj = new Model.FactOperationCutType(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,PatientId,ApplyId,OperationCutTypeId,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from FactOperationCutType "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - FactOperationCutTypeObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") - { - FactOperationCutTypeObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - FactOperationCutTypeObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["OperationCutTypeId"].ToString()!="") - { - FactOperationCutTypeObj.OperationCutTypeId = int.Parse(ds.Tables[0].Rows[0]["OperationCutTypeId"].ToString()); - } - FactOperationCutTypeObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - FactOperationCutTypeObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - FactOperationCutTypeObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return FactOperationCutTypeObj; - } - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[PatientId],[ApplyId],[OperationCutTypeId],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM FactOperationCutType "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetFactOperationCutTypeIdList(int PatientId) - { - List FactOperationCutTypeIdList = new List(); - string strSql = "SELECT OperationCutTypeId FROM FactOperationCutType WHERE PatientId='" + PatientId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - FactOperationCutTypeIdList.Add(int.Parse(dt.Rows[i]["OperationCutTypeId"].ToString())); - - } - return FactOperationCutTypeIdList; - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationInfoDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationInfoDB.cs deleted file mode 100644 index af9a463..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationInfoDB.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FactOperationInfoDB - { - public void Add(Model.FactOperationInfo FactOperationInfoObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [FactOperationInfo]("); - strSql.Append("PatientId,ApplyId,OperationId,OperatorNo,OperatorName,OperateDate,OperationName,LeftRemark,RightRemark"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("" + FactOperationInfoObj.PatientId + ","); - strSql.Append("" + FactOperationInfoObj.ApplyId + ","); - strSql.Append("" + FactOperationInfoObj.OperationId + ","); - strSql.Append("'" + FactOperationInfoObj.OperatorNo + "',"); - strSql.Append("'" + FactOperationInfoObj.OperatorName + "',"); - strSql.Append("'" + FactOperationInfoObj.OperateDate + "',"); - strSql.Append("'" + FactOperationInfoObj.OperationName + "',"); - strSql.Append("'" + FactOperationInfoObj.LeftRemark + "',"); - strSql.Append("'" + FactOperationInfoObj.RightRemark + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int PatientId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete FactOperationInfo "); - strSql.Append(" where PatientId="+PatientId+"" ); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.FactOperationInfo GetModel(int Id) - { - Model.FactOperationInfo FactOperationInfoObj = new Model.FactOperationInfo(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select * from FactOperationInfo "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - FactOperationInfoObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") - { - FactOperationInfoObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - FactOperationInfoObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["OperationId"].ToString()!="") - { - FactOperationInfoObj.OperationId = int.Parse(ds.Tables[0].Rows[0]["OperationId"].ToString()); - } - FactOperationInfoObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - FactOperationInfoObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - FactOperationInfoObj.OperationName = ds.Tables[0].Rows[0]["OperationName"].ToString(); - FactOperationInfoObj.LeftRemark = ds.Tables[0].Rows[0]["LeftRemark"].ToString(); - FactOperationInfoObj.RightRemark = ds.Tables[0].Rows[0]["RightRemark"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - FactOperationInfoObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return FactOperationInfoObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select * "); - strSql.Append(" FROM FactOperationInfo "); - if(strWhere.Trim()!="") - { - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetFactOperationInfoIdList(int PatientId) - { - List OperationIdList = new List(); - string strSql = "SELECT OperationId FROM FactOperationInfo WHERE PatientId='" + PatientId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - OperationIdList.Add(int.Parse(dt.Rows[i]["OperationId"].ToString())); - - } - return OperationIdList; - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationPositionDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationPositionDB.cs deleted file mode 100644 index ee10fba..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FactOperationPositionDB.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FactOperationPositionDB - { - public void Add(Model.FactOperationPosition FactOperationPositionObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [FactOperationPosition]("); - strSql.Append("PatientId,ApplyId,OperationPositionId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+FactOperationPositionObj.PatientId+","); - strSql.Append(""+FactOperationPositionObj.ApplyId+","); - strSql.Append(""+FactOperationPositionObj.OperationPositionId+","); - strSql.Append("'"+FactOperationPositionObj.OperatorNo+"',"); - strSql.Append("'"+FactOperationPositionObj.OperatorName+"',"); - strSql.Append("'"+FactOperationPositionObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void Delete(int PatientId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete FactOperationPosition "); - strSql.Append(" where PatientId="+PatientId+"" ); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public Model.FactOperationPosition GetModel(int Id) - { - Model.FactOperationPosition FactOperationPositionObj = new Model.FactOperationPosition(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,PatientId,ApplyId,OperationPositionId,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from FactOperationPosition "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - FactOperationPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") - { - FactOperationPositionObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - FactOperationPositionObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["OperationPositionId"].ToString()!="") - { - FactOperationPositionObj.OperationPositionId = int.Parse(ds.Tables[0].Rows[0]["OperationPositionId"].ToString()); - } - FactOperationPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - FactOperationPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - FactOperationPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return FactOperationPositionObj; - } - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[PatientId],[ApplyId],[OperationPositionId],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM FactOperationPosition "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetFactOperationPositionIdList(int PatientId) - { - List FactOperationPositionIdList = new List(); - string strSql = "SELECT OperationPositionId FROM FactOperationPosition WHERE PatientId='" + PatientId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - FactOperationPositionIdList.Add(int.Parse(dt.Rows[i]["OperationPositionId"].ToString())); - - } - return FactOperationPositionIdList; - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FactPersonDutyDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FactPersonDutyDB.cs deleted file mode 100644 index 67ba7e0..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FactPersonDutyDB.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FactPersonDutyDB - { - public void Add(Model.FactPersonDuty FactPersonDutyObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [FactPersonDuty]("); - strSql.Append("PatientId,ApplyId,PersonDutyId,PersonId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+FactPersonDutyObj.PatientId+","); - strSql.Append(""+FactPersonDutyObj.ApplyId+","); - strSql.Append(""+FactPersonDutyObj.PersonDutyId+","); - strSql.Append(""+FactPersonDutyObj.PersonId+","); - strSql.Append("'"+FactPersonDutyObj.OperatorNo+"',"); - strSql.Append("'"+FactPersonDutyObj.OperatorName+"',"); - strSql.Append("'"+FactPersonDutyObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int PatientId, int PersonDutyId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete FactPersonDuty "); - strSql.Append(" where PatientId=" + PatientId + " and PersonDutyId=" + PersonDutyId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.FactPersonDuty GetModel(int Id) - { - Model.FactPersonDuty FactPersonDutyObj = new Model.FactPersonDuty(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,PatientId,ApplyId,PersonDutyId,PersonId,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from FactPersonDuty "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - FactPersonDutyObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") - { - FactPersonDutyObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - FactPersonDutyObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["PersonDutyId"].ToString()!="") - { - FactPersonDutyObj.PersonDutyId = int.Parse(ds.Tables[0].Rows[0]["PersonDutyId"].ToString()); - } - if(ds.Tables[0].Rows[0]["PersonId"].ToString()!="") - { - FactPersonDutyObj.PersonId = int.Parse(ds.Tables[0].Rows[0]["PersonId"].ToString()); - } - FactPersonDutyObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - FactPersonDutyObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - FactPersonDutyObj.OperateDate=DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return FactPersonDutyObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[PatientId],[ApplyId],[PersonDutyId],[PersonId],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM FactPersonDuty "); - if(strWhere.Trim()!="") - { - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strWhere.ToString()); - } - - public List GetPersonIdList(int PatientId, int PersonDutyId) - { - List PersonIdList = new List(); - string strSql = "SELECT PersonId FROM FactPersonDuty WHERE PatientId=" + PatientId + " AND PersonDutyId =" + PersonDutyId + ""; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - for (int i = 0; i < dt.Rows.Count; i++) - { - PersonIdList.Add(int.Parse(dt.Rows[i]["PersonId"].ToString())); - } - - return PersonIdList; - - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/FillAnasRecordBillDataDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/FillAnasRecordBillDataDB.cs deleted file mode 100644 index bb08c11..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/FillAnasRecordBillDataDB.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class FillAnasRecordBillDataDB - { - public DataTable FillDrugData(int PatientId, int DrugTypeId) - { - string strSql = " SELECT fd.Id,d.Id as DrugsId, d.Name AS DrugName ,fd.IsContinue,fd.Dosage,fd.DosageUnit,fd.DrugBeginTime, fd.DrugEndTime,fd.DrugChannel,fd.GiveDrugType,fd.Remark,d.DrugKind,[Density],[DensityUnit],[Velocity],[VelocityUnit],[BloodType] ,fd.[OperatorNo],fd.[OperatorName],fd.[OperateDate],fd.ParentId FROM FactDrug fd " + - "LEFT JOIN Drugs d ON d.Id = fd.DrugId " + - "WHERE fd.PatientId=" + PatientId + " AND fd.DrugTypeId=" + DrugTypeId + " "; - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable FillOutFluid(int PatientId, int DrugTypeId) - { - string strSql = "SELECT fol.Id, fol.OutputLiquidsId,ol.Name AS OutputLiquidsName, fol.BeginTime, fol.EndTime, fol.Dosage, fol.DosageUnit,fol.Remark " + - "FROM FactOutputLiquids fol " + - "LEFT JOIN OutputLiquids ol ON ol.Id = fol.OutputLiquidsId " + - "WHERE fol.PatientId=" + PatientId + " AND fol.OutputLiquidsTypeId=" + DrugTypeId + " "; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DateTime GetMaxTime(int PatientId, int TypeId) - { - string strSql = "SELECT ISNULL(MAX(A.MaxTime),GETDATE()) MaxTime FROM ( " + - "SELECT fd.DrugEndTime AS MaxTime FROM FactDrug fd WHERE fd.DrugTypeId=" + TypeId + " and fd.PatientId=" + PatientId + " " + - "UNION ALL " + - "SELECT fe.EventEndTime AS MaxTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE fe.EventTypeId=" + TypeId + " and fe.PatientId=" + PatientId + " " + - "UNION ALL " + - "SELECT fol.EndTime AS MaxTime FROM FactOutputLiquids fol WHERE fol.OutputLiquidsTypeId=" + TypeId + " and fol.PatientId=" + PatientId + " )A "; - - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - return DateTime.Parse(dt.Rows[0]["MaxTime"].ToString()); - } - public int GetDataCount(int RecorId,int PatientId, int TypeId) - { - string strSql = "SELECT SUM(A.RowCounts) AS RowCounts FROM ( " + - "SELECT COUNT(*) AS RowCounts FROM FactDrug fd WHERE fd.DrugTypeId =" + TypeId + " and fd.PatientId=" + PatientId + " UNION ALL " + - "SELECT COUNT(*) AS RowCounts FROM FactEvents fe WHERE fe.EventTypeId=" + TypeId + " and fe.PatientId=" + PatientId + " and EventId<>7 UNION ALL " + - "SELECT COUNT(*) AS RowCounts FROM FactOutputLiquids fol WHERE OutputLiquidsTypeId=" + TypeId + " and fol.PatientId=" + PatientId + " UNION ALL " + - "SELECT COUNT(*) AS RowCounts FROM FactBloodGasAnalysis fol WHERE OperationRecordId=" + RecorId + " )A "; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - return int.Parse(dt.Rows[0]["RowCounts"].ToString()); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/OperationRecordDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/OperationRecordDB.cs deleted file mode 100644 index 7e5511c..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/OperationRecordDB.cs +++ /dev/null @@ -1,243 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class OperationRecordDB - { - public int AddTitleTime(int PatientId, int ApplyId, int RecoverId, string TableColumnName, DateTime Time, int RoomId) - { - string strSql = "INSERT INTO OperationRecord(PatientId,OperationApplyId,RecoverId," + TableColumnName + ",OperatorNo,OperatorName,OperateDate,RoomId)" + - "VALUES (" + PatientId + "," + ApplyId + "," + RecoverId + ",'" + Time + "','" + AIMSExtension.PublicMethod.OperatorNo + "','" - + AIMSExtension.PublicMethod.OperatorName + "','" + AIMSExtension.PublicMethod.SystemDate() + "','" + RoomId + "');select @@identity "; - return Convert.ToInt32(HelperDB.DbHelperSQL.ExecNonQuery(strSql)); - ; - } - - public void UpdateTitleTime(int PatientId, string TableColumnName, DateTime Time) - { - string strSql = "Update OperationRecord Set " + TableColumnName + "='" + Time.ToString("yyyy-MM-dd HH:mm:ss") + - "',OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + - "',OperatorName='" + AIMSExtension.PublicMethod.OperatorName + "' WHERE PatientId=" + PatientId + ""; - HelperDB.DbHelperSQL.ExecNonQuery(strSql); - } - - public Model.TitleTime GetTitleTime(int PatientId, int RecoverId) - { - Model.TitleTime TitleTimeObj = new Model.TitleTime(); - string strSql = "SELECT OperationApplyId,ISNULL((SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE fe.EventTypeId=1 and e.Name='入室' and PatientId=" + PatientId + " ),getdate()) as InRoomTime, OutRoomTime, OperationBeginTime,OperationEndTime " + - "FROM OperationRecord WHERE PatientId='" + PatientId + "' and RecoverId='" + RecoverId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - if (dt.Rows[0]["OperationApplyId"].ToString() != "") - { - TitleTimeObj.OperationApplyId = int.Parse(dt.Rows[0]["OperationApplyId"].ToString()); - } - - if (dt.Rows[0]["InRoomTime"].ToString() != "") - { - TitleTimeObj.InRoomTime = DateTime.Parse(DateTime.Parse(dt.Rows[0]["InRoomTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")); - } - - if (dt.Rows[0]["OutRoomTime"].ToString() != "") - { - TitleTimeObj.OutRoomTime = DateTime.Parse(dt.Rows[0]["OutRoomTime"].ToString()); - } - if (dt.Rows[0]["OperationBeginTime"].ToString() != "") - { - TitleTimeObj.OperationBeginTime = DateTime.Parse(dt.Rows[0]["OperationBeginTime"].ToString()); - } - if (dt.Rows[0]["OperationEndTime"].ToString() != "") - { - TitleTimeObj.OperationEndTime = DateTime.Parse(dt.Rows[0]["OperationEndTime"].ToString()); - } - - } - return TitleTimeObj; - } - - public void Update(Model.OperationRecord OperationRecordObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update OperationRecord set "); - strSql.Append("OperationLevelId=" + OperationRecordObj.OperationLevelId + ","); - strSql.Append("OpeAfterMode='" + OperationRecordObj.OpeAfterMode + "',"); - strSql.Append("SpecialSituation='" + OperationRecordObj.SpecialSituation + "',"); - strSql.Append("PunctureBodyPosition='" + OperationRecordObj.PunctureBodyPosition + "',"); - strSql.Append("PuncturePosition='" + OperationRecordObj.PuncturePosition + "',"); - strSql.Append("CatheterDepth='" + OperationRecordObj.CatheterDepth + "',"); - strSql.Append("NeedleSize='" + OperationRecordObj.NeedleSize + "',"); - strSql.Append("NeedleDirection='" + OperationRecordObj.NeedleDirection + "',"); - strSql.Append("AnaesthesiaPlane='" + OperationRecordObj.AnaesthesiaPlane + "',"); - strSql.Append("AnaesthesiaEffect='" + OperationRecordObj.AnaesthesiaEffect + "',"); - strSql.Append("CannulaOrLaryngealMaskType='" + OperationRecordObj.CannulaOrLaryngealMaskType + "',"); - strSql.Append("TubeNumber='" + OperationRecordObj.TubeNumber + "',"); - strSql.Append("Depth='" + OperationRecordObj.Depth + "',"); - strSql.Append("TracheaInner=" + OperationRecordObj.TracheaInner + ","); - strSql.Append("BronchialInner=" + OperationRecordObj.BronchialInner + ","); - strSql.Append("FastAnaesthesia=" + OperationRecordObj.FastAnaesthesia + ","); - strSql.Append("PlaneAnaesthesia=" + OperationRecordObj.PlaneAnaesthesia + ","); - strSql.Append("Mouth=" + OperationRecordObj.Mouth + ","); - strSql.Append("NoseLeft=" + OperationRecordObj.NoseLeft + ","); - strSql.Append("NoseRight=" + OperationRecordObj.NoseRight + ","); - strSql.Append("Photopic=" + OperationRecordObj.Photopic + ","); - strSql.Append("Cuff=" + OperationRecordObj.Cuff + ","); - strSql.Append("StopperFabric=" + OperationRecordObj.StopperFabric + ","); - strSql.Append("Remarks='" + OperationRecordObj.Remarks + "',"); - strSql.Append("OperatorNo='" + OperationRecordObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + OperationRecordObj.OperatorName + "',"); - strSql.Append("OperateDate='" + OperationRecordObj.OperateDate + "'"); - strSql.Append(" where PatientId=" + OperationRecordObj.PatientId + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.OperationRecord GetModel(int PatientId) - { - Model.OperationRecord OperationRecordObj = new Model.OperationRecord(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,PatientId,OperationApplyId,State,OperationLevelId,OpeAfterMode,SpecialSituation,PunctureBodyPosition,PuncturePosition,CatheterDepth,NeedleSize,NeedleDirection,AnaesthesiaPlane,AnaesthesiaEffect,CannulaOrLaryngealMaskType,TubeNumber,Depth,TracheaInner,BronchialInner,FastAnaesthesia,PlaneAnaesthesia,Mouth,NoseLeft,NoseRight,Photopic,Cuff,StopperFabric,Remarks,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OperationRecord "); - strSql.Append(" where PatientId=" + PatientId + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - OperationRecordObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if (ds.Tables[0].Rows[0]["PatientId"].ToString() != "") - { - OperationRecordObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); - } - if (ds.Tables[0].Rows[0]["OperationApplyId"].ToString() != "") - { - OperationRecordObj.OperationApplyId = int.Parse(ds.Tables[0].Rows[0]["OperationApplyId"].ToString()); - } - if (ds.Tables[0].Rows[0]["OperationLevelId"].ToString() != "") - { - OperationRecordObj.OperationLevelId = int.Parse(ds.Tables[0].Rows[0]["OperationLevelId"].ToString()); - } - OperationRecordObj.OpeAfterMode = ds.Tables[0].Rows[0]["OpeAfterMode"].ToString(); - OperationRecordObj.SpecialSituation = ds.Tables[0].Rows[0]["SpecialSituation"].ToString(); - OperationRecordObj.PunctureBodyPosition = ds.Tables[0].Rows[0]["PunctureBodyPosition"].ToString(); - OperationRecordObj.PuncturePosition = ds.Tables[0].Rows[0]["PuncturePosition"].ToString(); - OperationRecordObj.CatheterDepth = ds.Tables[0].Rows[0]["CatheterDepth"].ToString(); - OperationRecordObj.NeedleSize = ds.Tables[0].Rows[0]["NeedleSize"].ToString(); - OperationRecordObj.NeedleDirection = ds.Tables[0].Rows[0]["NeedleDirection"].ToString(); - OperationRecordObj.AnaesthesiaPlane = ds.Tables[0].Rows[0]["AnaesthesiaPlane"].ToString(); - OperationRecordObj.AnaesthesiaEffect = ds.Tables[0].Rows[0]["AnaesthesiaEffect"].ToString(); - OperationRecordObj.CannulaOrLaryngealMaskType = ds.Tables[0].Rows[0]["CannulaOrLaryngealMaskType"].ToString(); - OperationRecordObj.TubeNumber = ds.Tables[0].Rows[0]["TubeNumber"].ToString(); - OperationRecordObj.Depth = ds.Tables[0].Rows[0]["Depth"].ToString(); - if (ds.Tables[0].Rows[0]["TracheaInner"].ToString() != "") - { - OperationRecordObj.TracheaInner = int.Parse(ds.Tables[0].Rows[0]["TracheaInner"].ToString()); - } - if (ds.Tables[0].Rows[0]["BronchialInner"].ToString() != "") - { - OperationRecordObj.BronchialInner = int.Parse(ds.Tables[0].Rows[0]["BronchialInner"].ToString()); - } - if (ds.Tables[0].Rows[0]["FastAnaesthesia"].ToString() != "") - { - OperationRecordObj.FastAnaesthesia = int.Parse(ds.Tables[0].Rows[0]["FastAnaesthesia"].ToString()); - } - if (ds.Tables[0].Rows[0]["PlaneAnaesthesia"].ToString() != "") - { - OperationRecordObj.PlaneAnaesthesia = int.Parse(ds.Tables[0].Rows[0]["PlaneAnaesthesia"].ToString()); - } - if (ds.Tables[0].Rows[0]["Mouth"].ToString() != "") - { - OperationRecordObj.Mouth = int.Parse(ds.Tables[0].Rows[0]["Mouth"].ToString()); - } - if (ds.Tables[0].Rows[0]["NoseLeft"].ToString() != "") - { - OperationRecordObj.NoseLeft = int.Parse(ds.Tables[0].Rows[0]["NoseLeft"].ToString()); - } - if (ds.Tables[0].Rows[0]["NoseRight"].ToString() != "") - { - OperationRecordObj.NoseRight = int.Parse(ds.Tables[0].Rows[0]["NoseRight"].ToString()); - } - if (ds.Tables[0].Rows[0]["Photopic"].ToString() != "") - { - OperationRecordObj.Photopic = int.Parse(ds.Tables[0].Rows[0]["Photopic"].ToString()); - } - if (ds.Tables[0].Rows[0]["Cuff"].ToString() != "") - { - OperationRecordObj.Cuff = int.Parse(ds.Tables[0].Rows[0]["Cuff"].ToString()); - } - if (ds.Tables[0].Rows[0]["StopperFabric"].ToString() != "") - { - OperationRecordObj.StopperFabric = int.Parse(ds.Tables[0].Rows[0]["StopperFabric"].ToString()); - } - OperationRecordObj.Remarks = ds.Tables[0].Rows[0]["Remarks"].ToString(); - OperationRecordObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationRecordObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - OperationRecordObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationRecordObj; - } - - public DataTable GetOperationDoingMainInfo(int PatientId, int TypeId) - { - string strSql = "SELECT od.Id,od.PatientId, od.ApplyId,(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='入室' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as InRoomTime," - + "(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='出室' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as OutRoomTime, " - + "(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='手术开始' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as OperationBeginTime, " - + "(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='手术结束' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as OperationEndTime, " + - "od.OperationLevelName, od.OpeAfterMode, od.SpecialSituation," + - "od.PunctureBodyPosition, od.PuncturePosition, od.CatheterDepth,od.NeedleSize, od.NeedleDirection, od.AnaesthesiaPlane," + - "od.AnaesthesiaEffect, od.DiagnoseInfoName, od.OperationInfoName,od.AnaesthesiaMethodName, od.OperationCutTypeName," + - "od.OperationBodyPositionName, od.OperationPositionName, od.OperationDoctor,od.Assistant, od.AnesthesiaDoctor, od.Nurse,od.Nurse2," + - "od.OperatorNo,od.OperatorName,od.OperateDate,od.Remarks,od.State,OperationDoctorId ,[AssistantId] ,[AnesthesiaDoctorId] ,[InstrumentNurseId],[TourNurseId],DiagnoseInfoId,OperationInfoId,AnaesthesiaMethodId,OrtherDoctor,OrtherDoctorId,OperationPositionId,OperationBodyPositionId,ASALevel,SpecialCase,Fasting,BloodType FROM V_OperationDoing od WHERE od.PatientId=" + PatientId + " and od.RecoverId='" + TypeId + "'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - - public void UpdateState(int PatientId, int TypeId, int State) - { - string strSql = "UPDATE OperationRecord SET " + (State == 1 ? " OutRoomTime=null, " : "") + " [State] = " + State + - ",OperatorNo = '" + AIMSExtension.PublicMethod.OperatorNo + - "',OperatorName = '" + AIMSExtension.PublicMethod.OperatorName + - "',OperateDate = '" + AIMSExtension.PublicMethod.SystemDate() + - "' WHERE PatientId=" + PatientId + " and RecoverId='" + TypeId + "'"; - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void DeleteOperationRecordData(int RecorId, int PatientId, int TypeId) - { - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactAnaesthesiaMethod WHERE PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactBloodGasAnalysis WHERE OperationRecordId=" + RecorId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDiagnoseInfo WHERE PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE DrugTypeId=" + TypeId + " and PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=" + TypeId + " and PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationBodyPosition WHERE PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationCutType WHERE PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationInfo WHERE PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationPosition WHERE PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE OutputLiquidsTypeId=" + TypeId + " and PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " and PersonDutyId=" + TypeId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecordInfo WHERE OperationRecordId=" + RecorId); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM PhysioData WHERE PatientId =" + RecorId); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE id=" + RecorId); - } - public void DeleteOperationRecorvreData(int PatientId, int TypeId) - { - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE DrugTypeId=" + TypeId + " and PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=" + TypeId + " and PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE OutputLiquidsTypeId=" + TypeId + " and PatientId=" + PatientId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " and PersonDutyId=" + TypeId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE id=" + PatientId + " and RecoverId=" + TypeId + ""); - } - public void DeleteEvent(int PatientId, int EventId) - { - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=1 and EventId =" + EventId + " and PatientId=" + PatientId + ""); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/DAL/SelectPatientDB.cs b/AIMS/OperationDoing/AnasRecordBill/DAL/SelectPatientDB.cs deleted file mode 100644 index f046a53..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/DAL/SelectPatientDB.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecordBill.DAL -{ - public class SelectPatient - { - public DataTable GetSelectPatientDataTable(DateTime BeginDate) - { - string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + - "of1.ApplyOperationInfoName, of1.OperationDoctor, " + - "of1.AnesthesiaDoctor,of1.OperationRoomId " + - "FROM V_OperationFront of1 WHERE of1.State in('已排程','已访视') and of1.PlanOperationTime>='" + BeginDate + "' AND of1.PlanOperationTime<'" + BeginDate.AddDays(1) + "'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetSelectPatientDataTable(DateTime BeginDate, string Room) - { - string strSql = "SELECT of1.ApplyId Id, of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + - "of1.ApplyOperationInfoName, of1.OperationDoctor, " + - "of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom " + - "FROM V_OperationFront of1 WHERE of1.State in('已审核','预排程','已排程','已访视') and of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + BeginDate.AddDays(1) + "'"; - if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate) - { - string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of1.ApplyOperationInfoName, of1.OperationDoctor, of1.AnesthesiaDoctor,of1.OperationRoomId,of2.State FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '手术中','手术结束') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate, string Room) - { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1"; - if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'"; - strSql += " order by [StateId] asc"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetRecoverPatientDataTable(DateTime BeginDate) - { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.OutRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '手术结束') and of2.OutRoomTime >= '" + BeginDate + "' AND of2.OutRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1 and of2.Id not in (select iD from OperationRecord where RecoverId<>1)"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetSelectPatientDataTable(DateTime BeginDate, DateTime EndDate, bool isLoginPerson, string person, bool isEnOpe) - { - string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + - "of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," + - "of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse " + - "FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' "; - if (isLoginPerson == true) strSql += " and AnesthesiaDoctor like '%" + person + "%'"; - if (isEnOpe == true) strSql += " and state ='手术结束'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetSelectPatientChart() - { - string strSql = "select CONVERT(nvarchar(7), InRoomTime,120) dat, SUM(ROUND((DATEDIFF(minute, OperationBeginTime, OperationEndTime)) / CONVERT(FLOAT, 60), 1)) AS DiffDate from V_OperationDoing group by CONVERT(nvarchar(7), InRoomTime, 120)"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetSelectPatientChart2() - { - string strSql = "select CONVERT(nvarchar(7), InRoomTime,120) dat,COUNT(*) con from V_OperationDoing group by CONVERT(nvarchar(7), InRoomTime,120) "; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/FillAnasReordBill.cs b/AIMS/OperationDoing/AnasRecordBill/FillAnasReordBill.cs index 6dc75fc..0b2d321 100644 --- a/AIMS/OperationDoing/AnasRecordBill/FillAnasReordBill.cs +++ b/AIMS/OperationDoing/AnasRecordBill/FillAnasReordBill.cs @@ -1,4 +1,5 @@ using AIMSBLL; +using AIMSModel; using DrawGraph; using HelperDB; using System; @@ -15,20 +16,20 @@ namespace AIMS.OperationDoing.AnasRecordBill { return _record; } - Model.TitleTime TitleTime = BLL.OperationRecord.GetTitleTime(PatientId, RecoverId); + TitleTime titleTime = BOperationRecord.GetTitleTime(PatientId, RecoverId); _record.PatientId = PatientId; - _record.OperationApplyId = TitleTime.OperationApplyId; - _record.InRoomTime = TitleTime.InRoomTime; - _record.OperationBeginTime = TitleTime.OperationBeginTime; - _record.OperationEndTime = TitleTime.OperationEndTime; - _record.OutRoomTime = TitleTime.OutRoomTime; + _record.OperationApplyId = titleTime.OperationApplyId; + _record.InRoomTime = titleTime.InRoomTime; + _record.OperationBeginTime = titleTime.OperationBeginTime; + _record.OperationEndTime = titleTime.OperationEndTime; + _record.OutRoomTime = titleTime.OutRoomTime; - DataTable OperationFrontdt = OperationFront.BLL.OperationApply.GetOperationFrontDataTableByPatientId(PatientId); + DataTable OperationFrontdt = BOperationApply.GetOperationFrontDataTableByPatientId(PatientId); if (OperationFrontdt.Rows.Count > 0) { - _record.DepartmentId = int.Parse( OperationFrontdt.Rows[0]["DepartmentId"].ToString()); + _record.DepartmentId = int.Parse(OperationFrontdt.Rows[0]["DepartmentId"].ToString()); _record.ApplyDepartmentName = OperationFrontdt.Rows[0]["ApplyDepName"].ToString() + " " + OperationFrontdt.Rows[0]["SickBed"].ToString(); - _record.ApplyDepName = OperationFrontdt.Rows[0]["ApplyDepName"].ToString() ; + _record.ApplyDepName = OperationFrontdt.Rows[0]["ApplyDepName"].ToString(); _record.EndemicArea = OperationFrontdt.Rows[0]["Illdistrict"].ToString(); _record.Bed = OperationFrontdt.Rows[0]["SickBed"].ToString(); _record.InHospitalNo = OperationFrontdt.Rows[0]["MdrecNo"].ToString(); @@ -48,7 +49,7 @@ namespace AIMS.OperationDoing.AnasRecordBill } - DataTable OperationDoingdt = BLL.OperationRecord.GetOperationDoingDataTableByPatientId(PatientId, RecoverId); + DataTable OperationDoingdt = BOperationRecord.GetOperationDoingDataTableByPatientId(PatientId, RecoverId); if (OperationDoingdt.Rows.Count > 0) { _record.Id = int.Parse(OperationDoingdt.Rows[0]["Id"].ToString().Trim()); @@ -96,7 +97,7 @@ namespace AIMS.OperationDoing.AnasRecordBill { //药品 _record.FactDrugList.Clear(); - DataTable DrugAllData = new DAL.FillAnasRecordBillDataDB().FillDrugData(PatientId, TypeId); + DataTable DrugAllData = BOperationRecord.FillDrugData(PatientId, TypeId); for (int i = 0; i < DrugAllData.Rows.Count; i++) { FactDrug FactDrug = new FactDrug(); @@ -186,7 +187,7 @@ namespace AIMS.OperationDoing.AnasRecordBill { //出量 _record.FactOutputLiquidsList.Clear(); - DataTable OutputLiquidsDistinct = new DAL.FillAnasRecordBillDataDB().FillOutFluid(PatientId, TypeId); + DataTable OutputLiquidsDistinct = BOperationRecord.FillOutFluid(PatientId, TypeId); for (int i = 0; i < OutputLiquidsDistinct.Rows.Count; i++) { diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/AddPhysioParam.cs b/AIMS/OperationDoing/AnasRecordBill/Model/AddPhysioParam.cs deleted file mode 100644 index 20690b1..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/AddPhysioParam.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class AddPhysioParam - { - public int Id { get; set; }//编号 - public string Name { get; set; } //名称 - public int yAisx { get; set; }//归属那条Y轴 - public string Color { get; set; } //线条颜色 - public string ImgPath { get; set; }//图片路径 - public double DecHighLimit { get; set; }//最高限制 - public double DecLowLimit { get; set; }//最低限制 - public int IsValid { get; set; }//是否有效 1有效 0无效 - public string OperatorNo { get; set; }//操作员编号 - public string OperatorName { get; set; }//操作员姓名 - public DateTime OperateDate { get; set; }//操作时间 - public int YAisx; - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/AnasRecordBillRemark.cs b/AIMS/OperationDoing/AnasRecordBill/Model/AnasRecordBillRemark.cs deleted file mode 100644 index 2e591c2..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/AnasRecordBillRemark.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class AnasRecordBillRemark - { - /// - /// 术后镇痛方式 - /// - public string OpeAfterModeStr = ""; - /// - /// 穿刺 - /// - public string PunctureStr = ""; - - /// - /// 插管 - /// - public string CannulaStr = ""; - - /// - /// 麻醉单备注 - /// - public string RemarksStr =""; - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/DistinctFactDrug.cs b/AIMS/OperationDoing/AnasRecordBill/Model/DistinctFactDrug.cs deleted file mode 100644 index d471c3f..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/DistinctFactDrug.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class DistinctFactDrug - { - public int PatientId; - public int DrugTypeId; - public int DrugId; - public string DrugName; - public string DosageUnit; - public List DrugItem = new List(); - } - - public class FactDrugItem - { - public int DrugId; - public DateTime DrugBeginTime; - public DateTime DrugEndTime; - public decimal Dosage; - public string DosageUnit; - public string DrugChannel; - public string GiveDrugType; - public string Remark; - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/FactAnaesthesiaMethod.cs b/AIMS/OperationDoing/AnasRecordBill/Model/FactAnaesthesiaMethod.cs deleted file mode 100644 index 281b326..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/FactAnaesthesiaMethod.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class FactAnaesthesiaMethod - { - private int _id; - private int _patientid; - private int _applyid; - private int _anaesthesiamethodid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int PatientId - { - set { _patientid = value; } - get { return _patientid; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public int AnaesthesiaMethodId - { - set { _anaesthesiamethodid = value; } - get { return _anaesthesiamethodid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/FactDiagnoseInfo.cs b/AIMS/OperationDoing/AnasRecordBill/Model/FactDiagnoseInfo.cs deleted file mode 100644 index 306221f..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/FactDiagnoseInfo.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class FactDiagnoseInfo - { - #region Model - private int _id; - private int _patientid; - private int _applyid; - private int _diagnoseid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int PatientId - { - set { _patientid = value; } - get { return _patientid; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public int DiagnoseId - { - set { _diagnoseid = value; } - get { return _diagnoseid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - #endregion Model - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationBodyPosition.cs b/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationBodyPosition.cs deleted file mode 100644 index d95294a..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationBodyPosition.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class FactOperationBodyPosition - { - private int _id; - private int _patientid; - private int _applyid; - private int _operationbodypositionid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int PatientId - { - set { _patientid = value; } - get { return _patientid; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public int OperationBodyPositionId - { - set { _operationbodypositionid = value; } - get { return _operationbodypositionid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationCutType.cs b/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationCutType.cs deleted file mode 100644 index 9a7ea9b..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationCutType.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class FactOperationCutType - { - private int _id; - private int _patientid; - private int _applyid; - private int _operationcuttypeid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int PatientId - { - set { _patientid = value; } - get { return _patientid; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public int OperationCutTypeId - { - set { _operationcuttypeid = value; } - get { return _operationcuttypeid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationInfo.cs b/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationInfo.cs deleted file mode 100644 index d404a0b..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationInfo.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class FactOperationInfo - { - #region Model - private int _id; - private int _patientid; - private int _applyid; - private int _operationid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - private string operationName; - private string leftRemark; - private string rightRemark; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int PatientId - { - set { _patientid = value; } - get { return _patientid; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public int OperationId - { - set { _operationid = value; } - get { return _operationid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - /// - /// - /// - public string OperationName - { - get { return operationName; } - set { operationName = value; } - } - /// - /// - /// - public string LeftRemark - { - get { return leftRemark; } - set { leftRemark = value; } - } - /// - /// - /// - public string RightRemark - { - get { return rightRemark; } - set { rightRemark = value; } - } - #endregion Model - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationPosition.cs b/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationPosition.cs deleted file mode 100644 index a40b0e7..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/FactOperationPosition.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class FactOperationPosition - { - private int _id; - private int _patientid; - private int _applyid; - private int _operationpositionid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int PatientId - { - set { _patientid = value; } - get { return _patientid; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public int OperationPositionId - { - set { _operationpositionid = value; } - get { return _operationpositionid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/FactPersonDuty.cs b/AIMS/OperationDoing/AnasRecordBill/Model/FactPersonDuty.cs deleted file mode 100644 index cf304bb..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/FactPersonDuty.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class FactPersonDuty - { - private int _id; - private int _patientid; - private int _applyid; - private int _persondutyid; - private int _personid; - private string _operatorno; - private string _operatorname; - private DateTime? _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int PatientId - { - set { _patientid = value; } - get { return _patientid; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public int PersonDutyId - { - set { _persondutyid = value; } - get { return _persondutyid; } - } - /// - /// - /// - public int PersonId - { - set { _personid = value; } - get { return _personid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime? OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/OperationRecord.cs b/AIMS/OperationDoing/AnasRecordBill/Model/OperationRecord.cs deleted file mode 100644 index 3d2b86a..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/OperationRecord.cs +++ /dev/null @@ -1,283 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class OperationRecord - { - #region Model - private int _id; - private int _patientid; - private int _operationapplyid; - private int _operationlevelid; - private string _opeaftermode; - private string _specialsituation; - private string _puncturebodyposition; - private string _punctureposition; - private string _catheterdepth; - private string _needlesize; - private string _needledirection; - private string _anaesthesiaplane; - private string _anaesthesiaeffect; - private string _cannulaorlaryngealmasktype; - private string _tubenumber; - private string _depth; - private int _tracheainner; - private int _bronchialinner; - private int _fastanaesthesia; - private int _planeanaesthesia; - private int _mouth; - private int _noseleft; - private int _noseright; - private int _photopic; - private int _cuff; - private int _stopperfabric; - private string _remarks; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set{ _id=value;} - get{return _id;} - } - /// - /// - /// - public int PatientId - { - set{ _patientid=value;} - get{return _patientid;} - } - /// - /// - /// - public int OperationApplyId - { - set{ _operationapplyid=value;} - get{return _operationapplyid;} - } - /// - /// 手术分级 - /// - public int OperationLevelId - { - set{ _operationlevelid=value;} - get{return _operationlevelid;} - } - /// - /// 术后镇痛方式 - /// - public string OpeAfterMode - { - set{ _opeaftermode=value;} - get{return _opeaftermode;} - } - /// - /// 特殊情况 - /// - public string SpecialSituation - { - set{ _specialsituation=value;} - get{return _specialsituation;} - } - /// - /// 穿刺体位 - /// - public string PunctureBodyPosition - { - set{ _puncturebodyposition=value;} - get{return _puncturebodyposition;} - } - /// - /// 穿刺部位 - /// - public string PuncturePosition - { - set{ _punctureposition=value;} - get{return _punctureposition;} - } - /// - /// 导管深度 - /// - public string CatheterDepth - { - set{ _catheterdepth=value;} - get{return _catheterdepth;} - } - /// - /// 针号 - /// - public string NeedleSize - { - set{ _needlesize=value;} - get{return _needlesize;} - } - /// - /// 针向 - /// - public string NeedleDirection - { - set{ _needledirection=value;} - get{return _needledirection;} - } - /// - /// 麻醉平面 - /// - public string AnaesthesiaPlane - { - set{ _anaesthesiaplane=value;} - get{return _anaesthesiaplane;} - } - /// - /// 麻醉效果 - /// - public string AnaesthesiaEffect - { - set{ _anaesthesiaeffect=value;} - get{return _anaesthesiaeffect;} - } - /// - /// - /// - public string CannulaOrLaryngealMaskType - { - set{ _cannulaorlaryngealmasktype=value;} - get{return _cannulaorlaryngealmasktype;} - } - /// - /// 管号 - /// - public string TubeNumber - { - set{ _tubenumber=value;} - get{return _tubenumber;} - } - /// - /// 深度 - /// - public string Depth - { - set{ _depth=value;} - get{return _depth;} - } - /// - /// 气管内 - /// - public int TracheaInner - { - set{ _tracheainner=value;} - get{return _tracheainner;} - } - /// - /// 支气管内 - /// - public int BronchialInner - { - set{ _bronchialinner=value;} - get{return _bronchialinner;} - } - /// - /// 快速麻醉 - /// - public int FastAnaesthesia - { - set{ _fastanaesthesia=value;} - get{return _fastanaesthesia;} - } - /// - /// 表面麻醉 - /// - public int PlaneAnaesthesia - { - set{ _planeanaesthesia=value;} - get{return _planeanaesthesia;} - } - /// - /// 经口 - /// - public int Mouth - { - set{ _mouth=value;} - get{return _mouth;} - } - /// - /// - /// - public int NoseLeft - { - set{ _noseleft=value;} - get{return _noseleft;} - } - /// - /// - /// - public int NoseRight - { - set{ _noseright=value;} - get{return _noseright;} - } - /// - /// 明视 - /// - public int Photopic - { - set{ _photopic=value;} - get{return _photopic;} - } - /// - /// 套囊 - /// - public int Cuff - { - set{ _cuff=value;} - get{return _cuff;} - } - /// - /// 塞布 - /// - public int StopperFabric - { - set{ _stopperfabric=value;} - get{return _stopperfabric;} - } - /// - /// - /// - public string Remarks - { - set{ _remarks=value;} - get{return _remarks;} - } - /// - /// - /// - public string OperatorNo - { - set{ _operatorno=value;} - get{return _operatorno;} - } - /// - /// - /// - public string OperatorName - { - set{ _operatorname=value;} - get{return _operatorname;} - } - /// - /// - /// - public DateTime OperateDate - { - set{ _operatedate=value;} - get{return _operatedate;} - } - #endregion Model - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/PhysioData.cs b/AIMS/OperationDoing/AnasRecordBill/Model/PhysioData.cs deleted file mode 100644 index 89b7a1d..0000000 --- a/AIMS/OperationDoing/AnasRecordBill/Model/PhysioData.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using DrawGraph; -using System.Windows.Forms; -using System.Drawing; - -namespace AIMS.OperationDoing.AnasRecordBill.Model -{ - public class PhysioData : PointPair - { - private int _Id; - private int _PhysioParamID; - private int _physiodatatype; - private int _PatientId; - private DateTime _RecordTime; - private Double _Value; - - #region 属性 - public int Id - { - get { return _Id; } - set { _Id = value; } - } - public int PhysioParamID - { - get { return _PhysioParamID; } - set { _PhysioParamID = value; } - } - public int PhysioDataType - { - get { return _physiodatatype; } - set { _physiodatatype = value; } - } - - public int PatientId - { - get { return _PatientId; } - set { _PatientId = value; } - } - public DateTime RecordTime - { - get { return _RecordTime; } - set - { - _RecordTime = value; - this.X = new XDate(value); - } - } - public Double Value - { - get { return this._Value; } - set - { - this._Value = value; - this.Y = value; - } - } - - #endregion - } -} diff --git a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBillNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBillNew.cs index d8eaed7..ec3e71c 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBillNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmAnasRecordBillNew.cs @@ -3,6 +3,7 @@ using AIMS.OperationFront.UI; using AIMS.PublicUI.UI; using AIMSBLL; using AIMSExtension; +using AIMSModel; using DevComponents.Editors.DateTimeAdv; using DrawGraph; using Newtonsoft.Json; @@ -122,7 +123,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { int pylWidth = 3; - PrintDocument pDoc = new PrintDocument(); + System.Drawing.Printing.PrintDocument pDoc = new System.Drawing.Printing.PrintDocument(); pDoc.DefaultPageSettings.Landscape = false; pDoc.OriginAtMargins = true; pDoc.DefaultPageSettings.Margins = new Margins(pylWidth, 0, 0, 0);//8, 0); @@ -244,7 +245,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI count = 0; int pylWidth = 3; - PrintDocument pDoc = new PrintDocument(); + System.Drawing.Printing.PrintDocument pDoc = new System.Drawing.Printing.PrintDocument(); pDoc.DefaultPageSettings.Landscape = false; pDoc.OriginAtMargins = true; pDoc.DefaultPageSettings.PrinterResolution.Kind = PrinterResolutionKind.High; @@ -772,8 +773,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI _record.OperationApplyId = ApplyId; _record.PatientId = PatientId; _record.RecoverId = RecoverId; - _record.Id = BLL.OperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, "InRoomTime", DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); - BLL.OperationRecord.UpdateState(PatientId, RecoverId, 1); + _record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, "InRoomTime", DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); + BOperationRecord.UpdateState(PatientId, RecoverId, 1); HelperDB.DbHelperSQL.CommitTrans(); //_record.currentPage = 1; ClearTimeText(); @@ -922,7 +923,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI MessageBox.Show("请选择患者!"); return; } - if (BLL.FillAnasRecordBillData.GetDataCount(_record.Id.Value, PatientId, RecoverId) > 0) + if (BOperationRecord.GetDataCount(_record.Id.Value, PatientId, RecoverId) > 0) { MessageBox.Show("清除数据在进行作废手术操作!"); return; @@ -933,9 +934,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { HelperDB.DbHelperSQL.BeginTrans(); - OperationFront.BLL.OperationApply.UpdateApplyState(ApplyId, 11); - //BLL.OperationRecord.DeleteOperationRecordData(PatientId, RecoverId); - BLL.OperationRecord.UpdateState(PatientId, 1, 5); + BOperationApply.UpdateApplyState(ApplyId, 11); + //BOperationRecord.DeleteOperationRecordData(PatientId, RecoverId); + BOperationRecord.UpdateState(PatientId, 1, 5); HelperDB.DbHelperSQL.CommitTrans(); //ClearData(); @@ -954,7 +955,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI MessageBox.Show("请选择患者!"); return; } - if (BLL.FillAnasRecordBillData.GetDataCount(_record.Id.Value, PatientId, RecoverId) > 0) + if (BOperationRecord.GetDataCount(_record.Id.Value, PatientId, RecoverId) > 0) { MessageBox.Show("清除数据在进行取消转入操作!"); return; @@ -964,8 +965,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI try { HelperDB.DbHelperSQL.BeginTrans(); - OperationFront.BLL.OperationApply.UpdateApplyState(ApplyId, 5); - BLL.OperationRecord.DeleteOperationRecordData(_record.Id.Value, PatientId, RecoverId); + BOperationApply.UpdateApplyState(ApplyId, 5); + BOperationRecord.DeleteOperationRecordData(_record.Id.Value, PatientId, RecoverId); HelperDB.DbHelperSQL.CommitTrans(); DisposeTimer(); @@ -1820,8 +1821,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } } _record.State = "手术结束"; - OperationFront.BLL.OperationApply.UpdateApplyState(ApplyId, 8); - BLL.OperationRecord.UpdateState(PatientId, 1, 2); + BOperationApply.UpdateApplyState(ApplyId, 8); + BOperationRecord.UpdateState(PatientId, 1, 2); //PublicMethod.WriteLog("结束转出手术: " + _record.Id); //TipBox.Hidden(true); diff --git a/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs index f1edd2a..a5bfeeb 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmFactDrugNew.cs @@ -165,7 +165,7 @@ namespace AIMS.PublicUI.UI _VelocityUnit.Insert(0, new BasicDictionary() { Id = -1, Name = "" }); _DensityUnit = BBasicDictionary.GetBasicDictionaryByName("浓度单位").SubItem; _DensityUnit.Insert(0, new BasicDictionary() { Id = -1, Name = "" }); - DataTable dt = DataDictionary.BLL.Drugs.GetDrugsDataTable(); + DataTable dt = BDrugs.GetDrugsDataTable(); FullCommonlyDrugs(dt, AnesPanel); } @@ -1260,7 +1260,7 @@ namespace AIMS.PublicUI.UI if (TabSelDrugs.SelectedTab.Name == "AnesTab") { panel = AnesPanel; - dt = DataDictionary.BLL.Drugs.GetDrugsDataTable(); + dt = BDrugs.GetDrugsDataTable(); } if (Superitem.Tag != null && Superitem.Tag.ToString() != "") { diff --git a/AIMS/OperationDoing/AnasRecordBill/frmFactOutputLiquids.cs b/AIMS/OperationDoing/AnasRecordBill/frmFactOutputLiquids.cs index 9f1332e..8407d41 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmFactOutputLiquids.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmFactOutputLiquids.cs @@ -28,13 +28,13 @@ namespace AIMS.PublicUI.UI rbSingle.Checked = true; - cboName.DataSource = DataDictionary.BLL.OutputLiquids.GetDataTable(); + cboName.DataSource = BOutputLiquids.GetDataTable(); cboName.DisplayMember = "Name"; cboName.ValueMember = "Id"; cboName.SelectedIndex = -1; - cboDosageUnit.DataSource = DrugManagement.BLL.DosageUnit.GetDataTable(1); + cboDosageUnit.DataSource = BDosageUnit.GetDataTable(1); cboDosageUnit.DisplayMember = "Name"; cboDosageUnit.ValueMember = "Id"; cboDosageUnit.SelectedIndex = -1; @@ -52,7 +52,7 @@ namespace AIMS.PublicUI.UI MessageBox.Show("剂量不能为空!"); return; } - if (OperationDoing.AnasRecordBill.BLL.OperationRecord.GetTitleTime(PatientId, OutputLiquidTypeId).InRoomTime > dtpBegin.Value) + if (BOperationRecord.GetTitleTime(PatientId, OutputLiquidTypeId).InRoomTime > dtpBegin.Value) { MessageBox.Show("不能早于入室时间!"); return; diff --git a/AIMS/OperationDoing/AnasRecordBill/frmOperationInfoNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmOperationInfoNew.cs index 693bfc2..348ab91 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmOperationInfoNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmOperationInfoNew.cs @@ -93,7 +93,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI cboOperationLevel.DisplayMember = "Name"; cboOperationLevel.ValueMember = "Id"; - cboOperationLevel.DataSource = DataDictionary.BLL.OperationLevel.GetDataTable("IsValid=1"); + cboOperationLevel.DataSource = BOperationLevel.GetDataTable("IsValid=1"); cboOperationLevel.SelectedIndex = -1; if (txtOperationCut.DataSource == null) BindBasicDictionaryToComboBox(txtOperationCut, "手术切口"); @@ -525,7 +525,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI foreach (int RowId in frmOperationDoctor.SelectPersonData) { - controlTextBox.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + controlTextBox.Text += BPerson.GetModel(RowId).Name + " ,"; } if (controlTextBox.Text != "") { @@ -1215,7 +1215,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI SelectAnaesthesiaMethodData = frmAnaesthesia.SelectAnaesthesiaMethodData; foreach (int RowId in frmAnaesthesia.SelectAnaesthesiaMethodData) { - txtAnaesthesiaMethod.Text += DataDictionary.BLL.AnaesthesiaMethod.GetModel(RowId).Name + " ,"; + txtAnaesthesiaMethod.Text += BAnaesthesiaMethod.GetModel(RowId).Name + " ,"; } int idxStart = txtAnaesthesiaMethod.Text.LastIndexOf(" ,"); txtAnaesthesiaMethod.Text = txtAnaesthesiaMethod.Text.Substring(0, idxStart); diff --git a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew.cs b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew.cs index 2510887..f744241 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmSelectPatientNew.cs @@ -27,8 +27,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI private void frmSelectPatientNew_Load(object sender, EventArgs e) { - List rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); - rooms.Insert(0, new DataDictionary.Model.OperationRoom() { Id = -1, Name = "" }); + List rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); + rooms.Insert(0, new OperationRoom() { Id = -1, Name = "" }); cboRoom.DataSource = rooms; cboRoom.DisplayMember = "Name"; cboRoom.ValueMember = "Id"; @@ -65,7 +65,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI panel2.Visible = false; int i = 0, j = 0; - DataTable dt = OperationDoing.AnasRecordBill.BLL.SelectPatient.GetSelectPatientDataTable + DataTable dt = SelectPatient.GetSelectPatientDataTable (DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString()); foreach (DataRow dr in dt.Rows) { @@ -85,7 +85,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI if (i >= 5) break; } - DataTable dt2 = OperationDoing.AnasRecordBill.BLL.SelectPatient.GetRelieveLockingPatientDataTable + DataTable dt2 = SelectPatient.GetRelieveLockingPatientDataTable (DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString()); foreach (DataRow dr in dt2.Rows) { @@ -160,7 +160,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI opeapply.State = 4; opeapply.OperationRoomId = int.Parse(seleteRoom.RoomId); opeapply.PlanOperationTime = dtpSelectPatientTime.Value; - opeapply.PlanOrder = AIMS.OperationFront.BLL.OperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1; + opeapply.PlanOrder = BOperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1; BOperationApply.Update(opeapply); } } @@ -180,7 +180,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(RoomId); frmAnasRecord.State = AIMSExtension.EditState.ADD; - OperationDoing.AnasRecordBill.BLL.InRoom.UpdateApplyState(PatientId, applyId); //修改状态 + SelectPatient.UpdateApplyState(PatientId, applyId); //修改状态 if (isMainOpen == false) { @@ -231,7 +231,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { if (uc.buttonX2.Text == "取消手术") { - if (BLL.FillAnasRecordBillData.GetDataCount(RecorId, PatientId, 1) > 0) + if (BOperationRecord.GetDataCount(RecorId, PatientId, 1) > 0) { MessageBox.Show("清除数据在进行取消转入操作!"); return; @@ -241,8 +241,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI try { HelperDB.DbHelperSQL.BeginTrans(); - OperationFront.BLL.OperationApply.UpdateApplyState(applyId, 4); - BLL.OperationRecord.DeleteOperationRecordData(RecorId, PatientId, 1); + BOperationApply.UpdateApplyState(applyId, 4); + BOperationRecord.DeleteOperationRecordData(RecorId, PatientId, 1); HelperDB.DbHelperSQL.CommitTrans(); if (isMainOpen == false) @@ -267,9 +267,9 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI try { HelperDB.DbHelperSQL.BeginTrans(); - OperationFront.BLL.OperationApply.UpdateApplyState(applyId, 6); - BLL.OperationRecord.UpdateState(PatientId, 1, 1); - BLL.OperationRecord.DeleteEvent(PatientId, 8); + BOperationApply.UpdateApplyState(applyId, 6); + BOperationRecord.UpdateState(PatientId, 1, 1); + BOperationRecord.DeleteEvent(PatientId, 8); HelperDB.DbHelperSQL.CommitTrans(); AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecordBillNew frmAnasRecord = new frmAnasRecordBillNew(); @@ -326,7 +326,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI opeapply.State = 4; opeapply.OperationRoomId = int.Parse(seleteRoom.RoomId); opeapply.PlanOperationTime = dtpSelectPatientTime.Value; - opeapply.PlanOrder = AIMS.OperationFront.BLL.OperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1; + opeapply.PlanOrder = BOperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1; BOperationApply.Update(opeapply); } } diff --git a/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs b/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs index 2408eab..4d2b5c1 100644 --- a/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs +++ b/AIMS/OperationDoing/AnasRecordBill/frmSeleteRoom.cs @@ -1,4 +1,6 @@ -using DrawGraph; +using AIMSBLL; +using AIMSModel; +using DrawGraph; using System; using System.Collections.Generic; using System.ComponentModel; @@ -21,12 +23,12 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI private void frmDeletePhysio_Load(object sender, EventArgs e) { - List rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); + List rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); panel1.Controls.Clear(); int rows = 0; //循环加载CheckBox控件 - foreach (DataDictionary.Model.OperationRoom ade in rooms ) + foreach (OperationRoom ade in rooms ) { if (NowRoomId!=null && ade.Id.ToString() == NowRoomId) continue; RadioButton cb = new RadioButton (); @@ -47,7 +49,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI //判断CheckBox被选中时 if (((RadioButton)sender).Checked) { - RoomId = (((RadioButton)sender).Tag as DataDictionary.Model.OperationRoom).Id.ToString(); + RoomId = (((RadioButton)sender).Tag as OperationRoom).Id.ToString(); } } diff --git a/AIMS/OperationDoing/AnasRecoverBill/BLL/SelectPatient.cs b/AIMS/OperationDoing/AnasRecoverBill/BLL/SelectPatient.cs deleted file mode 100644 index e84b568..0000000 --- a/AIMS/OperationDoing/AnasRecoverBill/BLL/SelectPatient.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecoverBill.BLL -{ - public class SelectPatient - { - public static DataTable GetSelectPatientDataTable(DateTime BeginDate) - { - return new DAL.SelectPatientDB().GetSelectPatientDataTable(BeginDate); - } - - public static DataTable GetRecoverLockingPatientDataTable(DateTime BeginDate) - { - return new DAL.SelectPatientDB().GetRecoverLockingPatientDataTable(BeginDate); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecoverBill/DAL/SelectPatientDB.cs b/AIMS/OperationDoing/AnasRecoverBill/DAL/SelectPatientDB.cs deleted file mode 100644 index 8eab961..0000000 --- a/AIMS/OperationDoing/AnasRecoverBill/DAL/SelectPatientDB.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationDoing.AnasRecoverBill.DAL -{ - public class SelectPatientDB - { - public DataTable GetSelectPatientDataTable(DateTime BeginDate) - { - string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + - "or2.OperationInfoName AS ApplyOperationInfoName,or2.OperationDoctor,or2.AnesthesiaDoctor,of1.OperationRoomId " + - "FROM V_OperationFront of1 "+ - "LEFT JOIN V_OperationDoing or2 ON or2.PatientId =of1.PatientId " + - "WHERE of1.State ='手术结束' and or2.InRoomTime>='" + BeginDate + "' AND or2.InRoomTime<'" + BeginDate.AddDays(1) + "'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetRecoverLockingPatientDataTable(DateTime BeginDate) - { - string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom,(select OutRoomTime from OperationRecord where OperationRecord.RecoverId=1 and OperationRecord.PatientId=of2.PatientId) OutRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '麻醉恢复中') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=2 "; - strSql += " order by [StateId] asc"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMS/OperationDoing/AnasRecoverBill/Model/TitleTime.cs b/AIMS/OperationDoing/AnasRecoverBill/Model/TitleTime.cs deleted file mode 100644 index b0f4218..0000000 --- a/AIMS/OperationDoing/AnasRecoverBill/Model/TitleTime.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationDoing.AnasRecoverBill.Model -{ - public class TitleTime - { - private DateTime? _inroomtime; - private DateTime? _outroomtime; - - public DateTime? InRoomTime - { - set { _inroomtime = value; } - get { return _inroomtime; } - } - - public DateTime? OutRoomTime - { - set { _outroomtime = value; } - get { return _outroomtime; } - } - - } -} diff --git a/AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.cs b/AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.cs deleted file mode 100644 index 500a3e4..0000000 --- a/AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.cs +++ /dev/null @@ -1,1579 +0,0 @@ -using AIMS.DocManager; -using AIMS.OperationFront.UI; -using AIMSBLL; -using DevComponents.Editors.DateTimeAdv; -using DrawGraph; -using Newtonsoft.Json; -using AIMSExtension; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Drawing.Printing; -using System.Linq; -using System.Reflection; -using System.Windows.Forms; - -namespace AIMS.OperationDoing.AnasRecordBill.UI -{ - public partial class frmAnasRecoverBillNew : Form - { - public OperationRecord _record; - public TemplateManage templateManage; - public AIMSModel.OperationRoom NowRoom; - public int PatientId = 0; - public int ApplyId = 0; - public int RecoverId = 2; - private System.Windows.Forms.Timer timerGetTextCollectorData; - - public AIMSExtension.EditState State; - - public frmAnasRecoverBillNew() - { - InitializeComponent(); - #region 时间轴事件 - txtInRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); - txtOutRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); - txtAnaesthesiaEnd.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); - txtBG.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); - - txtInRoom.KeyPress += new KeyPressEventHandler(txtInRoom_KeyPress); - txtOutRoom.KeyPress += new KeyPressEventHandler(txtInRoom_KeyPress); - txtAnaesthesiaEnd.KeyPress += new KeyPressEventHandler(dateTimePicker_KeyPress); - txtBG.KeyPress += new KeyPressEventHandler(dateTimePicker_KeyPress); - - txtInRoom.LostFocus += new EventHandler(txtDateTime_LostFocus); - txtOutRoom.LostFocus += new EventHandler(txtDateTime_LostFocus); - txtAnaesthesiaEnd.LostFocus += new EventHandler(txtDateTime_LostFocus); - txtBG.LostFocus += new EventHandler(txtDateTime_LostFocus); - //txtInRoom.Enabled = false; - //txtOutRoom.Enabled = false; - //txtAnaesthesiaBegin.Enabled = false; - //txtAnaesthesiaEnd.Enabled = false; - //txtOperationBegin.Enabled = false; - //txtOperationEnd.Enabled = false; - #endregion - } - - private void frmAnasRecoverBillNew_Load(object sender, EventArgs e) - { - AIMSExtension.PublicMethod.SetLocalDateTime(); - labOperatorName.Text = "(" + AIMSExtension.PublicMethod.OperatorNo + ")" + " " + AIMSExtension.PublicMethod.OperatorName; - - DrawAnasReordBill.IniDrawAnasReordBill3(_record, zgcAnaesRecord, ref templateManage); //初始化麻醉记录单界面 - - //if (PatientId > 0 && State == AIMSExtension.EditState.BROWSE) - //{ - // btnSelectPatient.Enabled = false; - // btnCancelIn.Enabled = false; - // btnCancelOperation.Enabled = false; - // btnOutPrint.Enabled = false; - //} - - frmSelectPatient_FormClosed(null, null); - } - - - #region 打印 - public int printWidth = Convert.ToInt32(800 * 0.98); - public int printHeight = 1160; - private void pDoc_PrintPage(object sender, PrintPageEventArgs e) - { - try - { - - int zgcAnaesRecordWidth = zgcAnaesRecord.Size.Width; - int zgcAnaesRecordHeight = zgcAnaesRecord.Size.Height; - - //zgcAnaesRecord.Size = new Size((sender as PrintDocument).DefaultPageSettings.PaperSize.Width, (sender as PrintDocument).DefaultPageSettings.PaperSize.Height); - - printHeight = Convert.ToInt32(printWidth * 1.414) + 2; - zgcAnaesRecord.Size = new Size(printWidth, printHeight); - - MasterPane mPane = zgcAnaesRecord.MasterPane; //this.MasterPane; - mPane.Border.IsVisible = false; - //GraphPane cPane = mPane.PaneList[0]; //graphPane; - //cPane.Border.IsVisible = false; - - //当前窗体中的矩形区域大小 - RectangleF saveRect = mPane.Rect; - - templateManage.initChart(); - if (e != null) - mPane.Draw(e.Graphics); //在打印文档中画出MasterPane内容 - using (Graphics g = zgcAnaesRecord.CreateGraphics()) - { - mPane.ReSize(g, saveRect); - } - - zgcAnaesRecord.Size = new Size(zgcAnaesRecordWidth, zgcAnaesRecordHeight); - templateManage.initChart(); - - - } - catch (Exception ex) - { - Console.Write(ex.ToString()); - } - } - - private void plPrintBrowse_Click(object sender, EventArgs e) - { - PrintDocument pDoc = new PrintDocument(); - pDoc.DefaultPageSettings.Landscape = false; - pDoc.OriginAtMargins = true; - pDoc.DefaultPageSettings.PrinterResolution.Kind = PrinterResolutionKind.High; - pDoc.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0); - pDoc.PrintPage -= new PrintPageEventHandler(pDoc_PrintPage); - pDoc.PrintPage += new PrintPageEventHandler(pDoc_PrintPage); - PrintPreviewDialog printPreviewDialog = new PrintPreviewDialog(); - printPreviewDialog.ClientSize = new Size(800, 1100); - printPreviewDialog.Document = pDoc; - printPreviewDialog.PrintPreviewControl.Zoom = 1.0; - printPreviewDialog.ShowDialog(); - - } - - private void plPrint_Click(object sender, EventArgs e) - { - PrintDocument pDoc = new PrintDocument(); - pDoc.DefaultPageSettings.Landscape = false; - pDoc.OriginAtMargins = true; - pDoc.DefaultPageSettings.PrinterResolution.Kind = PrinterResolutionKind.High; - pDoc.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0); - pDoc.PrintPage -= new PrintPageEventHandler(pDoc_PrintPage); - pDoc.PrintPage += new PrintPageEventHandler(pDoc_PrintPage); - - System.Windows.Forms.PrintDialog pDlg = new System.Windows.Forms.PrintDialog(); - pDlg.Document = pDoc; - if (pDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) - { - pDoc.Print(); - } - } - #endregion - - #region 界面上方按钮 - - private void tsbEditApply_Click(object sender, EventArgs e) - { - if (PatientId > 0) - { - AIMS.OperationFront.UI.frmOperationApplyDetail frmOperationApplyDetail = new OperationFront.UI.frmOperationApplyDetail(); - frmOperationApplyDetail.State = AIMSExtension.EditState.EDIT; - frmOperationApplyDetail.EditApplyId = ApplyId; - frmOperationApplyDetail.FormClosed += new FormClosedEventHandler(frmOperationApplyDetail_FormClosed); - frmOperationApplyDetail.ShowDialog(); - } - else - { - MessageBox.Show("请选择患者"); - } - } - - void frmOperationApplyDetail_FormClosed(object sender, FormClosedEventArgs e) - { - plRefresh_Click(null, null); - } - - - #endregion - - #region 界面下方按钮 - private void panel8_Scroll(object sender, ScrollEventArgs e) - { - //SetPanelLocation(); - templateManage.SetPYL(); - } - - - #endregion - - #region 界面左按钮 - private void btnSelectPatient_Click(object sender, EventArgs e) - { - OperationDoing.AnasRecordBill.UI.frmRecoverPatient frmSelectPatient = new UI.frmRecoverPatient(); - frmSelectPatient.FormClosed += new FormClosedEventHandler(frmSelectPatient_FormClosed); - frmSelectPatient.ShowDialog(); - - } - - void frmSelectPatient_FormClosed(object sender, FormClosedEventArgs e) - { - try - { - if (PatientId > 0 && State == AIMSExtension.EditState.ADD) - { - try - { - HelperDB.DbHelperSQL.BeginTrans(); - _record = new OperationRecord(); - _record.OperationApplyId = ApplyId; - _record.PatientId = PatientId; - _record.RecoverId = RecoverId; - _record.Id = BLL.OperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, "InRoomTime", DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); - BLL.OperationRecord.UpdateState(PatientId, RecoverId, 3); - HelperDB.DbHelperSQL.CommitTrans(); - //_record.currentPage = 1; - btnSelectPatient.Enabled = false; - } - catch - { - HelperDB.DbHelperSQL.RollbackTrans(); - } - } - else if (PatientId > 0 && State == AIMSExtension.EditState.EDIT) - { - _record = new OperationRecord(); - btnSelectPatient.Enabled = false; //清空记录点并重新加载 - ClearTimeText(); - if (templateManage != null) - { - templateManage.ControlClear(); - } - DrawAnasReordBill.IniDrawAnasReordBill3(_record, zgcAnaesRecord, ref templateManage); //初始化麻醉记录单界面 - } - else if (PatientId > 0 && State == AIMSExtension.EditState.BROWSE) - { - _record = new OperationRecord(); - btnSelectPatient.Enabled = true; - btnCancelOperation.Enabled = false; - btnTemplate.Enabled = false; - ClearTimeText(); - if (templateManage != null) - { - templateManage.ControlClear(); - } - DrawAnasReordBill.IniDrawAnasReordBill3(_record, zgcAnaesRecord, ref templateManage); //初始化麻醉记录单界面 - } - plRefresh_Click(null, null); - } - catch (Exception ex) - { - throw ex; - } - } - private void btnOperationInfo_Click(object sender, EventArgs e) - { - if (PatientId != 0) - { - AIMS.OperationDoing.AnasRecordBill.UI.frmOperationInfoNew frmOperationInfo = new frmOperationInfoNew(); - frmOperationInfo._record = _record; - frmOperationInfo.FormClosed += new FormClosedEventHandler(plRefresh_Click); - frmOperationInfo.ShowDialog(); - } - else - { - MessageBox.Show("请选择患者"); - } - } - #endregion - - private void plRefresh_Click(object sender, EventArgs e) - { - if (PatientId == 0) return; - //刷新到当前页 - ReviewEvent(); - } - - private void ReviewEvent() - { - if (PatientId != 0) - { - templateManage.OpeRecord = FillAnasReordBill.getRecord(_record, PatientId, RecoverId); - templateManage.BindOperationRecordValueAll(templateManage.OpeRecord); - reDrawEvent(); - templateManage.Bind(); - zgcAnaesRecord.Refresh(); - } - } - private void DrawEvent() - { - reDrawEvent(); - templateManage.Bind("IconManage"); - templateManage.Bind("RemarkManage"); - zgcAnaesRecord.Refresh(); - } - - private void reDrawEvent() - { - ClearTimeText(); - if (_record.InRoomTime != null) - { - txtInRoom.CustomFormat = "MM-dd HH:mm"; - txtInRoom.ButtonDropDown.Visible = false; - txtInRoom.Tag = _record.InRoomTime.Value; - txtInRoom.Value = _record.InRoomTime.Value; - } - if (_record.OutCGTime != null) - { - txtBG.CustomFormat = "HH:mm"; - txtBG.ButtonDropDown.Visible = false; - txtBG.Tag = _record.OutCGTime.Value; - txtBG.Value = _record.OutCGTime.Value; - } - if (_record.AnesthesiaEndTime != null) - { - txtAnaesthesiaEnd.CustomFormat = "HH:mm"; - txtAnaesthesiaEnd.ButtonDropDown.Visible = false; - txtAnaesthesiaEnd.Tag = _record.AnesthesiaEndTime.Value; - txtAnaesthesiaEnd.Value = _record.AnesthesiaEndTime.Value; - } - if (_record.OutRoomTime != null) - { - txtOutRoom.CustomFormat = "MM-dd HH:mm"; - txtOutRoom.ButtonDropDown.Visible = false; - txtOutRoom.Tag = _record.OutRoomTime.Value; - txtOutRoom.Value = _record.OutRoomTime.Value; - } - - if (_record.OutRoomTime != null && _record.State == "麻醉恢复中") - { - txtOutRoom.CustomFormat = "MM-dd HH:mm"; - txtOutRoom.ButtonDropDown.Visible = false; - txtOutRoom.Tag = _record.OutRoomTime.Value; - txtOutRoom.Value = _record.OutRoomTime.Value; - EndOperationOutRoom(); - } - } - private void ClearTimeText() - { - txtInRoom.CustomFormat = " "; - txtBG.CustomFormat = " "; - txtAnaesthesiaEnd.CustomFormat = " "; - txtOutRoom.CustomFormat = " "; - txtInRoom.Tag = null; - txtBG.Tag = null; - txtAnaesthesiaEnd.Tag = null; - txtOutRoom.Tag = null; - txtInRoom.Text = ""; - txtBG.Text = ""; - txtAnaesthesiaEnd.Text = ""; - txtOutRoom.Text = ""; - } - - private void btnUpPage_Click(object sender, EventArgs e) - { - if (PatientId == 0) return; - if (_record.pageCount == 1) return; - SetUpPageTime(); - ReviewEvent(); - } - private void btnNextPage_Click(object sender, EventArgs e) - { - if (PatientId == 0) return; - if (_record.pageCount == _record.currentPage) return; - SetNextPageTime(); - ReviewEvent(); - } - public void SetUpPageTime() - { - if (_record.pageBegin < _record.sharpBegin) return; - _record.lastPageBegin = _record.pageBegin; - _record.pageBegin = _record.pageBegin.AddMinutes(-240); - _record.pageCount--; - if (_record.pageCount < 1) _record.pageCount = 1; - } - public void SetNextPageTime() - { - //当下一页的开始时间,小于当前最大时间 - DateTime curTimeTemp = getOpeMaxTime(_record); - if (_record.lastPageBegin > curTimeTemp) return; - //先设置新页的开始时间 - _record.pageBegin = _record.lastPageBegin; - _record.lastPageBegin = _record.pageBegin.AddMinutes(240); - _record.pageCount++; - if (_record.pageCount > _record.currentPage) _record.pageCount = _record.currentPage; - } - - - private void tsbExit_Click(object sender, EventArgs e) - { - Close(); - - } - - private void frmAnasRecoverBillNew_FormClosing(object sender, FormClosingEventArgs e) - { - PatientId = 0; - ApplyId = 0; - State = AIMSExtension.EditState.BROWSE; - } - - private void btnDrug_Click(object sender, EventArgs e) - { - if (PatientId != 0) - { - PublicUI.UI.frmFactDrugNew frmFactDrug = new PublicUI.UI.frmFactDrugNew(); - frmFactDrug._record = _record; - frmFactDrug.zgcAnaesRecord = zgcAnaesRecord; - frmFactDrug.DrugTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单 - frmFactDrug.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); - frmFactDrug.ShowDialog(); - } - else - { - MessageBox.Show("请选择患者"); - } - } - private void btnAddEvents_Click(object sender, EventArgs e) - { - if (PatientId != 0) - { - PublicUI.UI.frmFactEventsNew frmFactEventsNew = new PublicUI.UI.frmFactEventsNew(); - frmFactEventsNew._record = _record; - frmFactEventsNew.zgcAnaesRecord = zgcAnaesRecord; - frmFactEventsNew.EventTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单 - frmFactEventsNew.EventParam += ReferEventDrugs; - frmFactEventsNew.ShowDialog(); - } - else - { - MessageBox.Show("请选择患者"); - } - } - private void btnOutputLiquids_Click(object sender, EventArgs e) - { - if (PatientId != 0) - { - PublicUI.UI.frmFactOutputLiquidsNew frmFactOutputLiquids = new PublicUI.UI.frmFactOutputLiquidsNew(); - frmFactOutputLiquids._record = _record; - frmFactOutputLiquids.OutputLiquidTypeId = RecoverId; // 事件类型 1 麻醉单事件 2 麻醉恢复单 - frmFactOutputLiquids.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); - frmFactOutputLiquids.ShowDialog(); - } - else - { - MessageBox.Show("请选择患者"); - } - } - - private void btnBloodGasAnalysis_Click(object sender, EventArgs e) - { - if (PatientId != 0) - { - frmBloodGasAnalysisNew frmFactBloodGasAnalysis = new frmBloodGasAnalysisNew(); - frmFactBloodGasAnalysis._record = _record; - frmFactBloodGasAnalysis.zgcAnaesRecord = zgcAnaesRecord; - frmFactBloodGasAnalysis.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); - frmFactBloodGasAnalysis.ShowDialog(); - } - else - { - MessageBox.Show("请选择患者"); - } - } - - public void ReferEventDrugs() - { - //if (IsReadOnly == false) - //BOperationRecord.Update(_operationRecord); - if (txtInRoom.Value != _record.InRoomTime) - { - _record.pageCount = 0; - ReviewEvent(); - } - else - { - plRefresh_Click(null, null); - } - } - void frmFactEventsNew_FormClosed(object sender, FormClosedEventArgs e) - { - plRefresh_Click(null, null); - } - - - private void btnCancelOperation_Click(object sender, EventArgs e) - { - if (PatientId == 0) - { - MessageBox.Show("请选择患者!"); - return; - } - if (BLL.FillAnasRecordBillData.GetDataCount(_record.Id.Value, PatientId, RecoverId) > 0) - { - MessageBox.Show("清除数据在进行作废手术操作!"); - return; - } - if (MessageBox.Show("确认要取消转入恢复吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) - { - try - { - HelperDB.DbHelperSQL.BeginTrans(); - OperationFront.BLL.OperationApply.UpdateApplyState(ApplyId, 8); - BLL.OperationRecord.DeleteOperationRecorvreData(PatientId, RecoverId); - HelperDB.DbHelperSQL.CommitTrans(); - - //ClearData(); - this.Close(); - } - catch - { - HelperDB.DbHelperSQL.RollbackTrans(); - } - } - } - - private void btnTemplate_Click(object sender, EventArgs e) - { - if (PatientId == 0) - { - MessageBox.Show("请选择患者!"); - return; - } - PublicUI.UI.frmTemplate frmTemplateObj = new PublicUI.UI.frmTemplate(); - frmTemplateObj.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); - frmTemplateObj.InRoomTime = _record.InRoomTime.Value; - frmTemplateObj.PatientId = PatientId; - frmTemplateObj.TypeId = RecoverId; - frmTemplateObj.ShowDialog(); - - } - - private void tsbBigScreen_Click(object sender, EventArgs e) - { - PublicUI.UI.frmNotice frmNoticeObj = new PublicUI.UI.frmNotice(); - frmNoticeObj.ShowDialog(); - } - - private void tsbExePlan_Click(object sender, EventArgs e) - { - if (PatientId == 0) - { - MessageBox.Show("请先选择患者!"); - return; - } - PatientRecord patient = PatientRecord.GetPatientRecord(PatientId); - frmDocument frmDocument = new frmDocument(patient); - frmDocument.StartPosition = FormStartPosition.CenterScreen; - frmDocument.WindowState = FormWindowState.Maximized; - frmDocument.ShowDialog(); - } - - #region 采集程序 - public DateTime? LastMonitorDataTime = null; - //public List TempPhysioDatas; - private void timerGetCollectorData_Tick(bool isOpen) - { - if (_record.State != "3") return; - //if (!PublicMethod.RoleId.Operator.RoleRef.Name.Contains("麻醉") && PublicMethod.Operator.Id != _record.OperatorId - // && _record.OperatorId != 1 && PublicMethod.Operator.Name != "系统管理员") return; - if (_record.OutRoomTime != null && DateTime.Now >= _record.OutRoomTime) return; - DateTime dtTime = DateTime.Now; - - double span = ((TimeSpan)(dtTime - _record.InRoomTime.Value)).TotalSeconds % 300; - if (span < 10 || span > 12) - return; - if (LastMonitorDataTime != null && LastMonitorDataTime.Value.ToString("yyyy-MM-dd HH:mm") == dtTime.ToString("yyyy-MM-dd HH:mm")) return; - if (LastMonitorDataTime != null && LastMonitorDataTime.Value > dtTime) return; - try - { - //bool isNowRoom = isOpeRoom(); - //if (isNowRoom == false) - //{ - // return; - //} - - LastMonitorDataTime = dtTime; - DateTime InsertTime = Convert.ToDateTime(dtTime.ToString("yyyy-MM-dd HH:mm:00.000")); - int date = 0; - - List physioDatas = new List(); - foreach (PhysioDataConfig addPP in _record.addPhysioList) - { - string key = addPP.Name; - string value = addPP.Enname; - if (addPP.IsValid == false) continue; - //if (addPP.StopCollect == true) continue; - if (key == "机控呼吸") continue; - if (value == null || value == "") continue; - - int minMinutes = -5; - DataTable dtPhysioData = BOperationRecord.getPhysioDataByTimeName(NowRoom.Ip, value, InsertTime.AddMinutes(minMinutes), InsertTime.AddSeconds(1)); - if (dtPhysioData != null && dtPhysioData.Rows.Count > 0) - { - foreach (DataRow dr in dtPhysioData.Rows) - { - try - { - if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue; - if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue; - if (isCgtime(addPP.Name, dtTime)) continue; - PhysioData pdTemp = new PhysioData(); - pdTemp.RecordTime = dtTime; - pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); - pdTemp.YAisx = addPP.YAisx; - pdTemp.PhysioDataConfigId = addPP.Id; - pdTemp.PatientId = _record.Id.Value; - physioDatas.Add(pdTemp); - continue; - } - catch (Exception) - { - continue; - } - } - } - } - - ////有有创清空无创 - //foreach (var pdTemp in physioDatas) - //{ - // if (pdTemp.PhysioDataConfigId == 13) - // { - // foreach (var temp in physioDatas) - // { - // if (temp.PhysioDataConfigId == 5) - // { - // temp.Value = 0; - // } - // } - // } - // if (pdTemp.PhysioDataConfigId == 14) - // { - // foreach (var temp in physioDatas) - // { - // if (temp.PhysioDataConfigId == 6) - // { - // temp.Value = 0; - // } - // } - // } - // if (pdTemp.PhysioDataConfigId == 18) - // { - // foreach (var temp in physioDatas) - // { - // if (temp.PhysioDataConfigId == 5) - // { - // temp.Value = 0; - // } - // } - // } - // if (pdTemp.PhysioDataConfigId == 19) - // { - // foreach (var temp in physioDatas) - // { - // if (temp.PhysioDataConfigId == 6) - // { - // temp.Value = 0; - // } - // } - // } - //} - //TempPhysioDatas = new List(); - foreach (var pdTemp in physioDatas) - { - if (pdTemp.Value < 1) continue; - PhysioDataConfig addPP = _record.addPhysioList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0]; - addPP.AddOrDelItem(pdTemp, 5); - date++; - } - - //if (dtTime > lastPageBegin && ((TimeSpan)(dtTime - lastPageBegin)).TotalHours < 24 && date > 0) - //{ - // currentPage++; - // btnendpage_Click(null, null); - //} - //else - //{ - // DrawDrugAndSap(); - // if ((DrugsListstr != null && DrugsListstr.Count > 1)) - // DrawRemarkDate(); - // DrawEvent(); - //} - - } - catch (Exception) - { - //getPhysioData_Click(null, null); - } - } - - public string szy;//舒张压 - public string ssy;//收缩压 - public DateTime? LastRespMonitorDataTime; - private void timerGetTextCollectorData_Tick(object sender, EventArgs e) - { - try - { - if (((TimeSpan)(DateTime.Now - _record.lastPageBegin)).TotalHours > 24) return; - timerGetCollectorData_Tick(false); - ShowMonitorDataToRight(); - } - catch (Exception ) - { - //PublicMethod.WriteLog(ex); - } - } - - private BackgroundWorker backgroundWorker1; - public void ShowMonitorDataToRight() - { - this.backgroundWorker1 = new BackgroundWorker(); - this.backgroundWorker1.WorkerReportsProgress = true; - this.backgroundWorker1.WorkerSupportsCancellation = true; - this.backgroundWorker1.DoWork += new DoWorkEventHandler(this.backgroundWorker1_DoWork); - this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted); - this.backgroundWorker1.RunWorkerAsync(); - } - private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) - { - BackgroundWorker worker = sender as BackgroundWorker; - List lists = DeviceCacheData.Select(" IPAddress='" + NowRoom.Ip + "' and UpdateTime>='" + DateTime.Now.AddSeconds(-300) + "'"); - e.Result = lists; - } - private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) - { - List lists = e.Result as List; - if (lists != null && lists.Count > 0) - { - DeviceCacheData deviceCacheData = lists[0]; - NowPhysioData nowPhysioData = JsonConvert.DeserializeObject(deviceCacheData.JsonData); - foreach (PropertyInfo p in nowPhysioData.GetType().GetProperties()) - { - foreach (PhysioDataConfig keyValuePair in _record.addPhysioList) - { - if (keyValuePair.Enname.ToUpper() == p.Name.ToUpper()) - { - try - { - object paramValue = p.GetValue(nowPhysioData, null); - if (paramValue != null && paramValue.ToString() != string.Empty && paramValue.ToString() != "NaN" && paramValue.ToString() != "NULL") - { - double value = Double.Parse(paramValue.ToString()); - value = Convert.ToInt32(value); - - if (keyValuePair.Name == "心率") - { - lblHR.Text = value <= 0 ? "- -" : value.ToString(); - } - if (keyValuePair.Name == "自主呼吸") - { - lblRESP.Text = value <= 0 ? "- -" : value.ToString(); - } - if (keyValuePair.Name == "氧饱和度") - { - lblSpo2.Text = value <= 0 ? "- -" : value.ToString(); - } - if (keyValuePair.Name == "脉率") - { - lblPR.Text = value <= 0 ? "- -" : value.ToString(); - } - if (keyValuePair.Name == "无创舒张压") - { - szy = value <= 0 ? "" : value.ToString(); - } - if (keyValuePair.Name == "无创收缩压") - { - ssy = value <= 0 ? "" : value.ToString(); - } - if (keyValuePair.Name == "有创舒张压") - { - szy = value <= 0 ? "" : value.ToString(); - } - if (keyValuePair.Name == "有创收缩压") - { - ssy = value <= 0 ? "" : value.ToString(); - } - break; - } - } - catch (Exception ) - { - //PublicMethod.WriteLog(ex); - } - } - } - } - string szyssy = ssy + "/" + szy; - lblDia.Text = szyssy == "/" ? "--/--" : szyssy; - } - else - { - lblHR.Text = "- -"; - lblRESP.Text = "- -"; - lblSpo2.Text = "- -"; - lblPR.Text = "- -"; - lblDia.Text = "--/--"; - } - } - - public bool isCgtime(string key, DateTime time) - { - bool b = false; - try - { - if (key == "自主呼吸") - { - if (_record.InCGTime != null && _record.OutCGTime != null) - { - if (time > _record.InCGTime && time < _record.OutCGTime) - b = true; - } - if (_record.InCGTime != null && _record.OutCGTime == null) - { - if (time > _record.InCGTime) - b = true; - } - } - else - { - b = false; - } - } - catch (Exception ex) - { - PublicMethod.WriteLog(ex); - } - return b; - } - - private void StartTimer() - { - if (timerGetTextCollectorData == null) - timerGetTextCollectorData = new System.Windows.Forms.Timer(components); - timerGetTextCollectorData.Enabled = true;//调试时设置为FALSE , - timerGetTextCollectorData.Interval = 2000; - timerGetTextCollectorData.Tick -= new System.EventHandler(timerGetTextCollectorData_Tick); - timerGetTextCollectorData.Tick += new System.EventHandler(timerGetTextCollectorData_Tick); - timerGetTextCollectorData.Start(); - } - - private void DisposeTimer() - { - if (timerGetTextCollectorData != null) - { - timerGetTextCollectorData.Enabled = false; - timerGetTextCollectorData.Stop(); - } - } - - public void StarttimerGetTextCollectorData() - { - if (timerGetTextCollectorData == null) return; - timerGetTextCollectorData.Start(); - } - - #endregion - private void zgcAnaesRecord_KeyUp(object sender, KeyEventArgs e) - { - if (templateManage != null) - { - ZedGraphControl send = sender as ZedGraphControl; - templateManage.zedControl_KeyUp(send, e); - } - } - - private bool zgcAnaesRecord_MouseDownEvent(ZedGraphControl sender, MouseEventArgs e) - { - if (templateManage != null) - { - templateManage.zedControl_MouseDownEvent(sender, e); - } - return default(bool); - } - - private bool zgcAnaesRecord_MouseUpEvent(ZedGraphControl sender, MouseEventArgs e) - { - if (templateManage != null) - { - templateManage.zedControl_MouseUpEvent(sender, e); - } - return default(bool); - } - - private bool zgcAnaesRecord_MouseMoveEvent(ZedGraphControl sender, MouseEventArgs e) - { - if (templateManage != null) - { - templateManage.zedControl_MouseMoveEvent(sender, e); - } - return default(bool); - } - - private void zgcAnaesRecord_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (templateManage != null) - { - ZedGraphControl send = sender as ZedGraphControl; - templateManage.zedControl_MouseDoubleClick(send, e); - } - } - #region 鼠标右键 - void toolStripMenuItem2_Click(object sender, EventArgs e) - { - if (PatientId > 0) - { - //PublicUI.UI.frmPhysioData frmPhysioData = new PublicUI.UI.frmPhysioData(); - //frmPhysioData.FormClosed += new FormClosedEventHandler(plRefresh_Click); - //frmPhysioData.PatientId = PatientId; - //frmPhysioData.TypeId = 1; - //frmPhysioData.ShowDialog(); - } - } - - - - #endregion - - - #region 手术特殊事件 - /// - /// 手术特殊事件时间点处理事件 - /// - /// - /// - public void txtDateTime_MouseDown(object sender, MouseEventArgs e) - { - if (PatientId == 0) return; - DateTimeInput tb = sender as DateTimeInput; - if (_record != null && _record.OutRoomTime != null) - { - if ((tb.Name == "txtBG" || tb.Name == "txtCG") && tb.Text.Trim() == "") - { - return; - } - } - - if (tb.Text.Trim() == "" && tb.CustomFormat == " ") - { - tb.BackColor = Color.White; - SetPic(sender); - } - else - { - tb.CustomFormat = "HH:mm"; - tb.ButtonDropDown.Visible = true; - } - } - void txtInRoom_KeyPress(object sender, KeyPressEventArgs e) - { - if (PatientId == 0) return; - DateTimeInput dtpak = (DateTimeInput)sender; - if (e.KeyChar == 8 || e.KeyChar == 127) - { - if (dtpak.CustomFormat != " " && dtpak.Tag != null) - { return; } - } - } - private void txtDateTime_LostFocus(object sender, EventArgs e) - { - if (PatientId == 0) return; - DateTimeInput tb = sender as DateTimeInput; - if (tb.CustomFormat == "HH:mm") - { - if (tb.Name == "txtInRoom" || tb.Name == "txtOutRoom") - { - tb.CustomFormat = "MM-dd HH:mm"; - } - tb.ButtonDropDown.Visible = false; - } - if (tb.Text.Trim() != "" && tb.Value.ToString() != tb.Tag.ToString()) - { - try - { - SetPic(sender, tb.Value); - tb.BackColor = Color.White; - } - catch (Exception) - { - tb.Focus(); - tb.Value = DateTime.Parse(tb.Tag.ToString()); - return; - } - } - else - { - if (tb.Tag != null && tb.Tag.ToString() != "") - tb.Value = DateTime.Parse(tb.Tag.ToString()); - } - } - private void dateTimePicker_KeyPress(object sender, KeyPressEventArgs e) - { - if (PatientId == 0) return; - DateTimeInput dtpak = (DateTimeInput)sender; - if (e.KeyChar == 8 || e.KeyChar == 127) - { - if (dtpak.CustomFormat != " " && dtpak.Tag != null) - { - try - { - SetPic((DateTimeInput)sender); - } - catch (Exception) - { - //PublicMethod.ShowMessage("输入的时间格式不符合规范(HH:mm)!"); - return; - } - } - - } - } - /// - /// 特殊事件触发时设置图片 - /// - /// 显示时间的控件 - private void SetPic(Object obj) - { - DrawGraph.FactEvents Inevent = null; - DateTimeInput tb = obj as DateTimeInput; - DateTime nowtime = DateTime.Now;// getOpeMaxTime(); - DateTime curTimeTemp = new DateTime(nowtime.Year, nowtime.Month, nowtime.Day, nowtime.Hour, nowtime.Minute, 0); - InsertOrUpdateEventTime(0, "txtInRoom", "入室", tb, curTimeTemp, ref Inevent); - curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(0, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); - curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(0, "txtAnaesthesiaEnd", "麻醉完成", tb, curTimeTemp, ref Inevent); - curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(0, "txtOutRoom", "出室", tb, curTimeTemp, ref Inevent); - - if (Inevent != null) - { - _record.FactEventsList.Add(Inevent); - if (Inevent.EventName == "入室") - { - _record.pageCount = 0; - ReviewEvent(); - } - else if (Inevent.EventName == "手术开始" || Inevent.EventName == "出室" || Inevent.EventBeginTime > _record.lastPageBegin) - { - ReviewEvent(); - } - else - { - DrawEvent(); - } - } - } - /// - /// 特殊事件触发时设置图片 - /// - /// 显示时间的控件 - private void SetPic(Object obj, DateTime curTimeTemp) - { - DrawGraph.FactEvents Inevent = null; - DateTimeInput tb = obj as DateTimeInput; - curTimeTemp = new DateTime(curTimeTemp.Year, curTimeTemp.Month, curTimeTemp.Day, curTimeTemp.Hour, curTimeTemp.Minute, 0); - //try - //{ - // if (curTimeTemp.Date < _record.PlanOperationTime.AddDays(-3).Date) - // { - // tb.Focus(); - // tb.Value = DateTime.Parse(tb.Tag.ToString()); - // return; - // } - //} - //catch (Exception) - //{ - //} - InsertOrUpdateEventTime(1, "txtInRoom", "入室", tb, curTimeTemp, ref Inevent); - curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(1, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); - curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(1, "txtAnaesthesiaEnd", "麻醉完成", tb, curTimeTemp, ref Inevent); - curTimeTemp = curTimeTemp.AddSeconds(2); - InsertOrUpdateEventTime(1, "txtOutRoom", "出室", tb, curTimeTemp, ref Inevent); - - if (Inevent != null) - { - if (Inevent.EventName == "入室") - { - _record.pageCount = 0; - ReviewEvent(); - } - else if (Inevent.EventName == "出室" || Inevent.EventName == "手术开始" || Inevent.EventBeginTime > _record.lastPageBegin) - { - ReviewEvent(); - } - else - { - DrawEvent(); - } - } - } - /// - /// 特殊事件触发时设置图片 - /// - /// 显示时间的控件 - private void SetPic(DateTimeInput obj) - { - DrawGraph.FactEvents Inevent = null; - DateTimeInput tb = obj as DateTimeInput; - if (_record.State == "麻醉恢复中") - { - DeleteEventTime("txtAnaesthesiaEnd", "麻醉完成", tb, ref Inevent); - DeleteEventTime("txtBG", "拔管", tb, ref Inevent); - } - else - { - MessageBox.Show("选择的事件不可删除 只可修改!"); - } - - if (Inevent != null) - { - tb.ButtonDropDown.Visible = false; - _record.FactEventsList.Remove(Inevent); - DrawEvent(); - } - } - /// - /// 判断控件对应的事件 删除事件 - /// - /// 事件对应的控件名称 - /// 事件名称 - /// 控件 - private void DeleteEventTime(string EventTxtName, string EventName, DateTimeInput tb, ref DrawGraph.FactEvents Inevent) - { - if (tb.Name.Equals(EventTxtName)) - { - List list = _record.FactEventsList.Where(c => c.EventName == EventName).ToList(); - if (list.Count <= 0) return; - Inevent = list[0]; - if ((EventName == "入室") || EventName == "出室") - { - //PublicMethod.ShowMessage("该事件为主要事件 不可删除 只可修改!!"); - tb.Value = Inevent.EventBeginTime.Value; - Inevent = null; - return; - } - - BFactEvents.DeleteById(Inevent.Id.ToString()); - Inevent.clearAddObj(zgcAnaesRecord); - tb.CustomFormat = " "; - tb.Value = DateTime.Now; - tb.Tag = null; - - if (Inevent != null && Inevent.EventName == "麻醉完成") _record.AnesthesiaEndTime = null; - if (Inevent != null && Inevent.EventName == "出室") _record.OutRoomTime = null; - if (Inevent != null && Inevent.EventName == "拔管") _record.OutCGTime = null; - if (Inevent != null) - { - BOperationRecord.Update("OperationBeginTime=@OperationBegin,OperationEndTime=@OperationEnd,OutRoomTime=@OutRoom where Id=@id", new AIMSModel.ParameterList("@OperationBegin", _record.OperationBeginTime.HasValue ? (object)_record.OperationBeginTime.Value : (object)DBNull.Value, "@OperationEnd", _record.OperationEndTime.HasValue ? (object)_record.OperationEndTime.Value : (object)DBNull.Value, "@OutRoom", _record.OutRoomTime.HasValue ? (object)_record.OutRoomTime.Value : (object)DBNull.Value, "@id", _record.Id)); - } - } - } - /// - /// 判断控件对应的事件 插入事件 - /// - /// 0插入 1更新 - /// 事件对应的控件名称 - /// 事件名称 - /// 事件对应的对象时间 - /// 控件 - /// 事件时间 - /// 事件对象 - private void InsertOrUpdateEventTime(int state, string EventTxtName, string EventName, DateTimeInput tb, DateTime curTimeTemp, ref DrawGraph.FactEvents Inevent) - { - if (tb.Name.Equals(EventTxtName)) - { - string messing = ""; - bool timeistrue = true; - // timeistrue = BOperationRecord.IfTimeisTrue(true, _record, EventName, curTimeTemp, ref messing); - //if (_record.State != null && _record.State != 2) - //{ - // if (messing != "") - // { - // PublicMethod.ShowMessage(messing); - // } - //} - //else - //{ timeistrue = true; } - if (EventName == "出室" && _record.State == "麻醉恢复中" && state == 3) - { - if (GetOpeState(ref messing) == false) - { - if (messing != "") MessageBox.Show(messing); - //if (messing == "请填写手术不良事件!") - // btnAdverseFactEvents_Click(null, null); - return; - } - } - if (timeistrue == false) - { - if (tb.Tag != null) tb.Value = DateTime.Parse(tb.Tag.ToString()); - return; - } - if (EventName == "出室" && curTimeTemp.ToString("yyyy-MM-dd HH:mm") == _record.lastPageBegin.ToString("yyyy-MM-dd HH:mm")) - { - curTimeTemp = _record.lastPageBegin; - } - if (state != 1) - { - Inevent = BFactEvents.Insert(PatientId, EventName, curTimeTemp, curTimeTemp, RecoverId); - } - else - { - updateEventTime(EventName, curTimeTemp, ref Inevent); - } - tb.Value = curTimeTemp; - tb.Tag = curTimeTemp; - - if (Inevent != null && Inevent.EventName == "入室" && _record.InRoomTime != Inevent.EventBeginTime) - { - _record.InRoomTime = Inevent.EventBeginTime; - } - if (Inevent != null && Inevent.EventName == "拔管" && _record.OutCGTime != Inevent.EventBeginTime) _record.OutCGTime = Inevent.EventBeginTime; - if (Inevent != null && Inevent.EventName == "麻醉完成" && _record.AnesthesiaEndTime != Inevent.EventBeginTime) - _record.AnesthesiaEndTime = Inevent.EventBeginTime; - if (Inevent != null && Inevent.EventName == "出室" && _record.OutRoomTime != Inevent.EventBeginTime) _record.OutRoomTime = Inevent.EventBeginTime; - if (Inevent != null) - { - BOperationRecord.Update("InRoomTime=@InRoom,OperationBeginTime=@OperationBegin,OperationEndTime=@OperationEnd,OutRoomTime=@OutRoom where Id=@id ", new AIMSModel.ParameterList("@InRoom", _record.InRoomTime.HasValue ? (object)_record.InRoomTime.Value : (object)DateTime.Now, "@OperationBegin", _record.OperationBeginTime.HasValue ? (object)_record.OperationBeginTime.Value : (object)DBNull.Value, "@OperationEnd", _record.OperationEndTime.HasValue ? (object)_record.OperationEndTime.Value : (object)DBNull.Value, "@OutRoom", _record.OutRoomTime.HasValue ? (object)_record.OutRoomTime.Value : (object)DBNull.Value, "@id", _record.Id)); - } - } - } - /// - /// 修改事件时间 - /// - /// - /// - public void updateEventTime(string eventName, DateTime dt, ref DrawGraph.FactEvents elist) - { - List list = _record.FactEventsList.Where(c => c.EventName == eventName).ToList(); - if (list.Count <= 0) return; - elist = list[0]; - if (elist.EventBeginTime != dt) - { - elist.EventBeginTime = dt; - elist.EventEndTime = dt; - BFactEvents.Update("EventBeginTime=@EventBeginTime,EventEndTime=@EventEndTime where id=@id ", new AIMSModel.ParameterList("@EventBeginTime", elist.EventBeginTime, "@EventEndTime", elist.EventEndTime, "@id", elist.Id)); - } - } - #endregion - - public DateTime getOpeMaxTime(OperationRecord myOpeRecord) - { - try - { - DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value); - DateTime nowDate = DateTime.Now; - TimeSpan tsp = nowDate - dts; - if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false - { - dts = nowDate; - } - if (dts.ToString("yyyy-MM-dd HH:mm") == myOpeRecord.pageBegin.AddMinutes(240).ToString("yyyy-MM-dd HH:mm")) - { - dts = myOpeRecord.pageBegin.AddMinutes(240); - } - if (myOpeRecord.OutRoomTime != null) - { - DateTime outRoomTime = DateTime.Parse(myOpeRecord.OutRoomTime.ToString()); - if (DateTime.Compare(dts, outRoomTime) > 0) - { - dts = outRoomTime; - } - } - return dts; - } - catch (Exception) - { - return DateTime.Now; - } - } - - private bool GetOpeState(ref string message) - { - bool isTrue = true; - //bool isJM = false; - //if (_record.AnaesthesiaMethodId != null && _record.AnaesthesiaMethodId.ToString().Trim() != "") - //{ - // List anes = BAnaesthesiaMethod.Select(" Id=3 or ParentId=3 or Id=59 ", null, RecursiveType.None, 0); - // foreach (var item in anes) - // { - // if (_record.AnaesthesiaMethodId.Contains(item.Id.ToString())) - // { - // isJM = true; - // break; - // } - // } - //} - //string OpeEndStr = ""; - //if (ConfigSource.OpeEndSyc != null && ConfigSource.OpeEndSyc.IsValid == 1) - // OpeEndStr = ConfigSource.OpeEndSyc.Value; - - - ////身高|术后诊断|不良事件|质控指标|记录小结|ASA分级|术者|麻醉方式 - //if (OpeEndStr.Contains("身高") && isJM == false) - // if (_record.PatientRef.Height == null || _record.PatientRef.Height.ToString() == "") - // { - // message = "请添加患者身高!"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("术后诊断")) - // if (_record.Diagnose == null || _record.Diagnose.Trim() == "") - // { - // message = "请填写术后诊断"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("质控指标") && isJM == false) - // if (_record.AnaseDataQualityRecordList == null || _record.AnaseDataQualityRecordList.Count <= 0) - // { - // message = "请填写麻醉质量质控指标"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("记录小结") && isJM == false) - // if (_record.Remark == null || _record.Remark == "") - // { - // message = "请填写手术记录小结"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("ASA分级") && isJM == false) - // if (_record.AnesthesiaDoctor != null && _record.AnesthesiaDoctor.Trim() != "") - // if (_record.ASALevel == null || _record.ASALevel == 0) - // { - // message = "请添ASA分级!"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("麻醉方式")) - // if (_record.AnaesthesiaMethodId == null || _record.AnaesthesiaMethodId.ToString().Trim() == "") - // { - // message = "请添加麻醉方式!"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("术者")) - // if (_record.OperationDoctor == null || _record.OperationDoctor.Trim() == "") - // { - // message = "请添加术者!"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("手术部位")) - // if (_record.OperationPositionId == null || _record.OperationPositionId.Trim() == "") - // { - // message = "请添加手术部位!"; - // isTrue = false; - // } - - //if (OpeEndStr.Contains("手术切口")) - // if (_record.OperationCutId == null || _record.OperationCutId.Trim() == "") - // { - // message = "请添加手术切口!"; - // isTrue = false; - // } - - //if (_record.OperationEndTime != null && _record.OperationBeginTime != null && _record.OperationEndTime < _record.OperationBeginTime.Value.AddMinutes(10)) - //{ - // System.Windows.Forms.DialogResult dr = System.Windows.Forms.MessageBox.Show("手术时长小于十分钟,请再次确认【手术开始-结束时间】!", "系统提示", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Information); - // if (dr == System.Windows.Forms.DialogResult.No) - // { - // isTrue = false; - // } - //} - return isTrue; - } - private void EndOperationOutRoom() - { - if (_record == null || _record.State != "麻醉恢复中") return; - try - { - //CloseOtherFrom(); - //保存持续加药未结束药品 - foreach (FactDrug temp in _record.FactDrugList) - { - if (temp.IsContinue == 1 && temp.DrugBeginTime == temp.DrugEndTime) - { - temp.DrugEndTime = _record.OutRoomTime.Value; - BFactDrug.Update(temp); - } - } - //保存持续事件未结束事件 - foreach (FactEvents temp in _record.FactEventsList) - { - if (temp.IsContinue == 1 && temp.EventBeginTime == temp.EventEndTime) - { - temp.EventEndTime = _record.OutRoomTime; - BFactEvents.Update(temp); - } - } - _record.State = "麻醉恢复结束"; - OperationFront.BLL.OperationApply.UpdateApplyState(ApplyId, 9); - BLL.OperationRecord.UpdateState(PatientId, RecoverId, 4); - - //PublicMethod.WriteLog("结束转出手术: " + _record.Id); - //TipBox.Hidden(true); - State = AIMSExtension.EditState.BROWSE; - btnCancelOperation.Enabled = false; - btnSelectPatient.Enabled = true; - ReviewEvent(); - } - catch (Exception exp) - { - PublicMethod.WriteLog(exp, ""); - } - - } - - private void zgcAnaesRecord_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState) - { - - if (PatientId == 0) return; - //ZedGraph自带的右键菜单键值表 - //StringID Menu Item - //copy Copy - //page_setup Page Setup... - //print Print... - //save_as Save Image As... - //set_default Set Scale to Default - //show_val Show Point Values - //undo_all Undo All Zoom/Pan - //unzoom Un-Zoom, Un-Pan, Undo Scroll - //删除或者禁用右键菜单 - foreach (ToolStripMenuItem item in menuStrip.Items) - { - //禁用菜单 & 汉化 - switch ((string)item.Tag) - { - case "copy": - item.Text = "复制"; - item.Visible = false; - break; - case "page_setup": - item.Text = "打印设置..."; - item.Visible = false; - break; - case "print": - item.Text = "打印..."; - item.Visible = false; - break; - case "save_as": - item.Text = "另存为..."; - item.Enabled = false; - item.Visible = false; - break; - case "set_default": - item.Text = "默认设置"; - item.Visible = false; - item.Enabled = false; - break; - case "show_val": - item.Text = "显示点值"; - item.Visible = false; - break; - case "undo_all": - item.Text = "撤销所有操作"; - item.Visible = false; - item.Enabled = false; - break; - case "unzoom": - item.Text = "撤销缩放"; - item.Enabled = false; - item.Visible = false; - break; - default: - break; - } - - } - - //添加自定义的新菜单 - ToolStripMenuItem getPhysioData = new ToolStripMenuItem(); - getPhysioData.Name = "getPhysioData"; - getPhysioData.Tag = "getPhysioData"; - getPhysioData.Text = "重新获取生命体征"; - getPhysioData.Click += getPhysioData_Click; - menuStrip.Items.Add(getPhysioData); - - ToolStripMenuItem clearSelectCouve = new ToolStripMenuItem(); - clearSelectCouve.Name = "clear_SelectCouve"; - clearSelectCouve.Tag = "clear_SelectCouve"; - clearSelectCouve.Text = "清空选中曲线"; - clearSelectCouve.Click += new EventHandler(clearSelectCouve_Click); - menuStrip.Items.Add(clearSelectCouve); - - ToolStripMenuItem ModifyApply = new ToolStripMenuItem(); - ModifyApply.Name = "ModifyApply"; - ModifyApply.Tag = "ModifyApply"; - ModifyApply.Text = "手术申请信息"; - ModifyApply.Click += ModifyApply_Click; - menuStrip.Items.Add(ModifyApply); - - //ToolStripMenuItem btnSyatemSetup = new ToolStripMenuItem(); - //btnSyatemSetup.Name = "btnSyatemSetup"; - //btnSyatemSetup.Tag = "btnSyatemSetup"; - //btnSyatemSetup.Text = "参数设置"; - //btnSyatemSetup.Click += new EventHandler(btnSyatemSetup_Click); - //menuStrip.Items.Add(btnSyatemSetup); - - ToolStripMenuItem toolStripMenuItem1 = new ToolStripMenuItem(); - toolStripMenuItem1.Name = "refresh"; - toolStripMenuItem1.Tag = "refresh"; - toolStripMenuItem1.Text = "刷新"; - toolStripMenuItem1.Click += new EventHandler(plRefresh_Click); - menuStrip.Items.Add(toolStripMenuItem1); - - } - private void getPhysioData_Click(object sender, EventArgs e) - { - //if (this.IsReview == false && _operationRecord.State == 0 && IsReadOnly == false) - //{ - // //没有IP判断 - // DataTable dtPhysioData = BOperationRecord.getPhysioDataByIp(NowRoom.Ip1, _operationRecord.Id.Value, _operationRecord.InRoomTime.Value, getOpeMaxTime(), 5); - // //同步未画点数据 - // DrawFillPhysioData(dtPhysioData); - - // #region 画生理数据 - // DrawPhysioData(); - // #endregion - - //} - } - private void clearSelectCouve_Click(Object sender, EventArgs e) - { - templateManage.ClearSelectCouve(); - } - private void ModifyApply_Click(object sender, EventArgs e) - { - if (PatientId == 0) return; - - frmOperationApplyDetail frm = new frmOperationApplyDetail(); - frm.State = AIMSExtension.EditState.EDIT; - frm.EditApplyId = ApplyId; - - bool wExist = this.CheckFormIsOpen(frm.Name); - - if (!wExist) - { - frm.FormBorderStyle = FormBorderStyle.None; // 无边框 - frm.TopLevel = false; - frm.Dock = DockStyle.Fill; - frm.FormClosed += (s, er) => - { - ReviewEvent(); - }; - panel8.Controls.Add(frm); - } - else - { - frm = (frmOperationApplyDetail)Application.OpenForms[frm.Name]; - } - frm.Show(); - frm.Focus(); - frm.BringToFront(); - - - } - - private bool CheckFormIsOpen(string Forms) - { - bool bResult = false; - foreach (Form frm in Application.OpenForms) - { - if (frm.Name == Forms) - { - bResult = true; - break; - } - } - return bResult; - } - } -} diff --git a/AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.Designer.cs b/AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.Designer.cs similarity index 64% rename from AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.Designer.cs rename to AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.Designer.cs index 8923c54..83c152a 100644 --- a/AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.Designer.cs +++ b/AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.Designer.cs @@ -1,4 +1,4 @@ -namespace AIMS.OperationDoing.AnasRecordBill.UI +namespace AIMS.OperationDoing.AnasRecoverBill.UI { partial class frmAnasRecoverBillNew { @@ -33,54 +33,72 @@ this.panel2 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel14 = new System.Windows.Forms.Panel(); + this.button8 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.btnCancelIn = new System.Windows.Forms.Button(); this.btnCancelOperation = new System.Windows.Forms.Button(); this.btnTemplate = new System.Windows.Forms.Button(); - this.button6 = new System.Windows.Forms.Button(); + this.btnBloodGasAnalysis = new System.Windows.Forms.Button(); this.btnOutputLiquids = new System.Windows.Forms.Button(); this.btnAddEvents = new System.Windows.Forms.Button(); this.btnDrug = new System.Windows.Forms.Button(); this.btnOperationInfo = new System.Windows.Forms.Button(); this.btnSelectPatient = new System.Windows.Forms.Button(); this.panel4 = new System.Windows.Forms.Panel(); - this.label9 = new System.Windows.Forms.Label(); + this.btnChage = new System.Windows.Forms.Button(); this.lblSpo2 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); this.lblRESP = new System.Windows.Forms.Label(); this.lblDia = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.lblPR = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); this.lblHR = new System.Windows.Forms.Label(); + this.btnsjzx = new System.Windows.Forms.Button(); + this.btnzsk = new System.Windows.Forms.Button(); + this.btndptz = new System.Windows.Forms.Button(); + this.btnsbwh = new System.Windows.Forms.Button(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); this.panel5 = new System.Windows.Forms.Panel(); this.panel8 = new AIMS.PublicUI.UI.DrawPanel(); + this.circularProgress1 = new DevComponents.DotNetBar.Controls.CircularProgress(); this.zgcAnaesRecord = new DrawGraph.ZedGraphControl(); this.panel7 = new System.Windows.Forms.Panel(); this.panel21 = new System.Windows.Forms.Panel(); + this.panel17 = new System.Windows.Forms.Panel(); this.btnNextPage = new System.Windows.Forms.Panel(); this.plPrintBrowse = new System.Windows.Forms.Panel(); this.plPrint = new System.Windows.Forms.Panel(); + this.panel18 = new System.Windows.Forms.Panel(); this.btnUpPage = new System.Windows.Forms.Panel(); this.plRefresh = new System.Windows.Forms.Panel(); + this.lblRoom = new System.Windows.Forms.Label(); this.label22 = new System.Windows.Forms.Label(); this.labOperatorName = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); this.plTitleEventTime = new System.Windows.Forms.Panel(); this.panel13 = new System.Windows.Forms.Panel(); this.txtOutRoom = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.pictureBox6 = new System.Windows.Forms.PictureBox(); + this.picOutRoom = new System.Windows.Forms.PictureBox(); this.button5 = new System.Windows.Forms.Button(); - this.panel10 = new System.Windows.Forms.Panel(); + this.panel16 = new System.Windows.Forms.Panel(); this.txtBG = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.button2 = new System.Windows.Forms.Button(); + this.picBG = new System.Windows.Forms.PictureBox(); + this.button9 = new System.Windows.Forms.Button(); this.panel12 = new System.Windows.Forms.Panel(); this.txtAnaesthesiaEnd = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.pictureBox5 = new System.Windows.Forms.PictureBox(); + this.picAnesEnd = new System.Windows.Forms.PictureBox(); this.button4 = new System.Windows.Forms.Button(); this.panel6 = new System.Windows.Forms.Panel(); this.txtInRoom = new DevComponents.Editors.DateTimeAdv.DateTimeInput(); - this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.picInRoom = new System.Windows.Forms.PictureBox(); this.txtInRoom1 = new System.Windows.Forms.Button(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.panel3.SuspendLayout(); @@ -94,15 +112,16 @@ this.plTitleEventTime.SuspendLayout(); this.panel13.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtOutRoom)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit(); - this.panel10.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picOutRoom)).BeginInit(); + this.panel16.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtBG)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picBG)).BeginInit(); this.panel12.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtAnaesthesiaEnd)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picAnesEnd)).BeginInit(); this.panel6.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txtInRoom)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picInRoom)).BeginInit(); this.SuspendLayout(); // // panel2 @@ -123,15 +142,18 @@ this.panel3.Font = new System.Drawing.Font("宋体", 12F); this.panel3.Location = new System.Drawing.Point(0, 10); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(160, 729); + this.panel3.Size = new System.Drawing.Size(160, 859); this.panel3.TabIndex = 2; // // panel14 // this.panel14.BackColor = System.Drawing.Color.White; + this.panel14.Controls.Add(this.button8); + this.panel14.Controls.Add(this.button7); + this.panel14.Controls.Add(this.btnCancelIn); this.panel14.Controls.Add(this.btnCancelOperation); this.panel14.Controls.Add(this.btnTemplate); - this.panel14.Controls.Add(this.button6); + this.panel14.Controls.Add(this.btnBloodGasAnalysis); this.panel14.Controls.Add(this.btnOutputLiquids); this.panel14.Controls.Add(this.btnAddEvents); this.panel14.Controls.Add(this.btnDrug); @@ -140,9 +162,69 @@ this.panel14.Dock = System.Windows.Forms.DockStyle.Fill; this.panel14.Location = new System.Drawing.Point(0, 0); this.panel14.Name = "panel14"; - this.panel14.Size = new System.Drawing.Size(160, 729); + this.panel14.Size = new System.Drawing.Size(160, 859); this.panel14.TabIndex = 5; // + // button8 + // + this.button8.BackColor = System.Drawing.Color.Transparent; + this.button8.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.button8.Cursor = System.Windows.Forms.Cursors.Hand; + this.button8.Dock = System.Windows.Forms.DockStyle.Top; + this.button8.FlatAppearance.BorderSize = 0; + this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button8.Font = new System.Drawing.Font("微软雅黑", 11F); + this.button8.ForeColor = System.Drawing.Color.DimGray; + this.button8.Image = global::AIMS.Properties.Resources.系统设置; + this.button8.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.button8.Location = new System.Drawing.Point(0, 500); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(160, 50); + this.button8.TabIndex = 15; + this.button8.Text = " 系统设置"; + this.button8.UseVisualStyleBackColor = false; + this.button8.Click += new System.EventHandler(this.toolStripMenuItem2_Click); + // + // button7 + // + this.button7.BackColor = System.Drawing.Color.Transparent; + this.button7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.button7.Cursor = System.Windows.Forms.Cursors.Hand; + this.button7.Dock = System.Windows.Forms.DockStyle.Top; + this.button7.FlatAppearance.BorderSize = 0; + this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button7.Font = new System.Drawing.Font("微软雅黑", 11F); + this.button7.ForeColor = System.Drawing.Color.DimGray; + this.button7.Image = global::AIMS.Properties.Resources.文书编辑; + this.button7.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.button7.Location = new System.Drawing.Point(0, 450); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(160, 50); + this.button7.TabIndex = 14; + this.button7.Text = " 文书记录"; + this.button7.UseVisualStyleBackColor = false; + this.button7.Click += new System.EventHandler(this.tsbExePlan_Click); + // + // btnCancelIn + // + this.btnCancelIn.BackColor = System.Drawing.Color.Transparent; + this.btnCancelIn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnCancelIn.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCancelIn.Dock = System.Windows.Forms.DockStyle.Top; + this.btnCancelIn.FlatAppearance.BorderSize = 0; + this.btnCancelIn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancelIn.Font = new System.Drawing.Font("微软雅黑", 11F); + this.btnCancelIn.ForeColor = System.Drawing.Color.DimGray; + this.btnCancelIn.Image = global::AIMS.Properties.Resources.显示切换; + this.btnCancelIn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnCancelIn.Location = new System.Drawing.Point(0, 400); + this.btnCancelIn.Name = "btnCancelIn"; + this.btnCancelIn.Size = new System.Drawing.Size(160, 50); + this.btnCancelIn.TabIndex = 12; + this.btnCancelIn.Text = " 取消恢复"; + this.btnCancelIn.UseVisualStyleBackColor = false; + this.btnCancelIn.Click += new System.EventHandler(this.btnCancelIn_Click); + // // btnCancelOperation // this.btnCancelOperation.BackColor = System.Drawing.Color.Transparent; @@ -159,7 +241,7 @@ this.btnCancelOperation.Name = "btnCancelOperation"; this.btnCancelOperation.Size = new System.Drawing.Size(160, 50); this.btnCancelOperation.TabIndex = 11; - this.btnCancelOperation.Text = " 取消转入"; + this.btnCancelOperation.Text = " 停止恢复"; this.btnCancelOperation.UseVisualStyleBackColor = false; this.btnCancelOperation.Click += new System.EventHandler(this.btnCancelOperation_Click); // @@ -183,24 +265,25 @@ this.btnTemplate.UseVisualStyleBackColor = false; this.btnTemplate.Click += new System.EventHandler(this.btnTemplate_Click); // - // button6 + // btnBloodGasAnalysis // - this.button6.BackColor = System.Drawing.Color.Transparent; - this.button6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.button6.Cursor = System.Windows.Forms.Cursors.Hand; - this.button6.Dock = System.Windows.Forms.DockStyle.Top; - this.button6.FlatAppearance.BorderSize = 0; - this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button6.Font = new System.Drawing.Font("微软雅黑", 11F); - this.button6.ForeColor = System.Drawing.Color.DimGray; - this.button6.Image = global::AIMS.Properties.Resources.不良事件; - this.button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.button6.Location = new System.Drawing.Point(0, 250); - this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(160, 50); - this.button6.TabIndex = 9; - this.button6.Text = " 不良事件"; - this.button6.UseVisualStyleBackColor = false; + this.btnBloodGasAnalysis.BackColor = System.Drawing.Color.Transparent; + this.btnBloodGasAnalysis.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnBloodGasAnalysis.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnBloodGasAnalysis.Dock = System.Windows.Forms.DockStyle.Top; + this.btnBloodGasAnalysis.FlatAppearance.BorderSize = 0; + this.btnBloodGasAnalysis.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnBloodGasAnalysis.Font = new System.Drawing.Font("微软雅黑", 11F); + this.btnBloodGasAnalysis.ForeColor = System.Drawing.Color.DimGray; + this.btnBloodGasAnalysis.Image = global::AIMS.Properties.Resources.血气分析; + this.btnBloodGasAnalysis.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnBloodGasAnalysis.Location = new System.Drawing.Point(0, 250); + this.btnBloodGasAnalysis.Name = "btnBloodGasAnalysis"; + this.btnBloodGasAnalysis.Size = new System.Drawing.Size(160, 50); + this.btnBloodGasAnalysis.TabIndex = 8; + this.btnBloodGasAnalysis.Text = " 血气分析"; + this.btnBloodGasAnalysis.UseVisualStyleBackColor = false; + this.btnBloodGasAnalysis.Click += new System.EventHandler(this.btnBloodGasAnalysis_Click); // // btnOutputLiquids // @@ -298,109 +381,291 @@ this.btnSelectPatient.Name = "btnSelectPatient"; this.btnSelectPatient.Size = new System.Drawing.Size(160, 50); this.btnSelectPatient.TabIndex = 3; - this.btnSelectPatient.Text = " 患者列表"; + this.btnSelectPatient.Text = " 恢复列表"; this.btnSelectPatient.UseVisualStyleBackColor = false; this.btnSelectPatient.Click += new System.EventHandler(this.btnSelectPatient_Click); // // panel4 // this.panel4.BackColor = System.Drawing.Color.White; - this.panel4.Controls.Add(this.label9); + this.panel4.Controls.Add(this.btnChage); this.panel4.Controls.Add(this.lblSpo2); - this.panel4.Controls.Add(this.label8); this.panel4.Controls.Add(this.lblRESP); this.panel4.Controls.Add(this.lblDia); - this.panel4.Controls.Add(this.label6); this.panel4.Controls.Add(this.lblPR); - this.panel4.Controls.Add(this.label4); this.panel4.Controls.Add(this.lblHR); + this.panel4.Controls.Add(this.btnsjzx); + this.panel4.Controls.Add(this.btnzsk); + this.panel4.Controls.Add(this.btndptz); + this.panel4.Controls.Add(this.btnsbwh); + this.panel4.Controls.Add(this.label9); + this.panel4.Controls.Add(this.label8); + this.panel4.Controls.Add(this.label6); + this.panel4.Controls.Add(this.label10); + this.panel4.Controls.Add(this.label7); + this.panel4.Controls.Add(this.label5); + this.panel4.Controls.Add(this.label3); + this.panel4.Controls.Add(this.label2); + this.panel4.Controls.Add(this.label4); this.panel4.Controls.Add(this.label1); this.panel4.Dock = System.Windows.Forms.DockStyle.Right; this.panel4.Font = new System.Drawing.Font("宋体", 10.5F); this.panel4.Location = new System.Drawing.Point(1200, 10); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(160, 729); + this.panel4.Size = new System.Drawing.Size(160, 859); this.panel4.TabIndex = 3; // + // btnChage + // + this.btnChage.BackColor = System.Drawing.Color.Transparent; + this.btnChage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnChage.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnChage.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnChage.FlatAppearance.BorderSize = 0; + this.btnChage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnChage.Font = new System.Drawing.Font("微软雅黑", 11F); + this.btnChage.ForeColor = System.Drawing.Color.DimGray; + this.btnChage.Image = global::AIMS.Properties.Resources.麻醉医嘱; + this.btnChage.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnChage.Location = new System.Drawing.Point(0, 609); + this.btnChage.Name = "btnChage"; + this.btnChage.Size = new System.Drawing.Size(160, 50); + this.btnChage.TabIndex = 24; + this.btnChage.Text = " 收费记录"; + this.btnChage.UseVisualStyleBackColor = false; + this.btnChage.Visible = false; + this.btnChage.Click += new System.EventHandler(this.btnChage_Click); + // + // lblSpo2 + // + this.lblSpo2.AutoSize = true; + this.lblSpo2.Font = new System.Drawing.Font("微软雅黑", 23F); + this.lblSpo2.ForeColor = System.Drawing.Color.Teal; + this.lblSpo2.Location = new System.Drawing.Point(63, 399); + this.lblSpo2.Name = "lblSpo2"; + this.lblSpo2.Size = new System.Drawing.Size(43, 40); + this.lblSpo2.TabIndex = 9; + this.lblSpo2.Text = "--"; + // + // lblRESP + // + this.lblRESP.AutoSize = true; + this.lblRESP.Font = new System.Drawing.Font("微软雅黑", 23F); + this.lblRESP.ForeColor = System.Drawing.Color.Teal; + this.lblRESP.Location = new System.Drawing.Point(63, 308); + this.lblRESP.Name = "lblRESP"; + this.lblRESP.Size = new System.Drawing.Size(43, 40); + this.lblRESP.TabIndex = 7; + this.lblRESP.Text = "--"; + // + // lblDia + // + this.lblDia.AutoSize = true; + this.lblDia.Font = new System.Drawing.Font("微软雅黑", 23F); + this.lblDia.ForeColor = System.Drawing.Color.Teal; + this.lblDia.Location = new System.Drawing.Point(43, 217); + this.lblDia.Name = "lblDia"; + this.lblDia.Size = new System.Drawing.Size(82, 40); + this.lblDia.TabIndex = 5; + this.lblDia.Text = "--/--"; + // + // lblPR + // + this.lblPR.AutoSize = true; + this.lblPR.Font = new System.Drawing.Font("微软雅黑", 23F); + this.lblPR.ForeColor = System.Drawing.Color.Teal; + this.lblPR.Location = new System.Drawing.Point(63, 126); + this.lblPR.Name = "lblPR"; + this.lblPR.Size = new System.Drawing.Size(43, 40); + this.lblPR.TabIndex = 3; + this.lblPR.Text = "--"; + // + // lblHR + // + this.lblHR.AutoSize = true; + this.lblHR.Font = new System.Drawing.Font("微软雅黑", 23F); + this.lblHR.ForeColor = System.Drawing.Color.Teal; + this.lblHR.Location = new System.Drawing.Point(63, 35); + this.lblHR.Name = "lblHR"; + this.lblHR.Size = new System.Drawing.Size(43, 40); + this.lblHR.TabIndex = 1; + this.lblHR.Text = "--"; + // + // btnsjzx + // + this.btnsjzx.BackColor = System.Drawing.Color.Transparent; + this.btnsjzx.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnsjzx.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnsjzx.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnsjzx.FlatAppearance.BorderSize = 0; + this.btnsjzx.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsjzx.Font = new System.Drawing.Font("微软雅黑", 11F); + this.btnsjzx.ForeColor = System.Drawing.Color.DimGray; + this.btnsjzx.Image = global::AIMS.Properties.Resources.工作列表; + this.btnsjzx.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnsjzx.Location = new System.Drawing.Point(0, 659); + this.btnsjzx.Name = "btnsjzx"; + this.btnsjzx.Size = new System.Drawing.Size(160, 50); + this.btnsjzx.TabIndex = 22; + this.btnsjzx.Text = " 数据中心"; + this.btnsjzx.UseVisualStyleBackColor = false; + this.btnsjzx.Click += new System.EventHandler(this.btnsjzx_Click); + // + // btnzsk + // + this.btnzsk.BackColor = System.Drawing.Color.Transparent; + this.btnzsk.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnzsk.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnzsk.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnzsk.FlatAppearance.BorderSize = 0; + this.btnzsk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnzsk.Font = new System.Drawing.Font("微软雅黑", 11F); + this.btnzsk.ForeColor = System.Drawing.Color.DimGray; + this.btnzsk.Image = global::AIMS.Properties.Resources.知识库; + this.btnzsk.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnzsk.Location = new System.Drawing.Point(0, 709); + this.btnzsk.Name = "btnzsk"; + this.btnzsk.Size = new System.Drawing.Size(160, 50); + this.btnzsk.TabIndex = 20; + this.btnzsk.Text = " 知识库"; + this.btnzsk.UseVisualStyleBackColor = false; + this.btnzsk.Click += new System.EventHandler(this.btnzsk_Click); + // + // btndptz + // + this.btndptz.BackColor = System.Drawing.Color.Transparent; + this.btndptz.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btndptz.Cursor = System.Windows.Forms.Cursors.Hand; + this.btndptz.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btndptz.FlatAppearance.BorderSize = 0; + this.btndptz.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndptz.Font = new System.Drawing.Font("微软雅黑", 11F); + this.btndptz.ForeColor = System.Drawing.Color.DimGray; + this.btndptz.Image = global::AIMS.Properties.Resources.文书状态; + this.btndptz.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btndptz.Location = new System.Drawing.Point(0, 759); + this.btndptz.Name = "btndptz"; + this.btndptz.Size = new System.Drawing.Size(160, 50); + this.btndptz.TabIndex = 19; + this.btndptz.Text = " 大屏通知"; + this.btndptz.UseVisualStyleBackColor = false; + this.btndptz.Click += new System.EventHandler(this.btndptz_Click); + // + // btnsbwh + // + this.btnsbwh.BackColor = System.Drawing.Color.Transparent; + this.btnsbwh.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnsbwh.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnsbwh.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnsbwh.FlatAppearance.BorderSize = 0; + this.btnsbwh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsbwh.Font = new System.Drawing.Font("微软雅黑", 11F); + this.btnsbwh.ForeColor = System.Drawing.Color.DimGray; + this.btnsbwh.Image = global::AIMS.Properties.Resources.耗材管理; + this.btnsbwh.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnsbwh.Location = new System.Drawing.Point(0, 809); + this.btnsbwh.Name = "btnsbwh"; + this.btnsbwh.Size = new System.Drawing.Size(160, 50); + this.btnsbwh.TabIndex = 16; + this.btnsbwh.Text = " 设备维护"; + this.btnsbwh.UseVisualStyleBackColor = false; + this.btnsbwh.Click += new System.EventHandler(this.btnsbwh_Click); + // // label9 // this.label9.AutoSize = true; this.label9.BackColor = System.Drawing.Color.White; this.label9.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label9.ForeColor = System.Drawing.Color.DimGray; - this.label9.Location = new System.Drawing.Point(31, 371); + this.label9.Location = new System.Drawing.Point(37, 376); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(95, 24); this.label9.TabIndex = 10; this.label9.Text = "SPO2( % )"; // - // lblSpo2 - // - this.lblSpo2.AutoSize = true; - this.lblSpo2.Font = new System.Drawing.Font("宋体", 13F); - this.lblSpo2.ForeColor = System.Drawing.Color.Yellow; - this.lblSpo2.Location = new System.Drawing.Point(56, 409); - this.lblSpo2.Name = "lblSpo2"; - this.lblSpo2.Size = new System.Drawing.Size(26, 18); - this.lblSpo2.TabIndex = 9; - this.lblSpo2.Text = "--"; - // // label8 // this.label8.AutoSize = true; this.label8.BackColor = System.Drawing.Color.White; this.label8.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label8.ForeColor = System.Drawing.Color.DimGray; - this.label8.Location = new System.Drawing.Point(23, 293); + this.label8.Location = new System.Drawing.Point(29, 285); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(110, 24); this.label8.TabIndex = 8; this.label8.Text = "呼吸( 次/分 )"; // - // lblRESP - // - this.lblRESP.AutoSize = true; - this.lblRESP.Font = new System.Drawing.Font("宋体", 13F); - this.lblRESP.ForeColor = System.Drawing.Color.Yellow; - this.lblRESP.Location = new System.Drawing.Point(56, 333); - this.lblRESP.Name = "lblRESP"; - this.lblRESP.Size = new System.Drawing.Size(26, 18); - this.lblRESP.TabIndex = 7; - this.lblRESP.Text = "--"; - // - // lblDia - // - this.lblDia.AutoSize = true; - this.lblDia.Font = new System.Drawing.Font("宋体", 13F); - this.lblDia.ForeColor = System.Drawing.Color.Red; - this.lblDia.Location = new System.Drawing.Point(56, 252); - this.lblDia.Name = "lblDia"; - this.lblDia.Size = new System.Drawing.Size(26, 18); - this.lblDia.TabIndex = 5; - this.lblDia.Text = "--"; - // // label6 // this.label6.AutoSize = true; this.label6.BackColor = System.Drawing.Color.White; this.label6.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label6.ForeColor = System.Drawing.Color.DimGray; - this.label6.Location = new System.Drawing.Point(15, 213); + this.label6.Location = new System.Drawing.Point(21, 194); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(127, 24); this.label6.TabIndex = 4; this.label6.Text = "血压( mmHg )"; // - // lblPR + // label10 // - this.lblPR.AutoSize = true; - this.lblPR.Font = new System.Drawing.Font("宋体", 13F); - this.lblPR.ForeColor = System.Drawing.Color.Aqua; - this.lblPR.Location = new System.Drawing.Point(56, 173); - this.lblPR.Name = "lblPR"; - this.lblPR.Size = new System.Drawing.Size(26, 18); - this.lblPR.TabIndex = 3; - this.lblPR.Text = "--"; + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.White; + this.label10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.DimGray; + this.label10.Location = new System.Drawing.Point(49, 441); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(70, 17); + this.label10.TabIndex = 2; + this.label10.Text = "90%-100%"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.BackColor = System.Drawing.Color.White; + this.label7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.ForeColor = System.Drawing.Color.DimGray; + this.label7.Location = new System.Drawing.Point(47, 350); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(74, 17); + this.label7.TabIndex = 2; + this.label7.Text = "16-20 次/分"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.BackColor = System.Drawing.Color.White; + this.label5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.ForeColor = System.Drawing.Color.DimGray; + this.label5.Location = new System.Drawing.Point(39, 259); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(91, 17); + this.label5.TabIndex = 2; + this.label5.Text = "60-140 mmHg"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.BackColor = System.Drawing.Color.White; + this.label3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.ForeColor = System.Drawing.Color.DimGray; + this.label3.Location = new System.Drawing.Point(44, 168); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(81, 17); + this.label3.TabIndex = 2; + this.label3.Text = "60-100 次/分"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.BackColor = System.Drawing.Color.White; + this.label2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.ForeColor = System.Drawing.Color.DimGray; + this.label2.Location = new System.Drawing.Point(44, 77); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(81, 17); + this.label2.TabIndex = 2; + this.label2.Text = "60-100 次/分"; // // label4 // @@ -408,30 +673,19 @@ this.label4.BackColor = System.Drawing.Color.White; this.label4.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label4.ForeColor = System.Drawing.Color.DimGray; - this.label4.Location = new System.Drawing.Point(23, 135); + this.label4.Location = new System.Drawing.Point(29, 103); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(110, 24); this.label4.TabIndex = 2; this.label4.Text = "脉搏( 次/分 )"; // - // lblHR - // - this.lblHR.AutoSize = true; - this.lblHR.Font = new System.Drawing.Font("宋体", 13F); - this.lblHR.ForeColor = System.Drawing.Color.Lime; - this.lblHR.Location = new System.Drawing.Point(56, 94); - this.lblHR.Name = "lblHR"; - this.lblHR.Size = new System.Drawing.Size(26, 18); - this.lblHR.TabIndex = 1; - this.lblHR.Text = "--"; - // // label1 // this.label1.AutoSize = true; this.label1.BackColor = System.Drawing.Color.White; this.label1.Font = new System.Drawing.Font("微软雅黑", 12.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.ForeColor = System.Drawing.Color.DimGray; - this.label1.Location = new System.Drawing.Point(23, 55); + this.label1.Location = new System.Drawing.Point(29, 12); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(110, 24); this.label1.TabIndex = 0; @@ -446,7 +700,7 @@ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1360, 739); + this.panel1.Size = new System.Drawing.Size(1360, 869); this.panel1.TabIndex = 0; // // panel5 @@ -459,21 +713,42 @@ this.panel5.Dock = System.Windows.Forms.DockStyle.Fill; this.panel5.Location = new System.Drawing.Point(160, 10); this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(1040, 729); + this.panel5.Size = new System.Drawing.Size(1040, 859); this.panel5.TabIndex = 4; // // panel8 // this.panel8.AutoScroll = true; this.panel8.BackColor = System.Drawing.Color.White; + this.panel8.Controls.Add(this.circularProgress1); this.panel8.Controls.Add(this.zgcAnaesRecord); this.panel8.Dock = System.Windows.Forms.DockStyle.Fill; this.panel8.Location = new System.Drawing.Point(0, 58); this.panel8.Name = "panel8"; - this.panel8.Size = new System.Drawing.Size(1038, 634); + this.panel8.Size = new System.Drawing.Size(1038, 759); this.panel8.TabIndex = 2; this.panel8.Scroll += new System.Windows.Forms.ScrollEventHandler(this.panel8_Scroll); // + // circularProgress1 + // + this.circularProgress1.AnimationSpeed = 50; + // + // + // + this.circularProgress1.BackgroundStyle.BackgroundImageAlpha = ((byte)(0)); + this.circularProgress1.BackgroundStyle.BackgroundImagePosition = DevComponents.DotNetBar.eStyleBackgroundImage.Zoom; + this.circularProgress1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.circularProgress1.FocusCuesEnabled = false; + this.circularProgress1.Font = new System.Drawing.Font("微软雅黑", 9F); + this.circularProgress1.Location = new System.Drawing.Point(361, 252); + this.circularProgress1.Margin = new System.Windows.Forms.Padding(4); + this.circularProgress1.Name = "circularProgress1"; + this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue; + this.circularProgress1.Size = new System.Drawing.Size(389, 239); + this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; + this.circularProgress1.TabIndex = 6; + this.circularProgress1.Value = 100; + // // zgcAnaesRecord // this.zgcAnaesRecord.Location = new System.Drawing.Point(3, 0); @@ -487,6 +762,7 @@ this.zgcAnaesRecord.ScrollMinY2 = 0D; this.zgcAnaesRecord.Size = new System.Drawing.Size(800, 1000); this.zgcAnaesRecord.TabIndex = 0; + this.zgcAnaesRecord.Visible = false; this.zgcAnaesRecord.ContextMenuBuilder += new DrawGraph.ZedGraphControl.ContextMenuBuilderEventHandler(this.zgcAnaesRecord_ContextMenuBuilder); this.zgcAnaesRecord.MouseDownEvent += new DrawGraph.ZedGraphControl.ZedMouseEventHandler(this.zgcAnaesRecord_MouseDownEvent); this.zgcAnaesRecord.MouseUpEvent += new DrawGraph.ZedGraphControl.ZedMouseEventHandler(this.zgcAnaesRecord_MouseUpEvent); @@ -498,85 +774,122 @@ // this.panel7.BackColor = System.Drawing.SystemColors.Control; this.panel7.Controls.Add(this.panel21); + this.panel7.Controls.Add(this.lblRoom); this.panel7.Controls.Add(this.label22); this.panel7.Controls.Add(this.labOperatorName); this.panel7.Controls.Add(this.label19); this.panel7.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel7.Location = new System.Drawing.Point(0, 692); + this.panel7.Location = new System.Drawing.Point(0, 817); this.panel7.Name = "panel7"; - this.panel7.Size = new System.Drawing.Size(1038, 35); + this.panel7.Size = new System.Drawing.Size(1038, 40); this.panel7.TabIndex = 1; // // panel21 // + this.panel21.Controls.Add(this.panel17); this.panel21.Controls.Add(this.btnNextPage); this.panel21.Controls.Add(this.plPrintBrowse); this.panel21.Controls.Add(this.plPrint); + this.panel21.Controls.Add(this.panel18); this.panel21.Controls.Add(this.btnUpPage); this.panel21.Controls.Add(this.plRefresh); this.panel21.Dock = System.Windows.Forms.DockStyle.Right; this.panel21.Location = new System.Drawing.Point(697, 0); this.panel21.Name = "panel21"; - this.panel21.Size = new System.Drawing.Size(341, 35); + this.panel21.Size = new System.Drawing.Size(341, 40); this.panel21.TabIndex = 10; // + // panel17 + // + this.panel17.BackgroundImage = global::AIMS.Properties.Resources.图标_末尾页; + this.panel17.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.panel17.Cursor = System.Windows.Forms.Cursors.Hand; + this.panel17.Location = new System.Drawing.Point(126, 4); + this.panel17.Name = "panel17"; + this.panel17.Size = new System.Drawing.Size(28, 28); + this.panel17.TabIndex = 4; + this.panel17.Tag = "下一页"; + this.panel17.Click += new System.EventHandler(this.btnNextEndPage_Click); + // // btnNextPage // - this.btnNextPage.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnNextPage.BackgroundImage"))); - this.btnNextPage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnNextPage.BackgroundImage = global::AIMS.Properties.Resources.图标_后一页; + this.btnNextPage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.btnNextPage.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnNextPage.Location = new System.Drawing.Point(63, 4); + this.btnNextPage.Location = new System.Drawing.Point(85, 4); this.btnNextPage.Name = "btnNextPage"; - this.btnNextPage.Size = new System.Drawing.Size(32, 25); + this.btnNextPage.Size = new System.Drawing.Size(28, 28); this.btnNextPage.TabIndex = 4; this.btnNextPage.Tag = "下一页"; this.btnNextPage.Click += new System.EventHandler(this.btnNextPage_Click); // // plPrintBrowse // - this.plPrintBrowse.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("plPrintBrowse.BackgroundImage"))); + this.plPrintBrowse.BackgroundImage = global::AIMS.Properties.Resources.图标_预览; this.plPrintBrowse.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.plPrintBrowse.Cursor = System.Windows.Forms.Cursors.Hand; - this.plPrintBrowse.Location = new System.Drawing.Point(140, 4); + this.plPrintBrowse.Location = new System.Drawing.Point(208, 4); this.plPrintBrowse.Name = "plPrintBrowse"; - this.plPrintBrowse.Size = new System.Drawing.Size(32, 25); + this.plPrintBrowse.Size = new System.Drawing.Size(28, 28); this.plPrintBrowse.TabIndex = 4; this.plPrintBrowse.Click += new System.EventHandler(this.plPrintBrowse_Click); // // plPrint // - this.plPrint.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("plPrint.BackgroundImage"))); + this.plPrint.BackgroundImage = global::AIMS.Properties.Resources.图标_打印; this.plPrint.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.plPrint.Cursor = System.Windows.Forms.Cursors.Hand; - this.plPrint.Location = new System.Drawing.Point(102, 4); + this.plPrint.Location = new System.Drawing.Point(167, 4); this.plPrint.Name = "plPrint"; - this.plPrint.Size = new System.Drawing.Size(32, 25); + this.plPrint.Size = new System.Drawing.Size(28, 28); this.plPrint.TabIndex = 3; this.plPrint.Click += new System.EventHandler(this.plPrint_Click); // + // panel18 + // + this.panel18.BackgroundImage = global::AIMS.Properties.Resources.图标_第一页; + this.panel18.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.panel18.Cursor = System.Windows.Forms.Cursors.Hand; + this.panel18.Location = new System.Drawing.Point(3, 4); + this.panel18.Name = "panel18"; + this.panel18.Size = new System.Drawing.Size(28, 28); + this.panel18.TabIndex = 3; + this.panel18.Tag = "上一页"; + this.panel18.Click += new System.EventHandler(this.btnUpFsPage_Click); + // // btnUpPage // - this.btnUpPage.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnUpPage.BackgroundImage"))); - this.btnUpPage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnUpPage.BackgroundImage = global::AIMS.Properties.Resources.图标_前一页; + this.btnUpPage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.btnUpPage.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnUpPage.Location = new System.Drawing.Point(34, 4); + this.btnUpPage.Location = new System.Drawing.Point(44, 4); this.btnUpPage.Name = "btnUpPage"; - this.btnUpPage.Size = new System.Drawing.Size(32, 25); + this.btnUpPage.Size = new System.Drawing.Size(28, 28); this.btnUpPage.TabIndex = 3; this.btnUpPage.Tag = "上一页"; this.btnUpPage.Click += new System.EventHandler(this.btnUpPage_Click); // // plRefresh // - this.plRefresh.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("plRefresh.BackgroundImage"))); + this.plRefresh.BackgroundImage = global::AIMS.Properties.Resources.图标_刷新; this.plRefresh.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.plRefresh.Cursor = System.Windows.Forms.Cursors.Hand; - this.plRefresh.Location = new System.Drawing.Point(178, 4); + this.plRefresh.Location = new System.Drawing.Point(249, 4); this.plRefresh.Name = "plRefresh"; - this.plRefresh.Size = new System.Drawing.Size(30, 25); + this.plRefresh.Size = new System.Drawing.Size(28, 28); this.plRefresh.TabIndex = 2; this.plRefresh.Click += new System.EventHandler(this.plRefresh_Click); // + // lblRoom + // + this.lblRoom.AutoSize = true; + this.lblRoom.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblRoom.Location = new System.Drawing.Point(312, 8); + this.lblRoom.Name = "lblRoom"; + this.lblRoom.Size = new System.Drawing.Size(13, 20); + this.lblRoom.TabIndex = 9; + this.lblRoom.Text = " "; + // // label22 // this.label22.AutoSize = true; @@ -585,7 +898,7 @@ this.label22.Name = "label22"; this.label22.Size = new System.Drawing.Size(68, 20); this.label22.TabIndex = 8; - this.label22.Text = "当前时间:"; + this.label22.Text = "当前床位:"; // // labOperatorName // @@ -611,7 +924,7 @@ // this.plTitleEventTime.BackColor = System.Drawing.Color.White; this.plTitleEventTime.Controls.Add(this.panel13); - this.plTitleEventTime.Controls.Add(this.panel10); + this.plTitleEventTime.Controls.Add(this.panel16); this.plTitleEventTime.Controls.Add(this.panel12); this.plTitleEventTime.Controls.Add(this.panel6); this.plTitleEventTime.Dock = System.Windows.Forms.DockStyle.Top; @@ -624,9 +937,9 @@ // this.panel13.BackColor = System.Drawing.Color.AliceBlue; this.panel13.Controls.Add(this.txtOutRoom); - this.panel13.Controls.Add(this.pictureBox6); + this.panel13.Controls.Add(this.picOutRoom); this.panel13.Controls.Add(this.button5); - this.panel13.Location = new System.Drawing.Point(702, 3); + this.panel13.Location = new System.Drawing.Point(491, 3); this.panel13.Name = "panel13"; this.panel13.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel13.Size = new System.Drawing.Size(150, 53); @@ -686,16 +999,16 @@ this.txtOutRoom.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.txtOutRoom.TabIndex = 43; // - // pictureBox6 + // picOutRoom // - this.pictureBox6.BackColor = System.Drawing.Color.Transparent; - this.pictureBox6.BackgroundImage = global::AIMS.Properties.Resources.出手术室; - this.pictureBox6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.pictureBox6.Location = new System.Drawing.Point(5, 12); - this.pictureBox6.Name = "pictureBox6"; - this.pictureBox6.Size = new System.Drawing.Size(28, 28); - this.pictureBox6.TabIndex = 42; - this.pictureBox6.TabStop = false; + this.picOutRoom.BackColor = System.Drawing.Color.Transparent; + this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室; + this.picOutRoom.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.picOutRoom.Location = new System.Drawing.Point(5, 12); + this.picOutRoom.Name = "picOutRoom"; + this.picOutRoom.Size = new System.Drawing.Size(28, 28); + this.picOutRoom.TabIndex = 42; + this.picOutRoom.TabStop = false; // // button5 // @@ -713,16 +1026,17 @@ this.button5.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.button5.UseVisualStyleBackColor = false; // - // panel10 + // panel16 // - this.panel10.BackColor = System.Drawing.Color.AliceBlue; - this.panel10.Controls.Add(this.txtBG); - this.panel10.Controls.Add(this.button2); - this.panel10.Location = new System.Drawing.Point(244, 3); - this.panel10.Name = "panel10"; - this.panel10.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); - this.panel10.Size = new System.Drawing.Size(150, 53); - this.panel10.TabIndex = 51; + this.panel16.BackColor = System.Drawing.Color.AliceBlue; + this.panel16.Controls.Add(this.txtBG); + this.panel16.Controls.Add(this.picBG); + this.panel16.Controls.Add(this.button9); + this.panel16.Location = new System.Drawing.Point(167, 3); + this.panel16.Name = "panel16"; + this.panel16.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); + this.panel16.Size = new System.Drawing.Size(150, 53); + this.panel16.TabIndex = 51; // // txtBG // @@ -739,7 +1053,7 @@ this.txtBG.Format = DevComponents.Editors.eDateTimePickerFormat.Custom; this.txtBG.InputHorizontalAlignment = DevComponents.Editors.eHorizontalAlignment.Center; this.txtBG.IsPopupCalendarOpen = false; - this.txtBG.Location = new System.Drawing.Point(31, 23); + this.txtBG.Location = new System.Drawing.Point(40, 26); this.txtBG.Margin = new System.Windows.Forms.Padding(6, 0, 6, 6); // // @@ -778,29 +1092,40 @@ this.txtBG.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.txtBG.TabIndex = 43; // - // button2 + // picBG // - this.button2.BackColor = System.Drawing.Color.Transparent; - this.button2.FlatAppearance.BorderSize = 0; - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.Font = new System.Drawing.Font("微软雅黑", 10.5F); - this.button2.ImageAlign = System.Drawing.ContentAlignment.BottomLeft; - this.button2.Location = new System.Drawing.Point(30, -3); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(100, 25); - this.button2.TabIndex = 41; - this.button2.Tag = ""; - this.button2.Text = "拔管"; - this.button2.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.button2.UseVisualStyleBackColor = false; + this.picBG.BackColor = System.Drawing.Color.Transparent; + this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; + this.picBG.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.picBG.Location = new System.Drawing.Point(5, 12); + this.picBG.Name = "picBG"; + this.picBG.Size = new System.Drawing.Size(28, 28); + this.picBG.TabIndex = 42; + this.picBG.TabStop = false; + // + // button9 + // + this.button9.BackColor = System.Drawing.Color.Transparent; + this.button9.FlatAppearance.BorderSize = 0; + this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button9.Font = new System.Drawing.Font("微软雅黑", 10.5F); + this.button9.ImageAlign = System.Drawing.ContentAlignment.BottomLeft; + this.button9.Location = new System.Drawing.Point(39, -3); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(100, 25); + this.button9.TabIndex = 41; + this.button9.Tag = ""; + this.button9.Text = "拔管"; + this.button9.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.button9.UseVisualStyleBackColor = false; // // panel12 // this.panel12.BackColor = System.Drawing.Color.AliceBlue; this.panel12.Controls.Add(this.txtAnaesthesiaEnd); - this.panel12.Controls.Add(this.pictureBox5); + this.panel12.Controls.Add(this.picAnesEnd); this.panel12.Controls.Add(this.button4); - this.panel12.Location = new System.Drawing.Point(473, 3); + this.panel12.Location = new System.Drawing.Point(329, 3); this.panel12.Name = "panel12"; this.panel12.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel12.Size = new System.Drawing.Size(150, 53); @@ -860,16 +1185,16 @@ this.txtAnaesthesiaEnd.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.txtAnaesthesiaEnd.TabIndex = 43; // - // pictureBox5 + // picAnesEnd // - this.pictureBox5.BackColor = System.Drawing.Color.Transparent; - this.pictureBox5.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束; - this.pictureBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.pictureBox5.Location = new System.Drawing.Point(5, 12); - this.pictureBox5.Name = "pictureBox5"; - this.pictureBox5.Size = new System.Drawing.Size(28, 28); - this.pictureBox5.TabIndex = 42; - this.pictureBox5.TabStop = false; + this.picAnesEnd.BackColor = System.Drawing.Color.Transparent; + this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束; + this.picAnesEnd.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.picAnesEnd.Location = new System.Drawing.Point(5, 12); + this.picAnesEnd.Name = "picAnesEnd"; + this.picAnesEnd.Size = new System.Drawing.Size(28, 28); + this.picAnesEnd.TabIndex = 42; + this.picAnesEnd.TabStop = false; // // button4 // @@ -883,7 +1208,7 @@ this.button4.Size = new System.Drawing.Size(100, 25); this.button4.TabIndex = 41; this.button4.Tag = ""; - this.button4.Text = "麻醉结束"; + this.button4.Text = "麻醉完成"; this.button4.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.button4.UseVisualStyleBackColor = false; // @@ -891,9 +1216,9 @@ // this.panel6.BackColor = System.Drawing.Color.AliceBlue; this.panel6.Controls.Add(this.txtInRoom); - this.panel6.Controls.Add(this.pictureBox2); + this.panel6.Controls.Add(this.picInRoom); this.panel6.Controls.Add(this.txtInRoom1); - this.panel6.Location = new System.Drawing.Point(15, 3); + this.panel6.Location = new System.Drawing.Point(7, 3); this.panel6.Name = "panel6"; this.panel6.Padding = new System.Windows.Forms.Padding(3, 0, 3, 6); this.panel6.Size = new System.Drawing.Size(150, 53); @@ -953,16 +1278,16 @@ this.txtInRoom.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.txtInRoom.TabIndex = 43; // - // pictureBox2 + // picInRoom // - this.pictureBox2.BackColor = System.Drawing.Color.Transparent; - this.pictureBox2.BackgroundImage = global::AIMS.Properties.Resources.入手术室; - this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; - this.pictureBox2.Location = new System.Drawing.Point(5, 12); - this.pictureBox2.Name = "pictureBox2"; - this.pictureBox2.Size = new System.Drawing.Size(28, 28); - this.pictureBox2.TabIndex = 42; - this.pictureBox2.TabStop = false; + this.picInRoom.BackColor = System.Drawing.Color.Transparent; + this.picInRoom.BackgroundImage = global::AIMS.Properties.Resources.入手术室; + this.picInRoom.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; + this.picInRoom.Location = new System.Drawing.Point(5, 12); + this.picInRoom.Name = "picInRoom"; + this.picInRoom.Size = new System.Drawing.Size(28, 28); + this.picInRoom.TabIndex = 42; + this.picInRoom.TabStop = false; // // txtInRoom1 // @@ -975,7 +1300,7 @@ this.txtInRoom1.Name = "txtInRoom1"; this.txtInRoom1.Size = new System.Drawing.Size(100, 25); this.txtInRoom1.TabIndex = 41; - this.txtInRoom1.Tag = "进恢复间"; + this.txtInRoom1.Tag = "进恢复室"; this.txtInRoom1.Text = "进恢复室"; this.txtInRoom1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.txtInRoom1.UseVisualStyleBackColor = false; @@ -991,15 +1316,14 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1360, 739); + this.ClientSize = new System.Drawing.Size(1360, 869); this.Controls.Add(this.panel1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "frmAnasRecoverBillNew"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "恢复记录单"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmAnasRecoverBillNew_FormClosing); - this.Load += new System.EventHandler(this.frmAnasRecoverBillNew_Load); + this.Load += new System.EventHandler(this.frmAnasRecordBillNew_Load); this.panel3.ResumeLayout(false); this.panel14.ResumeLayout(false); this.panel4.ResumeLayout(false); @@ -1013,15 +1337,16 @@ this.plTitleEventTime.ResumeLayout(false); this.panel13.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.txtOutRoom)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit(); - this.panel10.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.picOutRoom)).EndInit(); + this.panel16.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.txtBG)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.picBG)).EndInit(); this.panel12.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.txtAnaesthesiaEnd)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.picAnesEnd)).EndInit(); this.panel6.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.txtInRoom)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.picInRoom)).EndInit(); this.ResumeLayout(false); } @@ -1040,14 +1365,13 @@ private System.Windows.Forms.Panel btnUpPage; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label lblSpo2; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Label lblRESP; private System.Windows.Forms.Label lblDia; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label lblPR; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label lblHR; - private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lblRoom; private System.Windows.Forms.Label label22; private System.Windows.Forms.Label labOperatorName; private System.Windows.Forms.Label label19; @@ -1062,24 +1386,43 @@ private System.Windows.Forms.Button btnOperationInfo; private System.Windows.Forms.Button btnAddEvents; private System.Windows.Forms.Button btnTemplate; - private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button btnBloodGasAnalysis; private System.Windows.Forms.Button btnOutputLiquids; private DrawGraph.ZedGraphControl zgcAnaesRecord; private System.Windows.Forms.Panel panel6; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtInRoom; - private System.Windows.Forms.PictureBox pictureBox2; + private System.Windows.Forms.PictureBox picInRoom; private System.Windows.Forms.Button txtInRoom1; private System.Windows.Forms.Panel panel13; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtOutRoom; - private System.Windows.Forms.PictureBox pictureBox6; + private System.Windows.Forms.PictureBox picOutRoom; private System.Windows.Forms.Button button5; private System.Windows.Forms.Panel panel12; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtAnaesthesiaEnd; - private System.Windows.Forms.PictureBox pictureBox5; + private System.Windows.Forms.PictureBox picAnesEnd; private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button btnCancelIn; private System.Windows.Forms.Button btnCancelOperation; - private System.Windows.Forms.Panel panel10; + private System.Windows.Forms.Panel panel16; private DevComponents.Editors.DateTimeAdv.DateTimeInput txtBG; - private System.Windows.Forms.Button button2; + private System.Windows.Forms.PictureBox picBG; + private System.Windows.Forms.Button button9; + public DevComponents.DotNetBar.Controls.CircularProgress circularProgress1; + private System.Windows.Forms.Button btnsbwh; + private System.Windows.Forms.Button btnzsk; + private System.Windows.Forms.Button btndptz; + private System.Windows.Forms.Panel panel17; + private System.Windows.Forms.Panel panel18; + private System.Windows.Forms.Button btnsjzx; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label lblRESP; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnChage; } } \ No newline at end of file diff --git a/AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.cs b/AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.cs new file mode 100644 index 0000000..d0593be --- /dev/null +++ b/AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.cs @@ -0,0 +1,1748 @@ +using AIMS.DocManager; +using AIMS.OperationFront.UI; +using AIMS.PublicUI.UI; +using AIMSBLL; +using AIMSExtension; +using DevComponents.Editors.DateTimeAdv; +using DrawGraph; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Printing; +using System.Linq; +using System.Reflection; +using System.Windows.Forms; + +namespace AIMS.OperationDoing.AnasRecoverBill.UI +{ + public partial class frmAnasRecoverBillNew : Form + { + #region 初始化 + public OperationRecord _record; + public TemplateManage templateManage; + public AIMSModel.OperationRoom NowRoom; + public int PatientId = 0; + public int ApplyId = 0; + public int RecoverId = 1; + private System.Windows.Forms.Timer timerGetTextCollectorData; + public AIMSExtension.EditState State; + public bool isReadOnly = false; + + public frmAnasRecoverBillNew() + { + InitializeComponent(); + #region 时间轴事件 + txtInRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); + txtOutRoom.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); + txtAnaesthesiaEnd.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); + txtBG.MouseDown += new MouseEventHandler(txtDateTime_MouseDown); + + txtAnaesthesiaEnd.KeyUp += new KeyEventHandler(dateTimePicker_KeyUp); + txtBG.KeyUp += new KeyEventHandler(dateTimePicker_KeyUp); + + txtInRoom.LostFocus += new EventHandler(txtDateTime_LostFocus); + txtOutRoom.LostFocus += new EventHandler(txtDateTime_LostFocus); + txtAnaesthesiaEnd.LostFocus += new EventHandler(txtDateTime_LostFocus); + txtBG.LostFocus += new EventHandler(txtDateTime_LostFocus); + + this.picInRoom.BackgroundImage = global::AIMS.Properties.Resources.入手术室; + this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; + this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束; + this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室; + #endregion + //AIMSExtension.PublicMethod.SetLocalDateTime(); + } + + private void frmAnasRecordBillNew_Load(object sender, EventArgs e) + { + //系统演示 收费功能 + if (PublicMethod.OperatorNo == "admin") + { + btnChage.Visible = true; + } + + labOperatorName.Text = "(" + AIMSExtension.PublicMethod.OperatorNo + ")" + " " + AIMSExtension.PublicMethod.OperatorName; + if (NowRoom != null) lblRoom.Text = NowRoom.Name; + circularProgress1.Location = new Point((panel8.Width - circularProgress1.Width) / 2, (panel8.Height - circularProgress1.Height) / 2); + + LoadAnesRescue(); + } + + #endregion + + #region 打印方法 + public List mPanes = new List(); + public List UpPanes = new List(); + public int printWidth = 800; + public int printHeight = 1160; + int count = 0; + private void pDoc_PrintPage(object sender, PrintPageEventArgs e) + { + Font f = new Font("宋体", 10, FontStyle.Regular); + decimal Chinese_OneWidth = Convert.ToDecimal(e.Graphics.MeasureString("测", f).Width); + int pageWidth = Convert.ToInt32(Math.Round(e.PageSettings.PrintableArea.Width, 0)) - 1;//打印机可打印区域的宽度 + int onePageHeight = Convert.ToInt32(Math.Round(e.PageSettings.PrintableArea.Height, 0)) - 1;//打印机可打印区域的高度 + + int printCount = mPanes.Count; + if (mPanes.Count > 0 && count < printCount) + { + mPanes[count].Draw(e.Graphics); + count++; + if (count < printCount) + { + e.HasMorePages = true; + } + } + else + { + e.HasMorePages = false; + } + } + + private void plPrintBrowse_Click(object sender, EventArgs e) + { + int pylWidth = 3; + + PrintDocument pDoc = new PrintDocument(); + pDoc.DefaultPageSettings.Landscape = false; + pDoc.OriginAtMargins = true; + pDoc.DefaultPageSettings.Margins = new Margins(pylWidth, 0, 0, 0);//8, 0); + pDoc.DefaultPageSettings.PrinterResolution.Kind = PrinterResolutionKind.High; + pDoc.PrintPage -= new PrintPageEventHandler(PrintDocPage); + pDoc.PrintPage += new PrintPageEventHandler(PrintDocPage); + + PrintPreviewDialog pdg = new PrintPreviewDialog(); + pdg.Width = zgcAnaesRecord.Width; + Form f = (Form)pdg; + f.WindowState = FormWindowState.Maximized; + pdg.Document = pDoc; + pdg.PrintPreviewControl.Zoom = 1; + pdg.ShowDialog(this); + pdg.Focus(); + pdg.BringToFront(); + + } + + private void PrintDocPage(object sender, PrintPageEventArgs e) + { + if (_record == null) return; + + int zgcAnaesRecordWidth = zgcAnaesRecord.Size.Width; + int zgcAnaesRecordHeight = zgcAnaesRecord.Size.Height; + + printHeight = Convert.ToInt32(printWidth * 1.414) + 2; + zgcAnaesRecord.Size = new Size(printWidth, printHeight); + + foreach (PhysioDataConfig pp in _record.addPhysioList) + { + if (pp.showStyle == "显示数值") + { + pp.IsValid = false; + ///重新设置曲线属性 + pp.reSetCurveSpo2(); + } + } + TipBox.Hidden(); + + MasterPane mPane = zgcAnaesRecord.MasterPane; //this.MasterPane; + mPane.Border.IsVisible = false; + //GraphPane cPane = mPane.PaneList[0]; //graphPane; + //cPane.Border.IsVisible = false; + + //当前窗体中的矩形区域大小 + RectangleF saveRect = mPane.Rect; + + templateManage.initChart(); + mPanes.Add(mPane.Clone()); + if (e != null) + mPane.Draw(e.Graphics); //在打印文档中画出MasterPane内容 + using (Graphics g = zgcAnaesRecord.CreateGraphics()) + { + mPane.ReSize(g, saveRect); + } + + zgcAnaesRecord.Size = new Size(zgcAnaesRecordWidth, zgcAnaesRecordHeight); + templateManage.initChart(); + UpPanes.Add(mPane.Clone()); + foreach (PhysioDataConfig pp in _record.addPhysioList) + { + if (pp.showStyle == "显示数值") + { + pp.IsValid = true; + ///重新设置曲线属性 + pp.reSetCurveSpo2(); + } + } + } + private void plPrint_Click(object sender, EventArgs e) + { + if (_record == null || _record.Id == 0) return; + if (txtOutRoom.Focused) + { + zgcAnaesRecord.Focus(); + } + if (_record.State == "手术中") + { + if (txtOutRoom.CustomFormat == " ") + { + txtOutRoom.BackColor = Color.Red; + MessageBox.Show("手术还没有结束,请填写出室时间!", "系统提示"); + return; + } + } + + try + { + mPanes = new List(); + UpPanes = new List(); + int printrcount = 0; + + while (_record.pageCount != 1) + { + btnUpPage_Click(null, null); + } + while (_record.currentPage != _record.pageCount) + { + PrintDocPage(null, null); + printrcount++; + btnNextPage_Click(null, null); + if (printrcount > 10) break; + } + PrintDocPage(null, null); + + count = 0; + int pylWidth = 3; + PrintDocument pDoc = new PrintDocument(); + pDoc.DefaultPageSettings.Landscape = false; + pDoc.OriginAtMargins = true; + pDoc.DefaultPageSettings.PrinterResolution.Kind = PrinterResolutionKind.High; + pDoc.DefaultPageSettings.Margins = new Margins(pylWidth, 0, 0, 0); + pDoc.PrintPage -= new PrintPageEventHandler(pDoc_PrintPage); + pDoc.PrintPage += new PrintPageEventHandler(pDoc_PrintPage); + + System.Windows.Forms.PrintDialog pDlg = new System.Windows.Forms.PrintDialog(); + pDlg.Document = pDoc; + if (pDlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + pDoc.Print(); + } + + count = 0; + } + catch (Exception exp) + { + PublicMethod.WriteLog(exp, ""); + } + } + #endregion + + #region 上方按钮 + /// + /// 手术特殊事件时间点处理事件 + /// + /// + /// + public void txtDateTime_MouseDown(object sender, MouseEventArgs e) + { + if (PatientId == 0) return; + DateTimeInput tb = sender as DateTimeInput; + if (_record != null && _record.OutRoomTime != null) + { + if ((tb.Name == "txtBG" || tb.Name == "txtCG") && tb.Text.Trim() == "") + { + return; + } + } + + if (tb.Text.Trim() == "" && tb.CustomFormat == " ") + { + tb.BackColor = Color.White; + SetPic(sender); + } + else + { + tb.CustomFormat = "HH:mm"; + tb.ButtonDropDown.Visible = true; + } + } + private void txtDateTime_LostFocus(object sender, EventArgs e) + { + if (PatientId == 0) return; + DateTimeInput tb = sender as DateTimeInput; + if (tb.CustomFormat == "HH:mm") + { + if (tb.Name == "txtInRoom" || tb.Name == "txtOutRoom") + { + tb.CustomFormat = "MM-dd HH:mm"; + } + tb.ButtonDropDown.Visible = false; + } + if (tb.Text.Trim() != "" && tb.Value.ToString() != tb.Tag.ToString()) + { + try + { + SetPic(sender, tb.Value); + tb.BackColor = Color.White; + } + catch (Exception) + { + tb.Focus(); + tb.Value = DateTime.Parse(tb.Tag.ToString()); + return; + } + } + else + { + if (tb.Tag != null && tb.Tag.ToString() != "") + tb.Value = DateTime.Parse(tb.Tag.ToString()); + } + } + private void dateTimePicker_KeyUp(object sender, KeyEventArgs e) + { + if (PatientId == 0) return; + DateTimeInput dtpak = (DateTimeInput)sender; + if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back) + { + if (dtpak.CustomFormat != " " && dtpak.Tag != null) + { + try + { + SetPic((DateTimeInput)sender); + } + catch (Exception) + { + //PublicMethod.ShowMessage("输入的时间格式不符合规范(HH:mm)!"); + return; + } + } + + } + } + /// + /// 特殊事件触发时设置图片 + /// + /// 显示时间的控件 + private void SetPic(Object obj) + { + DrawGraph.FactEvents Inevent = null; + DateTimeInput tb = obj as DateTimeInput; + DateTime nowtime = DateTime.Now;// getOpeMaxTime(); + DateTime curTimeTemp = new DateTime(nowtime.Year, nowtime.Month, nowtime.Day, nowtime.Hour, nowtime.Minute, 0); + InsertOrUpdateEventTime(0, "txtInRoom", "入室", tb, curTimeTemp, ref Inevent); + curTimeTemp = curTimeTemp.AddSeconds(2); + InsertOrUpdateEventTime(0, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + curTimeTemp = curTimeTemp.AddSeconds(2); + InsertOrUpdateEventTime(0, "txtAnaesthesiaEnd", "麻醉完成", tb, curTimeTemp, ref Inevent); + curTimeTemp = curTimeTemp.AddSeconds(2); + InsertOrUpdateEventTime(0, "txtOutRoom", "出室", tb, curTimeTemp, ref Inevent); + + if (Inevent != null) + { + _record.FactEventsList.Add(Inevent); + if (Inevent.EventName == "入室") + { + _record.pageCount = 0; + ReviewEvent(); + } + else if (Inevent.EventName == "手术开始" || Inevent.EventName == "出室" || Inevent.EventBeginTime > _record.lastPageBegin) + { + ReviewEvent(); + } + else + { + DrawEvent(); + } + } + } + /// + /// 特殊事件触发时设置图片 + /// + /// 显示时间的控件 + private void SetPic(Object obj, DateTime curTimeTemp) + { + DrawGraph.FactEvents Inevent = null; + DateTimeInput tb = obj as DateTimeInput; + curTimeTemp = new DateTime(curTimeTemp.Year, curTimeTemp.Month, curTimeTemp.Day, curTimeTemp.Hour, curTimeTemp.Minute, 0); + //try + //{ + // if (curTimeTemp.Date < _record.PlanOperationTime.AddDays(-3).Date) + // { + // tb.Focus(); + // tb.Value = DateTime.Parse(tb.Tag.ToString()); + // return; + // } + //} + //catch (Exception) + //{ + //} + InsertOrUpdateEventTime(1, "txtInRoom", "入室", tb, curTimeTemp, ref Inevent); + curTimeTemp = curTimeTemp.AddSeconds(2); + InsertOrUpdateEventTime(1, "txtBG", "拔管", tb, curTimeTemp, ref Inevent); + curTimeTemp = curTimeTemp.AddSeconds(2); + InsertOrUpdateEventTime(1, "txtAnaesthesiaEnd", "麻醉完成", tb, curTimeTemp, ref Inevent); + curTimeTemp = curTimeTemp.AddSeconds(2); + InsertOrUpdateEventTime(1, "txtOutRoom", "出室", tb, curTimeTemp, ref Inevent); + + if (Inevent != null) + { + if (Inevent.EventName == "入室") + { + _record.pageCount = 0; + ReviewEvent(); + } + else if (Inevent.EventName == "出室" || Inevent.EventName == "手术开始" || Inevent.EventBeginTime > _record.lastPageBegin) + { + ReviewEvent(); + } + else + { + DrawEvent(); + } + } + } + /// + /// 特殊事件触发时设置图片 + /// + /// 显示时间的控件 + private void SetPic(DateTimeInput obj) + { + DrawGraph.FactEvents Inevent = null; + DateTimeInput tb = obj as DateTimeInput; + if (_record.State == "手术中") + { + DeleteEventTime("txtAnaesthesiaEnd", "麻醉完成", tb, ref Inevent); + DeleteEventTime("txtBG", "拔管", tb, ref Inevent); + } + else + { + MessageBox.Show("选择的事件不可删除 只可修改!"); + } + + if (Inevent != null) + { + tb.ButtonDropDown.Visible = false; + _record.FactEventsList.Remove(Inevent); + DrawEvent(); + } + } + /// + /// 判断控件对应的事件 删除事件 + /// + /// 事件对应的控件名称 + /// 事件名称 + /// 控件 + private void DeleteEventTime(string EventTxtName, string EventName, DateTimeInput tb, ref DrawGraph.FactEvents Inevent) + { + if (tb.Name.Equals(EventTxtName)) + { + List list = _record.FactEventsList.Where(c => c.EventName == EventName).ToList(); + if (list.Count <= 0) return; + Inevent = list[0]; + if (EventName == "入室" || EventName == "出室") + { + //PublicMethod.ShowMessage("该事件为主要事件 不可删除 只可修改!!"); + tb.Value = Inevent.EventBeginTime.Value; + Inevent = null; + return; + } + + BFactEvents.DeleteById(Inevent.Id.ToString()); + Inevent.clearAddObj(zgcAnaesRecord); + tb.CustomFormat = " "; + tb.Value = DateTime.Now; + tb.Tag = null; + + if (Inevent != null && Inevent.EventName == "麻醉完成") + { + _record.AnesthesiaEndTime = null; + this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束; + } + if (Inevent != null && Inevent.EventName == "拔管") + { + _record.OutCGTime = null; + this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; + } + + if (Inevent != null) + { + BOperationRecord.Update("OperationBeginTime=@OperationBegin,OperationEndTime=@OperationEnd,OutRoomTime=@OutRoom where Id=@id", new AIMSModel.ParameterList("@OperationBegin", _record.OperationBeginTime.HasValue ? (object)_record.OperationBeginTime.Value : (object)DBNull.Value, "@OperationEnd", _record.OperationEndTime.HasValue ? (object)_record.OperationEndTime.Value : (object)DBNull.Value, "@OutRoom", _record.OutRoomTime.HasValue ? (object)_record.OutRoomTime.Value : (object)DBNull.Value, "@id", _record.Id)); + } + } + } + /// + /// 判断控件对应的事件 插入事件 + /// + /// 0插入 1更新 + /// 事件对应的控件名称 + /// 事件名称 + /// 事件对应的对象时间 + /// 控件 + /// 事件时间 + /// 事件对象 + private void InsertOrUpdateEventTime(int state, string EventTxtName, string EventName, DateTimeInput tb, DateTime curTimeTemp, ref DrawGraph.FactEvents Inevent) + { + //if (tb.Name.Equals(EventTxtName)) + //{ + // string messing = ""; + // bool timeistrue = true; + // timeistrue = FillAnasReordBill.IfTimeisTrue(true, _record, EventName, curTimeTemp, ref messing); + // if (_record.State != null && _record.State != "5") + // { + // if (messing != "") + // { + // MessageBox.Show(messing); + // } + // } + // else + // { timeistrue = true; } + // if (EventName == "出室" && _record.State == "手术中" && state == 0) + // { + // if (GetOpeState(ref messing) == false) + // { + // if (messing != "") MessageBox.Show(messing, "系统提示"); + // //if (messing == "请填写手术不良事件!") + // // btnAdverseFactEvents_Click(null, null); + // return; + // } + // } + // if (timeistrue == false) + // { + // if (tb.Tag != null) tb.Value = DateTime.Parse(tb.Tag.ToString()); + // return; + // } + // if (EventName == "出室" && curTimeTemp.ToString("yyyy-MM-dd HH:mm") == _record.lastPageBegin.ToString("yyyy-MM-dd HH:mm")) + // { + // curTimeTemp = _record.lastPageBegin; + // } + // if (state != 1) + // { + // Inevent = BFactEvents.Insert(PatientId, EventName, curTimeTemp, curTimeTemp, RecoverId); + // } + // else + // { + // updateEventTime(EventName, curTimeTemp, ref Inevent); + // } + // tb.Value = curTimeTemp; + // tb.Tag = curTimeTemp; + + // if (Inevent != null && Inevent.EventName == "入室" && _record.InRoomTime != Inevent.EventBeginTime) + // { + // _record.InRoomTime = Inevent.EventBeginTime; + // this.picInRoom.BackgroundImage = global::AIMS.Properties.Resources.入手术室_select; + // } + // if (Inevent != null && Inevent.EventName == "麻醉开始" && _record.AnesthesiaBeginTime != Inevent.EventBeginTime) + // { + // _record.AnesthesiaBeginTime = Inevent.EventBeginTime; + // this.picAnesBegin.BackgroundImage = global::AIMS.Properties.Resources.麻醉开始_select; + // } + // if (Inevent != null && Inevent.EventName == "手术开始" && _record.OperationBeginTime != Inevent.EventBeginTime) + // { + // _record.OperationBeginTime = Inevent.EventBeginTime; + // this.picOpeBegin.BackgroundImage = global::AIMS.Properties.Resources.手术开始_select; + // } + // if (Inevent != null && Inevent.EventName == cmbCGType.Text && _record.InCGTime != Inevent.EventBeginTime) + // { + // _record.InCGType = cmbCGType.Text; + // _record.InCGTime = Inevent.EventBeginTime; + // this.picCG.BackgroundImage = global::AIMS.Properties.Resources.置管_select; + // } + // if (Inevent != null && Inevent.EventName == "拔管" && _record.OutCGTime != Inevent.EventBeginTime) + // { + // _record.OutCGTime = Inevent.EventBeginTime; + // this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管_select; + // } + // if (Inevent != null && Inevent.EventName == "手术结束" && _record.OperationEndTime != Inevent.EventBeginTime) + // { + // _record.OperationEndTime = Inevent.EventBeginTime; + // this.picOpeEnd.BackgroundImage = global::AIMS.Properties.Resources.手术结束_select; + // } + // if (Inevent != null && Inevent.EventName == "麻醉完成" && _record.AnesthesiaEndTime != Inevent.EventBeginTime) + // { + // _record.AnesthesiaEndTime = Inevent.EventBeginTime; + // this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束_select; + // } + // if (Inevent != null && Inevent.EventName == "出室" && _record.OutRoomTime != Inevent.EventBeginTime) + // { + // _record.OutRoomTime = Inevent.EventBeginTime; + // this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室_select; + // } + // if (Inevent != null) + // { + // BOperationRecord.Update("InRoomTime=@InRoom,OperationBeginTime=@OperationBegin,OperationEndTime=@OperationEnd,OutRoomTime=@OutRoom where Id=@id ", new AIMSModel.ParameterList("@InRoom", _record.InRoomTime.HasValue ? (object)_record.InRoomTime.Value : (object)DateTime.Now, "@OperationBegin", _record.OperationBeginTime.HasValue ? (object)_record.OperationBeginTime.Value : (object)DBNull.Value, "@OperationEnd", _record.OperationEndTime.HasValue ? (object)_record.OperationEndTime.Value : (object)DBNull.Value, "@OutRoom", _record.OutRoomTime.HasValue ? (object)_record.OutRoomTime.Value : (object)DBNull.Value, "@id", _record.Id)); + // } + //} + } + /// + /// 修改事件时间 + /// + /// + /// + public void updateEventTime(string eventName, DateTime dt, ref DrawGraph.FactEvents elist) + { + List list = _record.FactEventsList.Where(c => c.EventName == eventName).ToList(); + if (list.Count <= 0) return; + elist = list[0]; + if (elist.EventBeginTime != dt) + { + elist.EventBeginTime = dt; + elist.EventEndTime = dt; + BFactEvents.Update("EventBeginTime=@EventBeginTime,EventEndTime=@EventEndTime where id=@id ", new AIMSModel.ParameterList("@EventBeginTime", elist.EventBeginTime, "@EventEndTime", elist.EventEndTime, "@id", elist.Id)); + } + } + #endregion + + #region 下方按钮 + private void panel8_Scroll(object sender, ScrollEventArgs e) + { + templateManage.SetPYL(); + } + + private void plRefresh_Click(object sender, EventArgs e) + { + if (PatientId == 0) return; + //刷新到当前页 + ReviewEvent(); + } + private void btnUpPage_Click(object sender, EventArgs e) + { + if (PatientId == 0) return; + if (_record.pageCount == 1) return; + SetUpPageTime(); + ReviewEvent(); + } + private void btnNextPage_Click(object sender, EventArgs e) + { + if (PatientId == 0) return; + if (_record.pageCount == _record.currentPage) return; + SetNextPageTime(); + ReviewEvent(); + } + + private void btnUpFsPage_Click(object sender, EventArgs e) + { + while (_record.pageCount != 1) + { + btnUpPage_Click(null, null); + } + } + + private void btnNextEndPage_Click(object sender, EventArgs e) + { + while (_record.currentPage != _record.pageCount) + { + btnNextPage_Click(null, null); + } + } + public void SetUpPageTime() + { + if (_record.pageBegin < _record.sharpBegin) return; + _record.lastPageBegin = _record.pageBegin; + _record.pageBegin = _record.pageBegin.AddMinutes(-240); + _record.pageCount--; + if (_record.pageCount < 1) _record.pageCount = 1; + } + public void SetNextPageTime() + { + //当下一页的开始时间,小于当前最大时间 + DateTime curTimeTemp = getOpeMaxTime(_record); + if (_record.lastPageBegin > curTimeTemp) return; + //先设置新页的开始时间 + _record.pageBegin = _record.lastPageBegin; + _record.lastPageBegin = _record.pageBegin.AddMinutes(240); + _record.pageCount++; + if (_record.pageCount > _record.currentPage) _record.pageCount = _record.currentPage; + } + + #endregion + + #region 左侧按钮 + private void btnSelectPatient_Click(object sender, EventArgs e) + { + OperationDoing.AnasRecordBill.UI.frmRecoverPatient frmSelectPatient = new AnasRecordBill.UI.frmRecoverPatient(); + //frmSelectPatient.isMainOpen = true; + frmSelectPatient.FormClosed += new FormClosedEventHandler(frmSelectPatient_FormClosed); + frmSelectPatient.ShowDialog(); + + } + void frmSelectPatient_FormClosed(object sender, FormClosedEventArgs e) + { + LoadAnesRescue(); + } + + + private System.Windows.Forms.Timer timerLoadAnesRescue; + + public void LoadAnesRescue() + { + circularProgress1.IsRunning = true; + circularProgress1.Visible = true; + zgcAnaesRecord.Visible = false; + timerLoadAnesRescue = new System.Windows.Forms.Timer(components); + timerLoadAnesRescue.Enabled = true;//调试时设置为FALSE , + timerLoadAnesRescue.Interval = 300; + timerLoadAnesRescue.Tick -= TimerLoadAnesRescue_Tick; + timerLoadAnesRescue.Tick += TimerLoadAnesRescue_Tick; + timerLoadAnesRescue.Start(); + } + private void TimerLoadAnesRescue_Tick(object sender, EventArgs e) + { + //try + //{ + // timerLoadAnesRescue.Dispose(); + // if (PatientId > 0 && State == AIMSExtension.EditState.ADD) + // { + // try + // { + // HelperDB.DbHelperSQL.BeginTrans(); + // _record = new OperationRecord(); + // _record.OperationApplyId = ApplyId; + // _record.PatientId = PatientId; + // _record.RecoverId = RecoverId; + // _record.Id = BOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, "InRoomTime", DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")), NowRoom.Id.Value); + // BOperationRecord.UpdateState(PatientId, RecoverId, 1); + // HelperDB.DbHelperSQL.CommitTrans(); + // //_record.currentPage = 1; + // ClearTimeText(); + // btnSelectPatient.Enabled = false; + // DrawAnasReordBill.IniDrawAnasReordBill2(_record, zgcAnaesRecord, ref templateManage); //初始化麻醉记录单界 + // StartTimer(); + // } + // catch + // { + // HelperDB.DbHelperSQL.RollbackTrans(); + // } + // } + // else if (PatientId > 0 && State == AIMSExtension.EditState.EDIT) + // { + // _record = new OperationRecord(); + // btnSelectPatient.Enabled = false; //清空记录点并重新加载 + // ClearTimeText(); + // if (templateManage != null) + // { + // templateManage.ControlClear(); + // } + // DrawAnasReordBill.IniDrawAnasReordBill2(_record, zgcAnaesRecord, ref templateManage); //初始化麻醉记录单界面 + // StartTimer(); + // } + // else if (PatientId > 0 && State == AIMSExtension.EditState.BROWSE) + // { + // _record = new OperationRecord(); + // btnSelectPatient.Enabled = true; + // btnCancelOperation.Enabled = false; + // btnCancelIn.Enabled = false; + // btnTemplate.Enabled = false; + // ClearTimeText(); + // if (templateManage != null) + // { + // templateManage.ControlClear(); + // } + // DrawAnasReordBill.IniDrawAnasReordBill2(_record, zgcAnaesRecord, ref templateManage); //初始化麻醉记录单界面 + // DisposeTimer(); + // } + // plRefresh_Click(null, null); + // if (_record.MedicalRecord != null && _record.MedicalRecord != "") + // { + // btnOperationInfo.Enabled = false; + // btnOutputLiquids.Enabled = false; + // btnDrug.Enabled = false; + // btnAddEvents.Enabled = false; + // button6.Enabled = false; + // btnBloodGasAnalysis.Enabled = false; + // txtInRoom.Enabled = false; + // txtAnaesthesiaBegin.Enabled = false; + // txtOperationBegin.Enabled = false; + // txtOperationEnd.Enabled = false; + // txtAnaesthesiaEnd.Enabled = false; + // txtOutRoom.Enabled = false; + // txtCG.Enabled = false; + // txtBG.Enabled = false; + // isReadOnly = true; + // } + //} + //catch (Exception ex) + //{ + // throw ex; + //} + //circularProgress1.IsRunning = false; + //circularProgress1.Visible = false; + //zgcAnaesRecord.Visible = true; + + } + + private void btnOperationInfo_Click(object sender, EventArgs e) + { + //if (PatientId != 0) + //{ + // AIMS.OperationDoing.AnasRecordBill.UI.frmOperationInfoNew frmOperationInfo = new frmOperationInfoNew(); + // frmOperationInfo._record = _record; + // frmOperationInfo.FormClosed += new FormClosedEventHandler(plRefresh_Click); + // frmOperationInfo.ShowDialog(); + //} + //else + //{ + // MessageBox.Show("请选择患者"); + //} + } + + private void btnDrug_Click(object sender, EventArgs e) + { + if (PatientId != 0) + { + PublicUI.UI.frmFactDrugNew frmFactDrug = new PublicUI.UI.frmFactDrugNew(); + frmFactDrug._record = _record; + frmFactDrug.zgcAnaesRecord = zgcAnaesRecord; + frmFactDrug.DrugTypeId = 1; // 事件类型 1 麻醉单事件 2 麻醉恢复单 + frmFactDrug.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); + frmFactDrug.ShowDialog(); + } + else + { + MessageBox.Show("请选择患者"); + } + } + private void btnAddEvents_Click(object sender, EventArgs e) + { + if (PatientId != 0) + { + PublicUI.UI.frmFactEventsNew frmFactEventsNew = new PublicUI.UI.frmFactEventsNew(); + frmFactEventsNew._record = _record; + frmFactEventsNew.zgcAnaesRecord = zgcAnaesRecord; + frmFactEventsNew.EventTypeId = 1; // 事件类型 1 麻醉单事件 2 麻醉恢复单 + frmFactEventsNew.EventParam += ReferEventDrugs; + frmFactEventsNew.ShowDialog(); + } + else + { + MessageBox.Show("请选择患者"); + } + } + private void btnOutputLiquids_Click(object sender, EventArgs e) + { + if (PatientId != 0) + { + PublicUI.UI.frmFactOutputLiquidsNew frmFactOutputLiquids = new PublicUI.UI.frmFactOutputLiquidsNew(); + frmFactOutputLiquids._record = _record; + frmFactOutputLiquids.OutputLiquidTypeId = 1; // 事件类型 1 麻醉单事件 2 麻醉恢复单 + frmFactOutputLiquids.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); + frmFactOutputLiquids.ShowDialog(); + } + else + { + MessageBox.Show("请选择患者"); + } + } + private void button6_Click(object sender, EventArgs e) + { + frmAnaseDataQualityRecord frmAnaseDataQuality = new frmAnaseDataQualityRecord(); + frmAnaseDataQuality._record = _record; + frmAnaseDataQuality.ShowDialog(); + } + void frmFactEventsNew_FormClosed(object sender, FormClosedEventArgs e) + { + plRefresh_Click(null, null); + } + private void btnCancelOperation_Click(object sender, EventArgs e) + { + if (PatientId == 0) + { + MessageBox.Show("请选择患者!"); + return; + } + //if (BLL.FillAnasRecordBillData.GetDataCount(_record.Id.Value, PatientId, RecoverId) > 0) + //{ + // MessageBox.Show("清除数据在进行作废手术操作!"); + // return; + //} + //if (MessageBox.Show("确认要停止手术吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + //{ + // try + // { + + // HelperDB.DbHelperSQL.BeginTrans(); + // BOperationApply.UpdateApplyState(ApplyId, 11); + // //BOperationRecord.DeleteOperationRecordData(PatientId, RecoverId); + // BOperationRecord.UpdateState(PatientId, 1, 5); + // HelperDB.DbHelperSQL.CommitTrans(); + + // //ClearData(); + // this.Close(); + // } + // catch + // { + // HelperDB.DbHelperSQL.RollbackTrans(); + // } + //} + } + private void btnCancelIn_Click(object sender, EventArgs e) + { + if (PatientId == 0) + { + MessageBox.Show("请选择患者!"); + return; + } + //if (BLL.FillAnasRecordBillData.GetDataCount(_record.Id.Value, PatientId, RecoverId) > 0) + //{ + // MessageBox.Show("清除数据在进行取消转入操作!"); + // return; + //} + //if (MessageBox.Show("确认要取消转入吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + //{ + // try + // { + // HelperDB.DbHelperSQL.BeginTrans(); + // BOperationApply.UpdateApplyState(ApplyId, 5); + // BOperationRecord.DeleteOperationRecordData(_record.Id.Value, PatientId, RecoverId); + // HelperDB.DbHelperSQL.CommitTrans(); + + // DisposeTimer(); + // //ClearData(); + // this.Close(); + // } + // catch + // { + // HelperDB.DbHelperSQL.RollbackTrans(); + // } + //} + } + private void btnTemplate_Click(object sender, EventArgs e) + { + if (PatientId == 0) + { + MessageBox.Show("请选择患者!"); + return; + } + PublicUI.UI.frmTemplate frmTemplateObj = new PublicUI.UI.frmTemplate(); + frmTemplateObj.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); + frmTemplateObj.InRoomTime = _record.InRoomTime.Value; + frmTemplateObj.PatientId = PatientId; + frmTemplateObj.TypeId = 1; + frmTemplateObj.ShowDialog(); + + } + private void tsbExePlan_Click(object sender, EventArgs e) + { + if (PatientId == 0) + { + MessageBox.Show("请先选择患者!"); + return; + } + if (_record.Applydiagnose == null || _record.Applydiagnose == "") + { + MessageBox.Show("请选择诊断后再填写文书!", "系统提示"); + ModifyApply_Click(null, null); + return; + } + PatientRecord patient = PatientRecord.GetPatientRecord(PatientId); + frmDocument frmDocument = new frmDocument(patient); + frmDocument.StartPosition = FormStartPosition.CenterScreen; + frmDocument.WindowState = FormWindowState.Maximized; + frmDocument.ShowDialog(); + } + void toolStripMenuItem2_Click(object sender, EventArgs e) + { + frmPhysiosSetting frm = new frmPhysiosSetting(); + frm.ConfigParam += new frmPhysiosSetting.ConfigParamHandler(templateManage.frmInstance_ConfigParam); + frm._record = _record; + frm.ShowDialog(); + } + private void reDrawAnalysis() + { + try + { + //图表的对象 + TextPackObj janCePack = templateManage.GetPackObjectOTag("PhysioDataManage_TextPackObj_17"); + LinePackObj H5pack = templateManage.GetPackObjectOTag("IconManage_LinePackObj_5"); + RectangleFramePackObj IconPpack = templateManage.GetPackObjectOTag("IconManage_RectangleFramePackObj_2"); + foreach (FactBloodGasAnalysis analysis in _record.FactBloodGasAnalysisList) + { + analysis.clearAddObj(zgcAnaesRecord); + if (analysis.RecordTime.Value >= _record.pageBegin && analysis.RecordTime.Value < _record.lastPageBegin) + { + analysis.setAnasArr(zgcAnaesRecord, H5pack.RealX, IconPpack.RealY, _record.pageBegin, _record.pageBegin.AddMinutes(240)); + analysis.drawText(janCePack.RealEndX, janCePack.RealY); + } + } + if (_record.FactBloodGasAnalysisList != null && _record.FactBloodGasAnalysisList.Count > 0) + zgcAnaesRecord.Refresh(); + } + catch (Exception exp) + { + PublicMethod.WriteLog(exp, ""); + } + } + + #endregion + + #region 采集程序 + public DateTime? LastMonitorDataTime = null; + private void timerGetCollectorData_Tick(bool isOpen) + { + if (State == AIMSExtension.EditState.BROWSE || _record.State != "手术中" || NowRoom == null || isReadOnly == true) return; + //if (!PublicMethod.RoleId.Operator.RoleRef.Name.Contains("麻醉") && PublicMethod.Operator.Id != _record.OperatorId + // && _record.OperatorId != 1 && PublicMethod.Operator.Name != "系统管理员") return; + if (_record.OutRoomTime != null && DateTime.Now >= _record.OutRoomTime) return; + DateTime dtTime = DateTime.Now; + + double span = ((TimeSpan)(dtTime - _record.InRoomTime.Value)).TotalSeconds % 300; + if (span < 10 || span > 12) + return; + if (LastMonitorDataTime != null && LastMonitorDataTime.Value.ToString("yyyy-MM-dd HH:mm") == dtTime.ToString("yyyy-MM-dd HH:mm")) return; + if (LastMonitorDataTime != null && LastMonitorDataTime.Value > dtTime) return; + try + { + //bool isNowRoom = isOpeRoom(); + //if (isNowRoom == false) + //{ + // return; + //} + + LastMonitorDataTime = dtTime; + DateTime InsertTime = Convert.ToDateTime(dtTime.ToString("yyyy-MM-dd HH:mm:00.000")); + int date = 0; + + List physioDatas = new List(); + foreach (PhysioDataConfig addPP in _record.addPhysioList) + { + string key = addPP.Name; + string value = addPP.Enname; + if (addPP.IsValid == false) continue; + //if (addPP.StopCollect == true) continue; + if (key == "机控呼吸") continue; + if (value == null || value == "") continue; + + int minMinutes = -5; + DataTable dtPhysioData = BOperationRecord.getPhysioDataByTimeName(NowRoom.Ip, value, InsertTime.AddMinutes(minMinutes), InsertTime.AddSeconds(1)); + if (dtPhysioData != null && dtPhysioData.Rows.Count > 0) + { + foreach (DataRow dr in dtPhysioData.Rows) + { + try + { + if (Double.Parse(dr["ParamValue"].ToString()) <= 1) continue; + if (key.Contains("压") && Double.Parse(dr["ParamValue"].ToString()) <= 30) continue; + if (isCgtime(addPP.Name, dtTime)) continue; + PhysioData pdTemp = new PhysioData(); + pdTemp.RecordTime = dtTime; + pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); + pdTemp.YAisx = addPP.YAisx; + pdTemp.PhysioDataConfigId = addPP.Id; + pdTemp.PatientId = _record.Id.Value; + physioDatas.Add(pdTemp); + continue; + } + catch (Exception) + { + continue; + } + } + } + } + + //有有创清空无创 + foreach (var pdTemp in physioDatas) + { + if (pdTemp.PhysioDataConfigId == 7) + { + foreach (var temp in physioDatas) + { + if (temp.PhysioDataConfigId == 5) + { + temp.Value = 0; + } + } + } + if (pdTemp.PhysioDataConfigId == 8) + { + foreach (var temp in physioDatas) + { + if (temp.PhysioDataConfigId == 6) + { + temp.Value = 0; + } + } + } + } + + foreach (var pdTemp in physioDatas) + { + if (pdTemp.Value < 1) continue; + PhysioDataConfig addPP = _record.addPhysioList.Where(a => pdTemp.PhysioDataConfigId == a.Id).ToList()[0]; + addPP.AddOrDelItem(pdTemp, 5); + date++; + } + + if (dtTime > _record.lastPageBegin && ((TimeSpan)(dtTime - _record.lastPageBegin)).TotalHours < 24 && date > 0) + { + _record.currentPage++; + btnNextPage_Click(null, null); + } + + } + catch (Exception) + { + //getPhysioData_Click(null, null); + } + } + + public string szy;//舒张压 + public string ssy;//收缩压 + public DateTime? LastRespMonitorDataTime; + private void timerGetTextCollectorData_Tick(object sender, EventArgs e) + { + try + { + if (((TimeSpan)(DateTime.Now - _record.lastPageBegin)).TotalHours > 24 || NowRoom == null) return; + timerGetCollectorData_Tick(false); + ShowMonitorDataToRight(); + } + catch (Exception) + { + //PublicMethod.WriteLog(ex); + } + } + + private BackgroundWorker backgroundWorker1; + public void ShowMonitorDataToRight() + { + this.backgroundWorker1 = new BackgroundWorker(); + this.backgroundWorker1.WorkerReportsProgress = true; + this.backgroundWorker1.WorkerSupportsCancellation = true; + this.backgroundWorker1.DoWork += new DoWorkEventHandler(this.backgroundWorker1_DoWork); + this.backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted); + this.backgroundWorker1.RunWorkerAsync(); + } + private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) + { + //BackgroundWorker worker = sender as BackgroundWorker; + //List lists = DeviceCacheData.Select(" IPAddress='" + NowRoom.Ip + "' and UpdateTime>='" + DateTime.Now.AddSeconds(-300) + "'"); + //e.Result = lists; + } + private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) + { + //List lists = e.Result as List; + //if (lists != null && lists.Count > 0) + //{ + // DeviceCacheData deviceCacheData = lists[0]; + // NowPhysioData nowPhysioData = JsonConvert.DeserializeObject(deviceCacheData.JsonData); + // foreach (PropertyInfo p in nowPhysioData.GetType().GetProperties()) + // { + // bool iswar = false; + // foreach (PhysioDataConfig keyValuePair in _record.addPhysioList) + // { + // if (keyValuePair.Enname.ToUpper() == p.Name.ToUpper()) + // { + // try + // { + // object paramValue = p.GetValue(nowPhysioData, null); + // if (paramValue != null && paramValue.ToString() != string.Empty && paramValue.ToString() != "NaN" && paramValue.ToString() != "NULL") + // { + // double value = Double.Parse(paramValue.ToString()); + // value = Convert.ToInt32(value); + // if (value < keyValuePair.WarningLowLimit || value > keyValuePair.WarningHighLimit) + // { + // iswar = true; + // } + + // if (keyValuePair.Name == "心率") + // { + // lblHR.Text = value <= 0 ? "- -" : value.ToString(); + // if (iswar == true) lblHR.ForeColor = Color.Red; else lblHR.ForeColor = Color.Green; + // } + // if (keyValuePair.Name == "自主呼吸") + // { + // lblRESP.Text = value <= 0 ? "- -" : value.ToString(); + // if (iswar == true) lblRESP.ForeColor = Color.Red; else lblRESP.ForeColor = Color.Green; + // } + // if (keyValuePair.Name == "氧饱和度") + // { + // lblSpo2.Text = value <= 0 ? "- -" : value.ToString(); + // if (iswar == true) lblSpo2.ForeColor = Color.Red; else lblSpo2.ForeColor = Color.Green; + // } + // if (keyValuePair.Name == "脉率") + // { + // lblPR.Text = value <= 0 ? "- -" : value.ToString(); + // if (iswar == true) lblPR.ForeColor = Color.Red; else lblPR.ForeColor = Color.Green; + // } + // if (keyValuePair.Name == "无创舒张压") + // { + // szy = value <= 0 ? "" : value.ToString(); + // if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green; + // } + // if (keyValuePair.Name == "无创收缩压") + // { + // ssy = value <= 0 ? "" : value.ToString(); + // if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green; + // } + // if (keyValuePair.Name == "有创舒张压") + // { + // szy = value <= 0 ? "" : value.ToString(); + // if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green; + // } + // if (keyValuePair.Name == "有创收缩压") + // { + // ssy = value <= 0 ? "" : value.ToString(); + // if (iswar == true) lblDia.ForeColor = Color.Red; else lblDia.ForeColor = Color.Green; + // } + // break; + // } + // } + // catch (Exception) + // { + // //PublicMethod.WriteLog(ex); + // } + // } + // } + // } + // string szyssy = ssy + "/" + szy; + // lblDia.Text = szyssy == "/" ? "--/--" : szyssy; + //} + //else + //{ + // lblHR.Text = "- -"; + // lblRESP.Text = "- -"; + // lblSpo2.Text = "- -"; + // lblPR.Text = "- -"; + // lblDia.Text = "--/--"; + // lblHR.ForeColor = Color.Green; + // lblRESP.ForeColor = Color.Green; + // lblSpo2.ForeColor = Color.Green; + // lblPR.ForeColor = Color.Green; + // lblDia.ForeColor = Color.Green; + //} + } + + public bool isCgtime(string key, DateTime time) + { + bool b = false; + try + { + if (key == "自主呼吸") + { + if (_record.InCGTime != null && _record.OutCGTime != null) + { + if (time > _record.InCGTime && time < _record.OutCGTime) + b = true; + } + if (_record.InCGTime != null && _record.OutCGTime == null) + { + if (time > _record.InCGTime) + b = true; + } + } + else + { + b = false; + } + } + catch (Exception ex) + { + PublicMethod.WriteLog(ex); + } + return b; + } + + private void StartTimer() + { + if (timerGetTextCollectorData == null) + timerGetTextCollectorData = new System.Windows.Forms.Timer(components); + timerGetTextCollectorData.Enabled = true;//调试时设置为FALSE , + timerGetTextCollectorData.Interval = 2000; + timerGetTextCollectorData.Tick -= new System.EventHandler(timerGetTextCollectorData_Tick); + timerGetTextCollectorData.Tick += new System.EventHandler(timerGetTextCollectorData_Tick); + timerGetTextCollectorData.Start(); + } + + private void DisposeTimer() + { + if (timerGetTextCollectorData != null) + { + timerGetTextCollectorData.Enabled = false; + timerGetTextCollectorData.Stop(); + } + } + + public void StarttimerGetTextCollectorData() + { + if (timerGetTextCollectorData == null) return; + timerGetTextCollectorData.Start(); + } + + #endregion + + #region 鼠标右键 + + private void zgcAnaesRecord_KeyUp(object sender, KeyEventArgs e) + { + if (templateManage != null) + { + ZedGraphControl send = sender as ZedGraphControl; + templateManage.zedControl_KeyUp(send, e); + } + } + + private bool zgcAnaesRecord_MouseDownEvent(ZedGraphControl sender, MouseEventArgs e) + { + if (templateManage != null && isReadOnly == false) + { + SelectWorkerValue.Hidden(); + SelectDictValue.Hidden(); + templateManage.zedControl_MouseDownEvent(sender, e); + + } + return default(bool); + } + + private bool zgcAnaesRecord_MouseUpEvent(ZedGraphControl sender, MouseEventArgs e) + { + if (templateManage != null && isReadOnly == false) + { + templateManage.zedControl_MouseUpEvent(sender, e); + } + return default(bool); + } + + private bool zgcAnaesRecord_MouseMoveEvent(ZedGraphControl sender, MouseEventArgs e) + { + if (templateManage != null) + { + templateManage.zedControl_MouseMoveEvent(sender, e); + } + return default(bool); + } + + private void zgcAnaesRecord_MouseDoubleClick(object sender, MouseEventArgs e) + { + if (templateManage != null && isReadOnly == false) + { + ZedGraphControl send = sender as ZedGraphControl; + templateManage.zedControl_MouseDoubleClick(send, e); + } + } + //public ucStripMenuItem menuItem = new ucStripMenuItem(); + private void zgcAnaesRecord_ContextMenuBuilder(ZedGraphControl sender, ContextMenuStrip menuStrip, Point mousePt, ZedGraphControl.ContextMenuObjectState objState) + { + + //if (PatientId == 0) return; + //menuStrip.Width = 1; + //menuItem.Visible = true; + //menuItem.Location = mousePt; + //menuItem.BringToFront(); + //if (menuItem.isAdd == false) + //{ + // menuItem.isAdd = true; + // zgcAnaesRecord.Controls.Add(menuItem); + //} + + //添加自定义的新菜单 + ToolStripMenuItem clearSelectCouve = new ToolStripMenuItem(); + clearSelectCouve.Text = "清空选中曲线"; + clearSelectCouve.Click += new EventHandler(clearSelectCouve_Click); + menuStrip.Items.Add(clearSelectCouve); + + if (NowRoom != null) + { + ToolStripMenuItem getPhysioData = new ToolStripMenuItem(); + getPhysioData.Text = "添加监护仪数据"; + getPhysioData.Click += getPhysioData_Click; + menuStrip.Items.Add(getPhysioData); + } + + ToolStripMenuItem ModifyApply = new ToolStripMenuItem(); + ModifyApply.Text = "手术申请信息"; + ModifyApply.Click += ModifyApply_Click; + menuStrip.Items.Add(ModifyApply); + + ToolStripMenuItem btnSyatemPhysion = new ToolStripMenuItem(); + btnSyatemPhysion.Name = "btnSyatemPhysion"; + btnSyatemPhysion.Tag = "btnSyatemPhysion"; + btnSyatemPhysion.Text = "修改痕迹"; + btnSyatemPhysion.Click += new EventHandler(btnSyatemPhysion_Click); + menuStrip.Items.Add(btnSyatemPhysion); + + } + + /// + /// 生命体征修改痕迹 + /// + /// + /// + private void btnSyatemPhysion_Click(object sender, EventArgs e) + { + if (PatientId == 0) return; + //frmPhysioDataUpdateLog Log = new frmPhysioDataUpdateLog(); + //Log.OperationRecordId = _record.Id.Value; + //Log.ShowDialog(); + } + + private void getPhysioData_Click(object sender, EventArgs e) + { + if (State != AIMSExtension.EditState.BROWSE && _record.State == "手术中" && NowRoom != null && isReadOnly == false) + { + //没有IP判断 + DataTable dtPhysioData = BOperationRecord.getPhysioDataByIp(NowRoom.Ip, _record.Id.Value, _record.InRoomTime.Value, getOpeMaxTime(_record), 5); + + //同步未画点数据 + DrawFillPhysioData(dtPhysioData); + + templateManage.Bind("PhysioDataManage"); + zgcAnaesRecord.Refresh(); + + } + } + private void DrawFillPhysioData(DataTable dtPhysioData) + { + if (dtPhysioData.Rows.Count <= 0) + return; + if (dtPhysioData != null && dtPhysioData.Rows.Count > 0) + { + foreach (var addPP in _record.addPhysioList) + { + if (addPP.IsValid == false) continue; + foreach (DataRow dr in dtPhysioData.Rows) + { + if (Double.Parse(dr["ParamValue"].ToString()) <= 0) continue; + if (dr["ParameterName"] != null && dr["ParameterName"].ToString() != "" && dr["ParameterName"].ToString().Equals(addPP.Id.ToString())) + { + PhysioData pdTemp = new PhysioData(); + pdTemp.RecordTime = DateTime.Parse(dr["InsertTime"].ToString()); + pdTemp.Value = Double.Parse(dr["ParamValue"].ToString()); + pdTemp.YAisx = addPP.YAisx; + pdTemp.PhysioDataConfigId = addPP.Id; + pdTemp.PatientId = _record.Id.Value; + addPP.AddItemByTime(pdTemp); + } + } + } + } + } + private void clearSelectCouve_Click(Object sender, EventArgs e) + { + templateManage.ClearSelectCouve(); + } + private void ModifyApply_Click(object sender, EventArgs e) + { + if (PatientId == 0) return; + + frmOperationApplyDetail frm = new frmOperationApplyDetail(); + frm.State = AIMSExtension.EditState.EDIT; + frm.EditApplyId = ApplyId; + frm.tsbExit.Visible = true; + frm.tsbCancel.Visible = false; + frm.FormClosed += (s, er) => + { + ReviewEvent(); + }; + //frm.FormBorderStyle = FormBorderStyle.None; // 无边框 + //frm.TopLevel = false; + //frm.Dock = DockStyle.Fill; + //panel8.Controls.Add(frm); + frm.Show(); + frm.Focus(); + frm.BringToFront(); + } + + #endregion + + #region 公共方法 + private void ReviewEvent() + { + //if (PatientId != 0) + //{ + // templateManage.OpeRecord = FillAnasReordBill.getRecord(_record, PatientId, RecoverId); + // templateManage.BindOperationRecordValueAll(templateManage.OpeRecord); + // reDrawEvent(); + // templateManage.Bind(); + // reDrawAnalysis(); + // zgcAnaesRecord.Refresh(); + //} + } + private void DrawEvent() + { + reDrawEvent(); + templateManage.Bind("IconManage"); + templateManage.Bind("RemarkManage"); + zgcAnaesRecord.Refresh(); + } + + private void reDrawEvent() + { + ClearTimeText(); + if (_record.InRoomTime != null) + { + txtInRoom.CustomFormat = "MM-dd HH:mm"; + txtInRoom.ButtonDropDown.Visible = false; + txtInRoom.Tag = _record.InRoomTime.Value; + txtInRoom.Value = _record.InRoomTime.Value; + this.picInRoom.BackgroundImage = global::AIMS.Properties.Resources.入手术室_select; + } + if (_record.AnesthesiaEndTime != null) + { + txtAnaesthesiaEnd.CustomFormat = "HH:mm"; + txtAnaesthesiaEnd.ButtonDropDown.Visible = false; + txtAnaesthesiaEnd.Tag = _record.AnesthesiaEndTime.Value; + txtAnaesthesiaEnd.Value = _record.AnesthesiaEndTime.Value; + this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束_select; + } + if (_record.OutRoomTime != null) + { + txtOutRoom.CustomFormat = "MM-dd HH:mm"; + txtOutRoom.ButtonDropDown.Visible = false; + txtOutRoom.Tag = _record.OutRoomTime.Value; + txtOutRoom.Value = _record.OutRoomTime.Value; + this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室_select; + } + + if (_record.OutRoomTime != null && _record.State == "手术中") + { + txtOutRoom.CustomFormat = "MM-dd HH:mm"; + txtOutRoom.ButtonDropDown.Visible = false; + txtOutRoom.Tag = _record.OutRoomTime.Value; + txtOutRoom.Value = _record.OutRoomTime.Value; + EndOperationOutRoom(); + } + } + public void ReferEventDrugs() + { + //if (IsReadOnly == false) + //BOperationRecord.Update(_record); + if (txtInRoom.Value != _record.InRoomTime) + { + _record.pageCount = 0; + ReviewEvent(); + } + else + { + plRefresh_Click(null, null); + } + } + private void ClearTimeText() + { + txtInRoom.CustomFormat = " "; + txtAnaesthesiaEnd.CustomFormat = " "; + txtOutRoom.CustomFormat = " "; + txtBG.CustomFormat = " "; + txtInRoom.Tag = null; + txtAnaesthesiaEnd.Tag = null; + txtOutRoom.Tag = null; + txtBG.Tag = null; + txtInRoom.Text = ""; + txtAnaesthesiaEnd.Text = ""; + txtOutRoom.Text = ""; + txtBG.Text = ""; + + this.picInRoom.BackgroundImage = global::AIMS.Properties.Resources.入手术室; + this.picBG.BackgroundImage = global::AIMS.Properties.Resources.拔管; + this.picAnesEnd.BackgroundImage = global::AIMS.Properties.Resources.麻醉结束; + this.picOutRoom.BackgroundImage = global::AIMS.Properties.Resources.出手术室; + } + + public DateTime getOpeMaxTime(OperationRecord myOpeRecord) + { + try + { + DateTime dts = BOperationRecord.lastMaxOperationDate(myOpeRecord.Id.Value); + DateTime nowDate = DateTime.Now; + TimeSpan tsp = nowDate - dts; + if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false + { + dts = nowDate; + } + if (dts.ToString("yyyy-MM-dd HH:mm") == myOpeRecord.pageBegin.AddMinutes(240).ToString("yyyy-MM-dd HH:mm")) + { + dts = myOpeRecord.pageBegin.AddMinutes(240); + } + if (myOpeRecord.OutRoomTime != null) + { + DateTime outRoomTime = DateTime.Parse(myOpeRecord.OutRoomTime.ToString()); + if (DateTime.Compare(dts, outRoomTime) > 0) + { + dts = outRoomTime; + } + } + return dts; + } + catch (Exception) + { + return DateTime.Now; + } + } + private bool GetOpeState(ref string message) + { + bool isTrue = true; + string anaesName = DBManage.GetDictionaryValuesById(_record.AnaesthesiaMethodId, "麻醉方式"); + + if (_record.AnaesthesiaMethodId == null || _record.AnaesthesiaMethodId.ToString().Trim() == "") + { + message = "请添加麻醉方式!"; + isTrue = false; + } + + if (anaesName.Contains("全身麻醉")) + { + if (_record.AnaseDataQualityRecordList == null || _record.AnaseDataQualityRecordList.Count <= 0) + { + message = "请填写麻醉质量质控指标"; + isTrue = false; + } + + if (_record.opeRecordInfo.StewardNumber == null || _record.opeRecordInfo.StewardNumber.ToString().Trim() == "") + { + message = "请与手术信息选择患者Steward评分!"; + isTrue = false; + } + if (_record.opeRecordInfo.Whereabouts == null || _record.opeRecordInfo.Whereabouts.ToString().Trim() == "") + { + message = "请与手术信息选择患者去向!"; + isTrue = false; + } + + if (_record.AnesthesiaDoctor != null && _record.AnesthesiaDoctor.Trim() != "") + if (_record.ASALevel == null || _record.ASALevel == "") + { + message = "请添写ASA分级!"; + isTrue = false; + } + + if (_record.OperationDoctor == null || _record.OperationDoctor.Trim() == "") + { + message = "请添加术者!"; + isTrue = false; + } + + } + + return isTrue; + } + private void EndOperationOutRoom() + { + //if (_record == null || _record.State != "手术中") return; + //try + //{ + // //CloseOtherFrom(); + // //保存持续加药未结束药品 + // foreach (FactDrug temp in _record.FactDrugList) + // { + // if (temp.IsContinue == 1 && temp.DrugBeginTime == temp.DrugEndTime) + // { + // temp.DrugEndTime = _record.OutRoomTime.Value; + // temp.OperatorNo = PublicMethod.OperatorNo; + // temp.OperatorName = PublicMethod.OperatorName; + // temp.OperateDate = DateTime.Now; + // BFactDrug.Update(temp); + // } + // } + // //保存持续事件未结束事件 + // foreach (FactEvents temp in _record.FactEventsList) + // { + // if (temp.IsContinue == 1 && temp.EventBeginTime == temp.EventEndTime) + // { + // temp.EventEndTime = _record.OutRoomTime; + // temp.OperatorNo = PublicMethod.OperatorNo; + // temp.OperatorName = PublicMethod.OperatorName; + // temp.OperateDate = DateTime.Now; + // BFactEvents.Update(temp); + // } + // } + // _record.State = "手术结束"; + // BOperationApply.UpdateApplyState(ApplyId, 8); + // BOperationRecord.UpdateState(PatientId, 1, 2); + + // //PublicMethod.WriteLog("结束转出手术: " + _record.Id); + // //TipBox.Hidden(true); + // State = AIMSExtension.EditState.BROWSE; + // btnCancelOperation.Enabled = false; + // btnCancelIn.Enabled = false; + // btnSelectPatient.Enabled = true; + // DisposeTimer(); + // ReviewEvent(); + //} + //catch (Exception exp) + //{ + // PublicMethod.WriteLog(exp, ""); + //} + + } + #endregion + + #region 右侧按钮 + private void btnyldj_Click(object sender, EventArgs e) + { + //FormUseDrugsReport formUseDrugsReport = new FormUseDrugsReport(1); + //if (_record != null) formUseDrugsReport._record = _record; + //formUseDrugsReport.Show(); + } + + private void btnzsk_Click(object sender, EventArgs e) + { + //frmKnowledgeBase frm = new frmKnowledgeBase(); + //frm.Show(); + } + + private void btndptz_Click(object sender, EventArgs e) + { + //frmNoticeLargeScreen fnc = new frmNoticeLargeScreen(); + //if (_record != null) + //{ + // fnc.lblName.Text = _record.Name; + // fnc.textBox2.Focus(); + // fnc.groupBox1.Visible = false; + //} + //fnc.ShowDialog(); + } + + private void btnxldlx_Click(object sender, EventArgs e) + { + //frmHemodynamics frm = new frmHemodynamics(); + //frm.Show(); + } + + private void btnsbwh_Click(object sender, EventArgs e) + { + //frmInstrumentRegistration frm = new frmInstrumentRegistration(); + //frm.Show(); + } + + private void btnsjzx_Click(object sender, EventArgs e) + { + MessageBox.Show("未连接到服务器 请联系管理员或稍后再试!", "系统提示"); + } + private void btnqxqd_Click(object sender, EventArgs e) + { + //if (PatientId != 0 && _record.Id != 0) + //{ + // frmGoodsBillRecord frm = new frmGoodsBillRecord(); + // frm._record = _record; + // frm.Show(); + // frm.Focus(); + // frm.BringToFront(); + //} + } + private void btnChage_Click(object sender, EventArgs e) + { + //frmChargRecordPrint frmchargRecord = new frmChargRecordPrint(_record); + //frmchargRecord.TemplateType = "麻醉"; + //frmchargRecord.Show(); + //frmchargRecord.BringToFront(); + } + private void btnBloodGasAnalysis_Click(object sender, EventArgs e) + { + //if (PatientId != 0) + //{ + // frmBloodGasAnalysisNew frmFactBloodGasAnalysis = new frmBloodGasAnalysisNew(); + // frmFactBloodGasAnalysis._record = _record; + // frmFactBloodGasAnalysis.zgcAnaesRecord = zgcAnaesRecord; + // frmFactBloodGasAnalysis.FormClosed += new FormClosedEventHandler(frmFactEventsNew_FormClosed); + // frmFactBloodGasAnalysis.ShowDialog(); + //} + //else + //{ + // MessageBox.Show("请选择患者"); + //} + } + #endregion + + } +} diff --git a/AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.resx b/AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.resx similarity index 54% rename from AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.resx rename to AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.resx index 7fb4bc4..35348c8 100644 --- a/AIMS/OperationDoing/AnasRecoverBill/UI/frmAnasRecoverBillNew.resx +++ b/AIMS/OperationDoing/AnasRecoverBill/frmAnasRecoverBillNew.resx @@ -117,315 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH - DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp - bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis - iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ - sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO - yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI - b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou - S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i - vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424 - HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR - RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb - F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ - DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE - geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM - gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs - wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr - oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms - AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8 - Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ - tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy - pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4 - UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC - WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o - 3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo - PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b - RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU - vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv - xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa - 2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI - dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn - t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z - /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz - wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj - ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj - kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m - SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN - e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF - nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/ - VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F - DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL - d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E - XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq - RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP - lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l - f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAW9JREFUSEu1lkFKw0AY - hbMSD6Ag6E5BXHkHceMRPIMk+SdJrdb7eAcPIEhF0SO4UQu6cCe4GN9Lrf6tjxiEWXwkeeX9H2EyQ7MY - YyeFVc95fXpYlIH3WRHqrKiOJapPZOjB8FiUdo/rWkrJ+1QUriHZSC2JkNxCsqoERPWJDD1zklZU32Dg - 8qKAqD6RoeeXhITBBT6GLK+G+N2+1mko+0SGHimxECE5SyspjevzBslBQskMewK7iSXAwgskW2klxOoJ - JDuqT2TowZC/JSQM7lSfyNCDAf0kpU1Un8jQgwF93+RK9YkMPRjQZ00e8Tlvqz6RoQdDuiXt19VscmOq - PpGhB4M6JNwnAfukaY8Y1Scy9GCIkLQ7/hWD9/CMHZ9CYuEDZ9cRB+M5jQQDz39O4RSS0Fzm9ckSyBZR - fSJDz5zE6jH2w4oSENUnMvR8SyyMIVmHRAqI6hMZeqZvMfu3giM9icSqh7wZ7UOC+/9IYvYJ12wad2hP - eJEAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH - DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp - bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis - iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ - sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO - yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI - b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou - S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i - vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424 - HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR - RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb - F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ - DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE - geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM - gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs - wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr - oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms - AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8 - Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ - tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy - pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4 - UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC - WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o - 3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo - PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b - RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU - vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv - xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa - 2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI - dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn - t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z - /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz - wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj - ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj - kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m - SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN - e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF - nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/ - VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F - DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL - d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E - XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq - RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP - lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l - f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAEciAABHIgBKohZBwAABdxJREFUSEt1VluME2UU - /qFVedBIjLcYowTlgQejhIAsLLu9brttp+1c2k7b6W17m5lu7wvxgi6GyIO3aHyAGK9ovARZNRohUekK - hBATjYlGgzei+yQJgihGA1i/M+0sRZaHLzPT/f/znfOd27JqrfFjIpl6Jp5Q6kBTjicvi5gcr5fK6uF6 - s32iVNZmUunMzVIkykJhgQ2t33BZsFq9edrnC6yVpBgDGUtnJoDcJYBBA4VCaV8iobwFh/Zo+uTncjyx - MhjiFzRugkh+C3AhuyBEYCTLGs1NFN1FwBmm6RXjWZmsfcqHhS1wjJzaUVa1LwUxMrT23nXscjBI/FzQ - llTSuKTolUrtOVXTnx0ECHbmC6UtmWyOSA/h7O6JfHGlFIndgd/2qFplzucP3AWwhdCLJBC0yXKcAXK5 - rE0XiqUHBlEslR/KZCdK0H9RbqKwq1hW5/A8UiypB3IT+UOw0YUKIimxEHqR+DkbdGbANHTeh6S+awKG - 3i+V9f0g2wH9mSBKS0G2DO8rINMKr9c3VKlUv1FS2SjAFsKFSOJJBozDw1o2l1fx1CFRlRekhMPpXhmJ - xtYmlZQNTx4y8fFEcoQXIreOj/utZVU/AI/j/4/ARI+EC9kSlBMl3SoUyzMw/no2k5uR5cQueDsFr7fC - 0BfIx7lma6rbam/q1uqtrl6p/pzOZHcisrbPzy2HHbYQ5iNRUJ6ABHnI4DbU/ojLNbYa3wfJKIEIGs12 - t95onW202sZvBJAdDYbC6eGRUTZis18Cg4RDJDjEgBDkeDAcFu6DBznk5zvTOAyfzuYm3ojFE08QEMGL - MP49/a2Pc1wopLjHPOz/MElGw7zEgBp0f8rt9gyhTF9otTeT8S7IjgaCoTVwgNkdjuudLvftTqebSn4Z - GvU9k0ivTM6N+/y3AWwQ83L19Qsh0Rl/gBOg/xkiqFYbf4Z5UcQfMnJc2Qb9DYhSZBq52uyBFcj7NclI - RPi9DrBBmIkfxZhgwKPo4qfpYKPZ0x9N13GNee7O5QudfKF4GN8HDRSKh1Akn2GkZHDvcTOadDr7EsAG - MR8JYmBAAkhHovKUeQml/KHD4bwGDjvRvfaLwbkg3U2QbSs51HfqTYANYj4S1D4Dmuj6h7lgSKk3epeQ - j5+8Pv+qfLE8O1mtH8fs+pWgT9aOQ9JfcJZHEbxtOoVee7Lfc/MwSPyIRBShnxjRUqnM9gAXjKLbv6JL - lBc01E5IuBzVdY+ipNegKNZkMrlVohS9E1JVQfYXnYMTp+Dwun5+L+6TAZIAxnkxEOBWoeLSJgkBsr2s - pNJOGL4BWJpMplaTTLh/yjyDqOecrrEVABvEvFzRWJwBNAh3Z7P5GZ4XaUlth2T/EhlJB09PwtAPVNIk - WaPZMw4bBvB+lhdEDWAmMOsuJL5fCUGM7QqgxeSE4nKPrUZvPKJVJo+B5Pxg15tPMwoioTMommm0AOPQ - 3N5xH7PZHfOR2Gj7KciHqlc+wiL6AONkL8Z+B0l9DDmyg7QGyV5DT8yi06mMd0O+HXg/CaeOwc75Puk/ - wTCv+kA05vGyjRg1RHICpTgkSVGGbreiH5YgwUuwjAhX4X0pxswikpN2OSRcjIqx0jsmMCSRHCiwZFJR - XqXoCLD5txiJFqFEjwTMv3u8PtvoqN2KKrKicizJhGLBKLegoy2RSGxxNCpfIQrSldDYCoMWFIoF0VlB - YuGCYQsqcR/U8ECJV5qtTYaMRBTmBWX9hmGGnd4+g9C/RUl+grBngY6q6h3I0sHlDmSbLaJHioXSLFYA - ur7UwfkOpNuPvfMxvo9QrkDAgfxqFM479N0n+iMU5kvo8rAfPZBHgst4lvFUozFZleWkimhUSKjBgIac - aTCg0TLDltRBrsMJHftGxzRIYtreYnc4UaHydTi3tz21udtCVHh/nrlcbiNBXu+4UQ20+AMcRyMGU1kw - SpCmAeUES4wmL7Zdxvg3CZFglHvZhuGNbHgjYQTV5GSjNseNcGYGc/D+VDp77X+/MKBNVB7RqgAAAABJ - RU5ErkJggg== - - - - - iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH - DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp - bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis - iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ - sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO - yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI - b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou - S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i - vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424 - HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR - RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb - F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ - DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE - geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM - gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs - wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr - oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms - AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8 - Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ - tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy - pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4 - UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC - WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o - 3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo - PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b - RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU - vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv - xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa - 2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI - dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn - t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z - /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz - wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj - ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj - kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m - SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN - e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF - nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/ - VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F - DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL - d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E - XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq - RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP - lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l - f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAYlJREFUSEu1lb9OwzAQ - xjPSsSNsZIONJ+AleANQK6omcRYeiAGpA68AC2Kpqk4IxAJIwFBA/CkDAvHn+4rPchJHAScdfrrz+e4+ - x7XdIE5SF6/g24N3UOhXCGiY7GpSxRco9CsENB+ARa65MrxF2lGi9rTvJErSA1jWcOwl0kKTQ+2XcQJY - Q99LJIxiFcI+AB6GPI+YX4NljbcI/XPtl3EPmEf/XyJvgEUyPgZn4DTHEEgO8z+tsUGcEZCVNQkXMhO5 - s4Lz4IUiMtgHKdipQQesA/bZBbPeIjIFsnXe4E5twF5YsQkwItwyk1yDJ4ALqpb1+JpjOhSRY1gLNOdW - DbZ7fYndgmZFHGRFNre69J8BL2JdpngJFmBvgBGZdLo98RsBIquwV/TNlwD6PHZjwBt+5AHrxnhUB7Ds - l/0SHWyaS2BEiD0pMR/sPnwwMyJzI+jHquWa0NirqsJVzwOwYpLwY+FfUIVg0Uqym1Tx2zRRS+wDvy1z - +URBRLinf6V0YYWARgp8yPVKgx+ORHmUtZDxwAAAAABJRU5ErkJggg== - - - - - iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH - DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp - bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis - iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ - sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO - yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI - b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou - S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i - vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424 - HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR - RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb - F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ - DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE - geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM - gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs - wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr - oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms - AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8 - Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ - tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy - pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4 - UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC - WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o - 3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo - PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b - RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU - vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv - xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa - 2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI - dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn - t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z - /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz - wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj - ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj - kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m - SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN - e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF - nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/ - VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F - DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL - d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E - XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq - RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP - lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l - f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAVxJREFUSEu1lktKxEAQ - hnslHmAEQXcjiCvvIG48gmeQdPqRTOahHsc7eICBQVH0CG58gC7cCS7iX5kk9rQliN29+Bho0v9HdVdN - Iuq6ZsmKmcdUZJaYuBxLZZ65/S7sIpGVZ6tAJM1ISGWBFjLXmzJX9/jF43xGB7tILMNPf5GYbYRfkwB8 - cPtd2EWiD/cl2m5ActsKYkh+VLKOSm4cQQKJLi89QQxJy+icOmmGC/cFgZKmRcc4okpkpjrCPbyjm+JK - +k7K1T54YsI7AiXa7uCIXplglxBJtYdKXphQnwCJLu+YQI4ASa7+UgURVMmCCeT4vwRtu4s7eWRCfYIk - qKYYpu6udk50ujlZvqD6iT/AxL9Fn/iVP0fCTk5wdJ8JJA4FMNVFYgne83a8hmaYp5bQ/AzQEFfpJKaR - UNdt4X46UWxJMzv0IRHpa4VCWdDa3TdYMT2E8IHb/00tvgDOKBzXYb2Q5gAAAABJRU5ErkJggg== - - - - - iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH - DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp - bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis - iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ - sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO - yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI - b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou - S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i - vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424 - HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR - RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb - F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ - DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE - geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM - gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs - wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr - oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms - AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8 - Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ - tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy - pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4 - UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC - WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o - 3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo - PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b - RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU - vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv - xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa - 2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI - dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn - t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z - /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz - wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj - ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj - kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m - SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN - e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF - nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/ - VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F - DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL - d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E - XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq - RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP - lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l - f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK - j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAAeFJREFUSEu1lq9OA0EQ - xvsGlbg6HC+AQuFQGDyhcKT3pzUYBI+AbILkDUgwaCSqCSEhwUBAUAMNodAAPb5vc3uZ/XN7pSnid9Od - mf2mNzd7bSPP83/H61w0jTTr1bFa4IuRCZhaPgPHsRd1aJ9BXsE4ybpHsHqP8idp91z4DIxFkvVuYG3R - EANrbehp5OILyA3zMAJSU6E/fACdyP4OwT14KdZSKEicZBuwZpE47R4ySNDrExm0uAWOqAdnCHj5BjmK - HctAgNpiGIIL2HIPLwwER9AGIk1YR1zSSbIWrMrnhW2qHL8AXnENJvUaVuWq5OKbSYEgyD+A9YoXjOM0 - W4dttHcjVeRPrSp4AlqQz/QR3WBhJxd3dMYPb3bA4hL8AN7xFn0YkhZEy57XMOKtb0snKq/BPgDnfCA3 - 9A6rYmo7eGINYQs7Pwi+1DJsbgfUmamALbPzg6Cld7BmEUwEe+4roGEbjT01qH2+AH8fbHEDPLcrWN9e - idJB7tAJ4gW3wuCMvEOkH+3H5X6sT0Ucr6usaRQQjIEUmwuMOguqw+iAu+EZ8G6cFUxWH1bpOQUEr0Bv - Yht4KA2hCiY77cjQMhYS3Kp60xZjWPqx3oSljw+WY00+wQCxJVhDh3j/wiyWvPELxs6s0O9mKlQAAAAA - SUVORK5CYII= - - 62 + AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAEAAABMLAAATCwAAAAAAAAAA diff --git a/AIMS/OperationDoing/AnasRecoverBill/UI/frmRecoverPatient.Designer.cs b/AIMS/OperationDoing/AnasRecoverBill/frmRecoverPatient.Designer.cs similarity index 100% rename from AIMS/OperationDoing/AnasRecoverBill/UI/frmRecoverPatient.Designer.cs rename to AIMS/OperationDoing/AnasRecoverBill/frmRecoverPatient.Designer.cs diff --git a/AIMS/OperationDoing/AnasRecoverBill/UI/frmRecoverPatient.cs b/AIMS/OperationDoing/AnasRecoverBill/frmRecoverPatient.cs similarity index 87% rename from AIMS/OperationDoing/AnasRecoverBill/UI/frmRecoverPatient.cs rename to AIMS/OperationDoing/AnasRecoverBill/frmRecoverPatient.cs index c4411d0..32fd2f4 100644 --- a/AIMS/OperationDoing/AnasRecoverBill/UI/frmRecoverPatient.cs +++ b/AIMS/OperationDoing/AnasRecoverBill/frmRecoverPatient.cs @@ -9,12 +9,13 @@ using System.Linq; using System.Text; using System.Windows.Forms; using AIMSBLL; +using AIMSModel; namespace AIMS.OperationDoing.AnasRecordBill.UI { public partial class frmRecoverPatient : Form { - List rooms; + List rooms; public frmRecoverPatient() { InitializeComponent(); @@ -30,7 +31,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI dgv.DataError += new DataGridViewDataErrorEventHandler(dgv_DataError); - rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='恢复室'"); + rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='恢复室'"); FillDgv(); dgv.ClearSelection(); @@ -60,7 +61,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI private void FillDgv() { dgv.Rows.Clear(); - DataTable dt = OperationDoing.AnasRecordBill.BLL.SelectPatient.GetRecoverPatientDataTable + DataTable dt = SelectPatient.GetRecoverPatientDataTable (DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString())); foreach (DataRow dr in dt.Rows) { @@ -77,11 +78,11 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } panel3.Controls.Clear(); - DataTable dt2 = OperationDoing.AnasRecoverBill.BLL.SelectPatient.GetRecoverLockingPatientDataTable + DataTable dt2 = SelectPatient.GetRecoverLockingPatientDataTable (DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString())); int i = 0, j = 0; - foreach (DataDictionary.Model.OperationRoom room in rooms) + foreach (OperationRoom room in rooms) { ucPatientRecoverCard uc = new ucPatientRecoverCard(room); uc.InRoom += Uc_InRoom; @@ -126,7 +127,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI { if (uc.buttonX1.Text == "转入恢复") { - AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecoverBillNew frmAnasRecord = new frmAnasRecoverBillNew(); + AIMS.OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBillNew frmAnasRecord = new AnasRecoverBill.UI.frmAnasRecoverBillNew(); frmAnasRecord.PatientId = SelPatientId; frmAnasRecord.ApplyId = SelApplyId; frmAnasRecord.RecoverId = RecoverId; @@ -135,10 +136,10 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI try { HelperDB.DbHelperSQL.BeginTrans(); - OperationFront.BLL.OperationApply.UpdateApplyState(SelApplyId, 7);// 7 麻醉恢复中 + BOperationApply.UpdateApplyState(SelApplyId, 7);// 7 麻醉恢复中 //增加入室事件 - DataDictionary.Model.Events EventsObj = DataDictionary.BLL.Events.GetModelByName("入室"); + Events EventsObj = BEvents.GetModelByName("入室"); if (EventsObj.Name != null) { FactEvents FactEventsObj = new FactEvents(); @@ -164,7 +165,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI } else { - AIMS.OperationDoing.AnasRecordBill.UI.frmAnasRecoverBillNew frmAnasRecord = new frmAnasRecoverBillNew(); + AIMS.OperationDoing.AnasRecoverBill.UI.frmAnasRecoverBillNew frmAnasRecord = new AnasRecoverBill.UI.frmAnasRecoverBillNew(); frmAnasRecord.PatientId = PatientId; frmAnasRecord.ApplyId = applyId; frmAnasRecord.NowRoom = AIMSBLL.BOperationRoom.SelectSingle(int.Parse(uc.Tag.ToString())); diff --git a/AIMS/OperationDoing/AnasRecoverBill/UI/frmRecoverPatient.resx b/AIMS/OperationDoing/AnasRecoverBill/frmRecoverPatient.resx similarity index 100% rename from AIMS/OperationDoing/AnasRecoverBill/UI/frmRecoverPatient.resx rename to AIMS/OperationDoing/AnasRecoverBill/frmRecoverPatient.resx diff --git a/AIMS/OperationDoing/oldSystemCode/frmChargRecordPrint.cs b/AIMS/OperationDoing/oldSystemCode/frmChargRecordPrint.cs index 1e23370..834ca49 100644 --- a/AIMS/OperationDoing/oldSystemCode/frmChargRecordPrint.cs +++ b/AIMS/OperationDoing/oldSystemCode/frmChargRecordPrint.cs @@ -1,13 +1,7 @@ -using AIMS.PublicUI.BLL; -using DevComponents.DotNetBar; +using AIMSModel; using DrawGraph; using System; -using System.Collections.Generic; -using System.Data; -using System.Diagnostics; using System.Drawing; -using System.Drawing.Printing; -using System.Linq; using System.Windows.Forms; namespace AIMS.OperationDoing.AnasRecordBill diff --git a/AIMS/OperationDoing/oldSystemCode/frmGoodsBillRecord.cs b/AIMS/OperationDoing/oldSystemCode/frmGoodsBillRecord.cs index ebc9b40..6687e41 100644 --- a/AIMS/OperationDoing/oldSystemCode/frmGoodsBillRecord.cs +++ b/AIMS/OperationDoing/oldSystemCode/frmGoodsBillRecord.cs @@ -839,7 +839,7 @@ namespace AIMS.OperationDoing.AnasRecordBill SelectOperationDoctor = frmOperationDoctor.SelectPersonData; foreach (int RowId in frmOperationDoctor.SelectPersonData) { - uTextCA1.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + uTextCA1.Text += BPerson.GetModel(RowId).Name + " ,"; } int idxStart = uTextCA1.Text.LastIndexOf(" ,"); uTextCA1.Text = uTextCA1.Text.Substring(0, idxStart); @@ -865,7 +865,7 @@ namespace AIMS.OperationDoing.AnasRecordBill SelectOperationDoctor = frmOperationDoctor.SelectPersonData; foreach (int RowId in frmOperationDoctor.SelectPersonData) { - uTextCA2.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + uTextCA2.Text += BPerson.GetModel(RowId).Name + " ,"; } int idxStart = uTextCA2.Text.LastIndexOf(" ,"); uTextCA2.Text = uTextCA2.Text.Substring(0, idxStart); @@ -892,7 +892,7 @@ namespace AIMS.OperationDoing.AnasRecordBill SelectOperationDoctor = frmOperationDoctor.SelectPersonData; foreach (int RowId in frmOperationDoctor.SelectPersonData) { - uTextCA4.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + uTextCA4.Text += BPerson.GetModel(RowId).Name + " ,"; } int idxStart = uTextCA4.Text.LastIndexOf(" ,"); uTextCA4.Text = uTextCA4.Text.Substring(0, idxStart); diff --git a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs index 5e75593..586ba08 100644 --- a/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs +++ b/AIMS/OperationDoing/oldSystemCode/frmSelectPatientGoodsBill.cs @@ -1,4 +1,6 @@ using AIMS.OremrUserControl; +using AIMSBLL; +using AIMSModel; using DrawGraph; using System; using System.Collections.Generic; @@ -22,8 +24,8 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI private void frmSelectPatientGoodsBill_Load(object sender, EventArgs e) { - List rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); - rooms.Insert(0, new DataDictionary.Model.OperationRoom() { Id = -1, Name = "" }); + List rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); + rooms.Insert(0, new OperationRoom() { Id = -1, Name = "" }); cboRoom.DataSource = rooms; cboRoom.DisplayMember = "Name"; cboRoom.ValueMember = "Id"; @@ -60,7 +62,7 @@ namespace AIMS.OperationDoing.AnasRecordBill.UI panel2.Visible = false; int i = 0, j = 0; - DataTable dt2 = OperationDoing.AnasRecordBill.BLL.SelectPatient.GetRelieveLockingPatientDataTable + DataTable dt2 = SelectPatient.GetRelieveLockingPatientDataTable (DateTime.Parse(dtpSelectPatientTime.Value.ToString("yyyy-MM-dd").ToString()), cboRoom.SelectedValue.ToString()); foreach (DataRow dr in dt2.Rows) { diff --git a/AIMS/OperationFront/BLL/ApplyAnaesthesiaMethod.cs b/AIMS/OperationFront/BLL/ApplyAnaesthesiaMethod.cs deleted file mode 100644 index c4e07b1..0000000 --- a/AIMS/OperationFront/BLL/ApplyAnaesthesiaMethod.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.BLL -{ - public class ApplyAnaesthesiaMethod - { - public static void Add(Model.ApplyAnaesthesiaMethod ApplyAnaesthesiaMethodObj) - { - new DAL.ApplyAnaesthesiaMethodDB().Add(ApplyAnaesthesiaMethodObj); - } - - public static void Delete(int OperationApplyId) - { - new DAL.ApplyAnaesthesiaMethodDB().Delete(OperationApplyId); - } - public static List GetApplyAnaesthesiaMethodList(int OperationApplyId) - { - return new DAL.ApplyAnaesthesiaMethodDB().GetApplyAnaesthesiaMethodList(OperationApplyId); - } - } -} diff --git a/AIMS/OperationFront/BLL/ApplyDiagnoseInfo.cs b/AIMS/OperationFront/BLL/ApplyDiagnoseInfo.cs deleted file mode 100644 index eadd486..0000000 --- a/AIMS/OperationFront/BLL/ApplyDiagnoseInfo.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.BLL -{ - public class ApplyDiagnoseInfo - { - public static void Add(Model.ApplyDiagnoseInfo ApplyDiagnoseInfoObj) - { - new DAL.ApplyDiagnoseInfoDB().Add(ApplyDiagnoseInfoObj); - } - - public static void Delete(int OperationApplyId) - { - new DAL.ApplyDiagnoseInfoDB().Delete(OperationApplyId); - } - public static List GetApplyDiagnoseIdList(int OperationApplyId) - { - return new DAL.ApplyDiagnoseInfoDB().GetApplyDiagnoseIdList(OperationApplyId); - } - } -} diff --git a/AIMS/OperationFront/BLL/ApplyOperationCutType..cs b/AIMS/OperationFront/BLL/ApplyOperationCutType..cs deleted file mode 100644 index f7823bf..0000000 --- a/AIMS/OperationFront/BLL/ApplyOperationCutType..cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.BLL -{ - public class ApplyOperationCutType - { - public static void Add(Model.ApplyOperationCutType ApplyOperationCutTypeObj) - { - new DAL.ApplyOperationCutTypeDB().Add(ApplyOperationCutTypeObj); - } - - public static void Delete(int OperationApplyId) - { - new DAL.ApplyOperationCutTypeDB().Delete(OperationApplyId); - } - public static List GetApplyOperationCutTypeIdList(int OperationApplyId) - { - return new DAL.ApplyOperationCutTypeDB().GetApplyOperationCutTypeIdList(OperationApplyId); - } - } -} diff --git a/AIMS/OperationFront/BLL/ApplyOperationInfo.cs b/AIMS/OperationFront/BLL/ApplyOperationInfo.cs deleted file mode 100644 index cb460bd..0000000 --- a/AIMS/OperationFront/BLL/ApplyOperationInfo.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.BLL -{ - public class ApplyOperationInfo - { - public static void Add(Model.ApplyOperationInfo ApplyOperationInfoObj) - { - new DAL.ApplyOperationInfoDB().Add(ApplyOperationInfoObj); - } - - public static void Delete(int OperationApplyId) - { - new DAL.ApplyOperationInfoDB().Delete(OperationApplyId); - } - public static List GetApplyOperationIdList(int OperationApplyId) - { - return new DAL.ApplyOperationInfoDB().GetApplyOperationIdList(OperationApplyId); - } - } -} diff --git a/AIMS/OperationFront/BLL/ApplyOperationPosition.cs b/AIMS/OperationFront/BLL/ApplyOperationPosition.cs deleted file mode 100644 index 8f22084..0000000 --- a/AIMS/OperationFront/BLL/ApplyOperationPosition.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.BLL -{ - public class ApplyOperationPosition - { - public static void Add(Model.ApplyOperationPosition ApplyOperationPositionObj) - { - new DAL.ApplyOperationPositionDB().Add(ApplyOperationPositionObj); - } - - public static void Delete(int OperationApplyId) - { - new DAL.ApplyOperationPositionDB().Delete(OperationApplyId); - } - public static List GetApplyOperationPositionIdList(int OperationApplyId) - { - return new DAL.ApplyOperationPositionDB().GetApplyOperationPositionIdList(OperationApplyId); - } - } -} diff --git a/AIMS/OperationFront/BLL/ApplyPersonDuty.cs b/AIMS/OperationFront/BLL/ApplyPersonDuty.cs deleted file mode 100644 index 57bbfd2..0000000 --- a/AIMS/OperationFront/BLL/ApplyPersonDuty.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.BLL -{ - public class ApplyPersonDuty - { - public static int Add(Model.ApplyPersonDuty ApplyPersonDutyObj) - { - return new DAL.ApplyPersonDutyDB().Add(ApplyPersonDutyObj); - } - - public static void Delete(int OperationApplyId, int PersonDutyId) - { - new DAL.ApplyPersonDutyDB().Delete(OperationApplyId, PersonDutyId); - } - public static List GetPersonIdList(int OperationApplyId, int PersonDutyId) - { - return new DAL.ApplyPersonDutyDB().GetPersonIdList(OperationApplyId, PersonDutyId); - } - public static DataTable GetPersonDataTable(int OperationApplyId) - { - return new DAL.ApplyPersonDutyDB().GetPersonDataTable(OperationApplyId); - } - } -} diff --git a/AIMS/OperationFront/BLL/OperationApply.cs b/AIMS/OperationFront/BLL/OperationApply.cs deleted file mode 100644 index f044de5..0000000 --- a/AIMS/OperationFront/BLL/OperationApply.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using HelperDB; - -namespace AIMS.OperationFront.BLL -{ - public class OperationApply - { - public static void Add(Model.OperationApply OperationApplyObj) - { - new DAL.OperationApplyDB().Add(OperationApplyObj); - } - - public static void Update(Model.OperationApply OperationApplyObj) - { - new DAL.OperationApplyDB().Update(OperationApplyObj); - } - public static void UpdatePlanOrder(int ApplyId, int PlanOrder) - { - new DAL.OperationApplyDB().UpdatePlanOrder(ApplyId, PlanOrder); - } - public static void UpdateOperationRoom(int ApplyId, int OperationRoomId, int MaxPlanOrder) - { - new DAL.OperationApplyDB().UpdateOperationRoom(ApplyId, OperationRoomId, MaxPlanOrder); - } - public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel, int IsFasting) - { - new DAL.OperationApplyDB().UpdateASA(ApplyId, ASA, HeartFunctionLevel, IsFasting); - } - public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel) - { - new DAL.OperationApplyDB().UpdateASA(ApplyId, ASA, HeartFunctionLevel); - } - public static int GetMaxPlanOrder(DateTime PlanOperationTime, int OperationRoomId) - { - return new DAL.OperationApplyDB().GetMaxPlanOrder(PlanOperationTime, OperationRoomId); - } - - public static Model.OperationApply GetModel(int Id) - { - return new DAL.OperationApplyDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.OperationApplyDB().GetDataTable(strWhere); - } - public static int GetOperationApplyMaxId() - { - return new DAL.OperationApplyDB().GetOperationApplyMaxId(); - } - public static DataTable GetOperationFrontDataTableByPatientId(int PatientId) - { - return new DAL.OperationApplyDB().GetOperationFrontDataTableByPatientId(PatientId); - } - public static DataTable GetOperationFrontDataTable(string BegInData, string EndData) - { - return new DAL.OperationApplyDB().GetOperationFrontDataTable(BegInData, EndData); - } - public static DataTable GetOperationFrontDataTableByPlanOperationTime(string BegInData, string EndData) - { - return new DAL.OperationApplyDB().GetOperationFrontDataTableByPlanOperationTime(BegInData, EndData); - } - public static void UpdateVerifyTime(int ApplyId, string VerifyTime, string VerifyOperatorNo) - { - new DAL.OperationApplyDB().UpdateVerifyTime(ApplyId, VerifyTime, VerifyOperatorNo); - } - public static void UpdateApplyState(int ApplyId, int State) - { - new DAL.OperationApplyDB().UpdateApplyState(ApplyId, State); - } - public static void UpdateApplyRoom(int ApplyId, int room) - { - new DAL.OperationApplyDB().UpdateApplyRoom(ApplyId, room); - } - public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State) - { - new DAL.OperationApplyDB().UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, State); - } - public static void UpdateStopOperation(int ApplyId, string Content) - { - new DAL.OperationApplyDB().UpdateStopOperation(ApplyId, Content); - } - public static DataTable GetOperationFrontByApplyId(List ApplyIdList) - { - return new DAL.OperationApplyDB().GetOperationFrontByApplyId(ApplyIdList); - } - /// - /// 排程手术小卡片数据集 - /// - /// - /// - /// - public static DataTable GetOperationRoomDataTable(DateTime PlanOperationTime, int OperationRoomId) - { - return new DAL.OperationApplyDB().GetOperationRoomDataTable(PlanOperationTime, OperationRoomId); - } - public static DataTable GetPlanOperationDataTable(DateTime PlanOperationTime, int OperationRoomId) - { - return new DAL.OperationApplyDB().GetPlanOperationDataTable(PlanOperationTime, OperationRoomId); - } - - public static void UpdateOperationRoom(int ApplyId, int OperationRoomId) - { - new DAL.OperationApplyDB().UpdateOperationRoom(ApplyId, OperationRoomId); - } - - public static DataTable SelectPlanedOpeByRoom(string whereSql) - { - try - { - string sql = @" SELECT * FROM V_OperationFront where " + whereSql + " "; - return DBHelper.GetDataTable(sql); - } - catch (Exception) - { - return null; - } - } - - } -} diff --git a/AIMS/OperationFront/BLL/Oris_Patient.cs b/AIMS/OperationFront/BLL/Oris_Patient.cs deleted file mode 100644 index 418fce9..0000000 --- a/AIMS/OperationFront/BLL/Oris_Patient.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.BLL -{ - public class Oris_Patient - { - public static void Add(Model.Oris_Patient Oris_PatientObj) - { - new DAL.Oris_PatientDB().Add(Oris_PatientObj); - } - - public static void Update(Model.Oris_Patient Oris_PatientObj) - { - new DAL.Oris_PatientDB().Update(Oris_PatientObj); - } - - public static Model.Oris_Patient GetModel(int Id) - { - return new DAL.Oris_PatientDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.Oris_PatientDB().GetDataTable(strWhere); - } - public static int GetOris_PatientMaxId() - { - return new DAL.Oris_PatientDB().GetOris_PatientMaxId(); - } - } -} diff --git a/AIMS/OperationFront/UI/ButtonCustomItem.cs b/AIMS/OperationFront/ButtonCustomItem.cs similarity index 100% rename from AIMS/OperationFront/UI/ButtonCustomItem.cs rename to AIMS/OperationFront/ButtonCustomItem.cs diff --git a/AIMS/OperationFront/DAL/ApplyAnaesthesiaMethodDB.cs b/AIMS/OperationFront/DAL/ApplyAnaesthesiaMethodDB.cs deleted file mode 100644 index 730b34a..0000000 --- a/AIMS/OperationFront/DAL/ApplyAnaesthesiaMethodDB.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.DAL -{ - public class ApplyAnaesthesiaMethodDB - { - public void Add(Model.ApplyAnaesthesiaMethod ApplyAnaesthesiaMethodObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [ApplyAnaesthesiaMethod]("); - strSql.Append("OperationApplyId,AnaesthesiaMethodId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+ApplyAnaesthesiaMethodObj.OperationApplyId+","); - strSql.Append(""+ApplyAnaesthesiaMethodObj.AnaesthesiaMethodId+","); - strSql.Append("'"+ApplyAnaesthesiaMethodObj.OperatorNo+"',"); - strSql.Append("'"+ApplyAnaesthesiaMethodObj.OperatorName+"',"); - strSql.Append("'"+ApplyAnaesthesiaMethodObj.OperateDate+"'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int OperationApplyId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete ApplyAnaesthesiaMethod "); - strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public List GetApplyAnaesthesiaMethodList(int OperationApplyId) - { - List ApplyAnaesthesiaMethodIdList = new List(); - string strSql = "SELECT AnaesthesiaMethodId FROM ApplyAnaesthesiaMethod WHERE OperationApplyId='" + OperationApplyId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - ApplyAnaesthesiaMethodIdList.Add(int.Parse(dt.Rows[i]["AnaesthesiaMethodId"].ToString())); - - } - return ApplyAnaesthesiaMethodIdList; - } - } -} diff --git a/AIMS/OperationFront/DAL/ApplyDiagnoseInfoDB.cs b/AIMS/OperationFront/DAL/ApplyDiagnoseInfoDB.cs deleted file mode 100644 index 8732898..0000000 --- a/AIMS/OperationFront/DAL/ApplyDiagnoseInfoDB.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.DAL -{ - public class ApplyDiagnoseInfoDB - { - public void Add(Model.ApplyDiagnoseInfo ApplyDiagnoseInfoObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [ApplyDiagnoseInfo]("); - strSql.Append("OperationApplyId,DiagnoseId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("" + ApplyDiagnoseInfoObj.OperationApplyId + ","); - strSql.Append("" + ApplyDiagnoseInfoObj.DiagnoseId + ","); - strSql.Append("'" + ApplyDiagnoseInfoObj.OperatorNo + "',"); - strSql.Append("'" + ApplyDiagnoseInfoObj.OperatorName + "',"); - strSql.Append("'" + ApplyDiagnoseInfoObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int OperationApplyId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete ApplyDiagnoseInfo "); - strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public List GetApplyDiagnoseIdList(int OperationApplyId) - { - List DiagnoseIdList = new List(); - string strSql = "SELECT DiagnoseId FROM ApplyDiagnoseInfo WHERE OperationApplyId='" + OperationApplyId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - DiagnoseIdList.Add(int.Parse(dt.Rows[i]["DiagnoseId"].ToString())); - - } - return DiagnoseIdList; - } - } -} diff --git a/AIMS/OperationFront/DAL/ApplyOperationCutTypeDB.cs b/AIMS/OperationFront/DAL/ApplyOperationCutTypeDB.cs deleted file mode 100644 index a600284..0000000 --- a/AIMS/OperationFront/DAL/ApplyOperationCutTypeDB.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.DAL -{ - public class ApplyOperationCutTypeDB - { - public void Add(Model.ApplyOperationCutType ApplyOperationCutTypeObj ) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [ApplyOperationCutType]("); - strSql.Append("OperationApplyId,OperationCutTypeId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+ApplyOperationCutTypeObj.OperationApplyId+","); - strSql.Append(""+ApplyOperationCutTypeObj.OperationCutTypeId+","); - strSql.Append("'"+ApplyOperationCutTypeObj.OperatorNo+"',"); - strSql.Append("'"+ApplyOperationCutTypeObj.OperatorName+"',"); - strSql.Append("'"+ApplyOperationCutTypeObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - - public void Delete(int OperationApplyId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete ApplyOperationCutType "); - strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public List GetApplyOperationCutTypeIdList(int OperationApplyId) - { - List ApplyOperationCutTypeIdList = new List(); - string strSql = "SELECT OperationCutTypeId FROM ApplyOperationCutType WHERE OperationApplyId='" + OperationApplyId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - for (int i = 0; i < dt.Rows.Count; i++) - { - ApplyOperationCutTypeIdList.Add(int.Parse(dt.Rows[i]["OperationCutTypeId"].ToString())); - } - return ApplyOperationCutTypeIdList; - } - } -} diff --git a/AIMS/OperationFront/DAL/ApplyOperationInfoDB.cs b/AIMS/OperationFront/DAL/ApplyOperationInfoDB.cs deleted file mode 100644 index 8456da2..0000000 --- a/AIMS/OperationFront/DAL/ApplyOperationInfoDB.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.DAL -{ - public class ApplyOperationInfoDB - { - public void Add(Model.ApplyOperationInfo ApplyOperationInfoObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [ApplyOperationInfo]("); - strSql.Append("OperationApplyId,OperationId,OperatorNo,OperatorName,OperateDate,OperationName,LeftRemark,RightRemark"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+ApplyOperationInfoObj.OperationApplyId+","); - strSql.Append(""+ApplyOperationInfoObj.OperationId+","); - strSql.Append("'"+ApplyOperationInfoObj.OperatorNo+"',"); - strSql.Append("'"+ApplyOperationInfoObj.OperatorName+"',"); - strSql.Append("'"+ApplyOperationInfoObj.OperateDate+"',"); - strSql.Append("'"+ApplyOperationInfoObj.OperationName+"',"); - strSql.Append("'"+ApplyOperationInfoObj.LeftRemark+"',"); - strSql.Append("'"+ApplyOperationInfoObj.RightRemark+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int OperationApplyId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete ApplyOperationInfo "); - strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public List GetApplyOperationIdList(int OperationApplyId) - { - List OperationIdList = new List(); - string strSql = "SELECT * FROM ApplyOperationInfo WHERE OperationApplyId='" + OperationApplyId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.ApplyOperationInfo info = new Model.ApplyOperationInfo(); - info.OperationId = int.Parse(dt.Rows[i]["OperationId"].ToString()); - info.OperationName = dt.Rows[i]["OperationName"].ToString(); - info.LeftRemark = dt.Rows[i]["LeftRemark"].ToString(); - info.RightRemark = dt.Rows[i]["RightRemark"].ToString(); - OperationIdList.Add(info); - } - return OperationIdList; - } - - } -} diff --git a/AIMS/OperationFront/DAL/ApplyOperationPositionDB.cs b/AIMS/OperationFront/DAL/ApplyOperationPositionDB.cs deleted file mode 100644 index e79dcd6..0000000 --- a/AIMS/OperationFront/DAL/ApplyOperationPositionDB.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.DAL -{ - public class ApplyOperationPositionDB - { - public void Add(Model.ApplyOperationPosition ApplyOperationPositionObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [ApplyOperationPosition]("); - strSql.Append("OperationApplyId,OperationPositionId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+ApplyOperationPositionObj.OperationApplyId+","); - strSql.Append(""+ApplyOperationPositionObj.OperationPositionId+","); - strSql.Append("'"+ApplyOperationPositionObj.OperatorNo+"',"); - strSql.Append("'"+ApplyOperationPositionObj.OperatorName+"',"); - strSql.Append("'"+ApplyOperationPositionObj.OperateDate+"'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int OperationApplyId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete ApplyOperationPosition "); - strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public List GetApplyOperationPositionIdList(int OperationApplyId) - { - List ApplyOperationPositionIdList = new List(); - string strSql = "SELECT OperationPositionId FROM ApplyOperationPosition WHERE OperationApplyId='" + OperationApplyId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - for (int i = 0; i < dt.Rows.Count; i++) - { - ApplyOperationPositionIdList.Add(int.Parse(dt.Rows[i]["OperationPositionId"].ToString())); - } - return ApplyOperationPositionIdList; - } - } -} diff --git a/AIMS/OperationFront/DAL/ApplyPersonDutyDB.cs b/AIMS/OperationFront/DAL/ApplyPersonDutyDB.cs deleted file mode 100644 index 88b0db6..0000000 --- a/AIMS/OperationFront/DAL/ApplyPersonDutyDB.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.DAL -{ - public class ApplyPersonDutyDB - { - public int Add(Model.ApplyPersonDuty ApplyPersonDutyObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [ApplyPersonDuty]("); - strSql.Append("OperationApplyId,PersonDutyId,PersonId,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+ApplyPersonDutyObj.OperationApplyId+","); - strSql.Append(""+ApplyPersonDutyObj.PersonDutyId+","); - strSql.Append(""+ApplyPersonDutyObj.PersonId+","); - strSql.Append("'"+ApplyPersonDutyObj.OperatorNo+"',"); - strSql.Append("'"+ApplyPersonDutyObj.OperatorName+"',"); - strSql.Append("'"+ApplyPersonDutyObj.OperateDate+"'"); - strSql.Append(")"); - return HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int OperationApplyId, int PersonDutyId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete ApplyPersonDuty "); - strSql.Append(" where PersonDutyId ="+PersonDutyId+" and OperationApplyId=" + OperationApplyId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public List GetPersonIdList(int OperationApplyId,int PersonDutyId) - { - List PersonIdList = new List(); - string strSql = "SELECT PersonId FROM ApplyPersonDuty WHERE OperationApplyId=" + OperationApplyId + " AND PersonDutyId =" + PersonDutyId + ""; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - for (int i = 0; i < dt.Rows.Count; i++) - { - PersonIdList.Add(int.Parse(dt.Rows[i]["PersonId"].ToString())); - } - - return PersonIdList; - } - public DataTable GetPersonDataTable(int OperationApplyId) - { - List PersonIdList = new List(); - string strSql = "SELECT PersonDutyId,PersonId FROM ApplyPersonDuty WHERE OperationApplyId=" + OperationApplyId + ""; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - } -} diff --git a/AIMS/OperationFront/DAL/OperationApplyDB.cs b/AIMS/OperationFront/DAL/OperationApplyDB.cs deleted file mode 100644 index 3b51f18..0000000 --- a/AIMS/OperationFront/DAL/OperationApplyDB.cs +++ /dev/null @@ -1,375 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.OperationFront.DAL -{ - public class OperationApplyDB - { - public void Add(Model.OperationApply OperationApplyObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [OperationApply]("); - strSql.Append("Oris_PatientId,ApplyDepId,OperationType,OrderOperationTime,OperationTimeLeight,IsReturnOperation,IsPlanReturnOperation,IsNotPlanReturnOperation,DiagnoseRemark,OperationRemark,OperationLevelId,Contagion,Intern,Other,ApplyTime,ApplyOperatorNo,State,Remark,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+OperationApplyObj.Oris_PatientId+","); - strSql.Append(""+OperationApplyObj.ApplyDepId+","); - strSql.Append("'"+OperationApplyObj.OperationType+"',"); - strSql.Append("'"+OperationApplyObj.OrderOperationTime+"',"); - strSql.Append(""+OperationApplyObj.OperationTimeLeight+","); - strSql.Append(""+OperationApplyObj.IsReturnOperation+","); - strSql.Append(""+OperationApplyObj.IsPlanReturnOperation+","); - strSql.Append(""+OperationApplyObj.IsNotPlanReturnOperation+","); - strSql.Append("'"+OperationApplyObj.DiagnoseRemark+"',"); - strSql.Append("'"+OperationApplyObj.OperationRemark+"',"); - strSql.Append(""+OperationApplyObj.OperationLevelId+","); - strSql.Append("'"+OperationApplyObj.Contagion+"',"); - strSql.Append("'"+OperationApplyObj.Intern+"',"); - strSql.Append("'"+OperationApplyObj.Other+"',"); - strSql.Append("'"+OperationApplyObj.ApplyTime+"',"); - strSql.Append("'"+OperationApplyObj.ApplyOperatorNo+"',"); - //strSql.Append("'"+OperationApplyObj.PlanOperationTime+"',"); - //strSql.Append(""+OperationApplyObj.OperationRoomId+","); - strSql.Append(""+OperationApplyObj.State+","); - strSql.Append("'"+OperationApplyObj.Remark+"',"); - strSql.Append("'"+OperationApplyObj.OperatorNo+"',"); - strSql.Append("'"+OperationApplyObj.OperatorName+"',"); - strSql.Append("'"+OperationApplyObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.OperationApply OperationApplyObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update OperationApply set "); - strSql.Append("ApplyDepId="+OperationApplyObj.ApplyDepId+","); - strSql.Append("OperationType='"+OperationApplyObj.OperationType+"',"); - strSql.Append("OrderOperationTime='"+OperationApplyObj.OrderOperationTime+"',"); - if (OperationApplyObj.PlanOperationTime.Year != 1) - strSql.Append("PlanOperationTime='" + OperationApplyObj.PlanOperationTime+"',"); - strSql.Append("OperationTimeLeight="+OperationApplyObj.OperationTimeLeight+","); - strSql.Append("IsReturnOperation="+OperationApplyObj.IsReturnOperation+","); - strSql.Append("IsPlanReturnOperation="+OperationApplyObj.IsPlanReturnOperation+","); - strSql.Append("IsNotPlanReturnOperation="+OperationApplyObj.IsNotPlanReturnOperation+","); - strSql.Append("DiagnoseRemark='"+OperationApplyObj.DiagnoseRemark+"',"); - strSql.Append("OperationRemark='"+OperationApplyObj.OperationRemark+"',"); - strSql.Append("OperationLevelId="+OperationApplyObj.OperationLevelId+","); - strSql.Append("Contagion='"+OperationApplyObj.Contagion+"',"); - strSql.Append("Intern='"+OperationApplyObj.Intern+"',"); - strSql.Append("Other='"+OperationApplyObj.Other+"',"); - strSql.Append("Remark='"+OperationApplyObj.Remark+"',"); - strSql.Append("OperatorNo='"+OperationApplyObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+OperationApplyObj.OperatorName+"',"); - strSql.Append("OperateDate='"+OperationApplyObj.OperateDate+"'"); - strSql.Append(" where Id="+OperationApplyObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void UpdateVerifyTime(int ApplyId, string VerifyTime, string VerifyOperatorNo) - { - string strSql = "UPDATE OperationApply SET VerifyTime ='" + VerifyTime + - "',VerifyOperatorNo = '" + VerifyOperatorNo + - "' ,[State] = 2 WHERE Id =" + ApplyId + ""; - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void UpdateApplyState(int ApplyId, int State) - { - string strSql = "UPDATE OperationApply SET [State] = " + State + ","+ - "OperatorNo='"+AIMSExtension.PublicMethod.OperatorNo+"',"+ - "OperatorName='"+AIMSExtension.PublicMethod.OperatorName+"',"+ - "OperateDate='"+AIMSExtension.PublicMethod.SystemDate()+"' WHERE Id =" + ApplyId + ""; - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void UpdateApplyRoom(int ApplyId, int room) - { - string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + " WHERE Id =" + ApplyId + ""; - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId,int State) - { - //HHe 申请状态从 4改为3 3. 预排程 4 已排程 - string strSql = "UPDATE OperationApply SET PlanOperationTime ='" + PlanOperationTime + "'," + - "OperationRoomId = '" + OperationRoomId +"',"+ - "[State] = " + State + " ," + - "OperatorNo='"+AIMSExtension.PublicMethod.OperatorNo+"',"+ - "OperatorName='"+AIMSExtension.PublicMethod.OperatorName+"',"+ - "OperateDate='"+AIMSExtension.PublicMethod.SystemDate()+"' "+ - "WHERE Id =" + ApplyId + ""; - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void UpdateStopOperation(int ApplyId, string Content) - { - string strSql = "UPDATE OperationApply SET [State] = 10 ," + - "Remark ='" + Content + "'," + - "OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + "'," + - "OperatorName='" + AIMSExtension.PublicMethod.OperatorName + "'," + - "OperateDate='" + AIMSExtension.PublicMethod.SystemDate() + "' WHERE Id =" + ApplyId + ""; - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void UpdatePlanOrder(int ApplyId, int PlanOrder) - { - string strSql = "UPDATE OperationApply SET PlanOrder = " + PlanOrder + " WHERE Id='" + ApplyId + "'"; - HelperDB.DbHelperSQL.ExecNonQuery(strSql); - } - - public void UpdateOperationRoom(int ApplyId, int OperationRoomId, int MaxPlanOrder) - { - string strSql = "UPDATE OperationApply SET OperationRoomId = " + OperationRoomId + ",PlanOrder=" + MaxPlanOrder + " WHERE Id=" + ApplyId + ""; - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel, int IsFasting) - { - string strSql = "UPDATE OperationApply SET ASA ='" + ASA + "',HeartFunctionLevel='" + HeartFunctionLevel + "',IsFasting=" + IsFasting + " WHERE id='" + ApplyId + "'"; - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel) - { - //string strSql = "UPDATE OperationApply SET ASA ='" + ASA + "',HeartFunctionLevel='" + HeartFunctionLevel + "' WHERE id='" + ApplyId + "'"; - StringBuilder sb = new StringBuilder(); - sb.Append(" UPDATE OperationApply SET"); - sb.Append(" ASA ='" + ASA + "'"); - sb.Append(" ,HeartFunctionLevel='" + HeartFunctionLevel + "'"); - sb.Append(" ,[State] = case [State] when 4 then 5 else [State] end"); - sb.Append(" WHERE id='" + ApplyId + "'"); - HelperDB.DbHelperSQL.ExecNonQuery(sb.ToString()); - } - - public int GetMaxPlanOrder(DateTime PlanOperationTime, int OperationRoomId) - { - string strSql = "SELECT ISNULL((Max(PlanOrder)),0) AS PlanOrder FROM V_OperationFront of1 WHERE of1.[State] in('已排程','预排程','已访视') AND of1.OrderOperationTime>='" + PlanOperationTime.ToString("yyyy-MM-dd 00:00:00") + "' AND of1.OrderOperationTime<'" - + PlanOperationTime.AddDays(1).ToString("yyyy-MM-dd 00:00:00") + "' AND OperationRoomId=" + OperationRoomId + " "; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - return int.Parse(dt.Rows[0]["PlanOrder"].ToString()); - } - - public Model.OperationApply GetModel(int Id) - { - Model.OperationApply OperationApplyObj = new Model.OperationApply(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Oris_PatientId,ApplyDepId,OperationType,OrderOperationTime,OperationTimeLeight,IsReturnOperation,IsPlanReturnOperation,IsNotPlanReturnOperation,DiagnoseRemark,OperationRemark,OperationLevelId,Contagion,Intern,Other,ApplyTime,ApplyOperatorNo,PlanOperationTime,OperationRoomId,State,Remark,OperatorNo,OperatorName,OperateDate,PlanOrder "); - strSql.Append(" from OperationApply "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - OperationApplyObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["Oris_PatientId"].ToString()!="") - { - OperationApplyObj.Oris_PatientId = int.Parse(ds.Tables[0].Rows[0]["Oris_PatientId"].ToString()); - } - if(ds.Tables[0].Rows[0]["ApplyDepId"].ToString()!="") - { - OperationApplyObj.ApplyDepId = int.Parse(ds.Tables[0].Rows[0]["ApplyDepId"].ToString()); - } - OperationApplyObj.OperationType = ds.Tables[0].Rows[0]["OperationType"].ToString(); - if(ds.Tables[0].Rows[0]["OrderOperationTime"].ToString()!="") - { - OperationApplyObj.OrderOperationTime = DateTime.Parse(ds.Tables[0].Rows[0]["OrderOperationTime"].ToString()); - } - if(ds.Tables[0].Rows[0]["OperationTimeLeight"].ToString()!="") - { - OperationApplyObj.OperationTimeLeight = int.Parse(ds.Tables[0].Rows[0]["OperationTimeLeight"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsReturnOperation"].ToString()!="") - { - OperationApplyObj.IsReturnOperation = int.Parse(ds.Tables[0].Rows[0]["IsReturnOperation"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsPlanReturnOperation"].ToString()!="") - { - OperationApplyObj.IsPlanReturnOperation = int.Parse(ds.Tables[0].Rows[0]["IsPlanReturnOperation"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsNotPlanReturnOperation"].ToString()!="") - { - OperationApplyObj.IsNotPlanReturnOperation = int.Parse(ds.Tables[0].Rows[0]["IsNotPlanReturnOperation"].ToString()); - } - OperationApplyObj.DiagnoseRemark = ds.Tables[0].Rows[0]["DiagnoseRemark"].ToString(); - OperationApplyObj.OperationRemark = ds.Tables[0].Rows[0]["OperationRemark"].ToString(); - if(ds.Tables[0].Rows[0]["OperationLevelId"].ToString()!="") - { - OperationApplyObj.OperationLevelId = int.Parse(ds.Tables[0].Rows[0]["OperationLevelId"].ToString()); - } - OperationApplyObj.Contagion = ds.Tables[0].Rows[0]["Contagion"].ToString(); - OperationApplyObj.Intern = ds.Tables[0].Rows[0]["Intern"].ToString(); - OperationApplyObj.Other = ds.Tables[0].Rows[0]["Other"].ToString(); - if(ds.Tables[0].Rows[0]["ApplyTime"].ToString()!="") - { - OperationApplyObj.ApplyTime = DateTime.Parse(ds.Tables[0].Rows[0]["ApplyTime"].ToString()); - } - OperationApplyObj.ApplyOperatorNo = ds.Tables[0].Rows[0]["ApplyOperatorNo"].ToString(); - if(ds.Tables[0].Rows[0]["PlanOperationTime"].ToString()!="") - { - OperationApplyObj.PlanOperationTime = DateTime.Parse(ds.Tables[0].Rows[0]["PlanOperationTime"].ToString()); - } - if(ds.Tables[0].Rows[0]["OperationRoomId"].ToString()!="") - { - OperationApplyObj.OperationRoomId = int.Parse(ds.Tables[0].Rows[0]["OperationRoomId"].ToString()); - } - if(ds.Tables[0].Rows[0]["State"].ToString()!="") - { - OperationApplyObj.State = int.Parse(ds.Tables[0].Rows[0]["State"].ToString()); - } - OperationApplyObj.Remark = ds.Tables[0].Rows[0]["Remark"].ToString(); - OperationApplyObj.PlanOrder = ds.Tables[0].Rows[0]["PlanOrder"].ToString(); - OperationApplyObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationApplyObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - OperationApplyObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationApplyObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Oris_PatientId],[ApplyDepId],[OperationType],[OrderOperationTime],[OperationTimeLeight],[IsReturnOperation],[IsPlanReturnOperation],[IsNotPlanReturnOperation],[DiagnoseRemark],[OperationRemark],[OperationLevelId],[Contagion],[Intern],[Other],[ApplyTime],[ApplyTimeOperatorNo],[PlanOperationTime],[OperationRoomId],[State],of1.StateId,[Remark],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM OperationApply "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public int GetOperationApplyMaxId() - { - string strSql = "SELECT (ISNULL(MAX(Id),0)) AS Id FROM OperationApply"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - return int.Parse(dt.Rows[0]["Id"].ToString()); - } - - public DataTable GetOperationFrontDataTableByPatientId(int PatientId) - { - string strSql = "SELECT of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.DepartmentId,of1.ApplyDepName, of1.PatientKind," + - "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + - "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + - "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + - "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + - "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," + - "of1.OperationLevelName, of1.ApplyOperationCutTypeName," + - "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," + - "of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3," + - "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," + - "of1.VerifyTime, of1.VerifyOperatorName," + - "of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," + - "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + - "of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.ASA,of1.HeartFunctionLevel,of1.IsFasting, of1.Remark,ApplyDiagnoseInfoId,ApplyOperationInfoId ,of1.PlanOrder,of1.OperationRoomId ,of1.MedicalRecord " + - "FROM V_OperationFront of1 WHERE of1.PatientId='" + PatientId + "'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetOperationFrontDataTable(string BegInData,string EndData) - { - string strSql = "SELECT of1.ApplyId, of1.PatientId,of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + - "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType,"+ - "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType,"+ - "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + - "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + - "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark,"+ - "of1.OperationLevelName, of1.ApplyOperationCutTypeName,"+ - "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion,"+ - "of1.OperationDoctor,[dbo].[fun_getPY](of1.OperationDoctor) OperationDoctorcode, of1.Assistant1, of1.Assistant2, of1.Assistant3," + - "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName,"+ - "of1.VerifyTime, of1.VerifyOperatorName," + - "of1.PlanOperationTime, of1.OperationRoom, of1.OperationRoomId, of1.AnesthesiaDoctor," + - "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed,"+ - "of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder " + - "FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + BegInData + "' and of1.OrderOperationTime<'" + EndData + "' order by OperationRoomId,PlanOrder asc"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetOperationFrontDataTableByPlanOperationTime(string BegInData, string EndData) - { - string strSql = "SELECT of1.ApplyId,of1.PatientId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + - "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + - "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + - "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + - "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + - "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," + - "of1.OperationLevelName, of1.ApplyOperationCutTypeName," + - "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," + - "of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3," + - "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," + - "of1.VerifyTime, of1.VerifyOperatorName," + - "of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," + - "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + - "of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder " + - "FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + BegInData + "' and of1.PlanOperationTime<'" + EndData + "' order by OperationRoomId,PlanOrder asc"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetOperationFrontByApplyId(List ApplyIdList) - { - string Temp = ""; - for (int i = 0; i < ApplyIdList.Count; i++) - { - Temp += ApplyIdList[i].ToString() + ","; - } - Temp = Temp.Substring(0, Temp.LastIndexOf(",")); - - string strSql = "SELECT of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + - "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + - "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + - "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + - "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + - "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," + - "of1.OperationLevelName, of1.ApplyOperationCutTypeName," + - "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," + - "of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3," + - "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," + - "of1.VerifyTime, of1.VerifyOperatorName," + - "of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," + - "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + - "of1.InstrumentNurseSucceed, of1.TourNurseSucceed ,of1.PlanOrder " + - "FROM V_OperationFront of1 WHERE of1.ApplyId in (" + Temp + ")"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetOperationRoomDataTable(DateTime PlanOperationTime, int OperationRoomId) - { - string strSql = "SELECT of1.ApplyId, of1.ApplyDepName, of1.MdrecNo, of1.PatientName, of1.Sex, of1.BirthDay," + - "of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName, " + - "of1.AnaesthesiaMethodName,of1.OperationDoctor ,of1.OperationType ,of1.PlanOrder " + - "FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + PlanOperationTime + "' AND of1.PlanOperationTime<'" - + PlanOperationTime.AddDays(1) + "' AND OperationRoomId=" + OperationRoomId + " AND of1.[State]='已排程' order by OperationRoomId,PlanOrder asc"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetPlanOperationDataTable(DateTime PlanOperationTime, int OperationRoomId) - { - string strSql = "SELECT of1.ApplyId, of1.OperationType, of1.OrderOperationTime ,of1.PlanOperationTime, of1.ApplyDepName, of1.MdrecNo, of1.PatientName," + - "of1.Sex, of1.BirthDay,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName," + - "of1.AnaesthesiaMethodName ,of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3,of1.AnesthesiaDoctor," + - "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + - "of1.InstrumentNurseSucceed, of1.TourNurseSucceed, " + - "of1.[State], of1.StateId, of1.Remark ,of1.PlanOrder " + - "FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='"+PlanOperationTime+"' AND " + - "of1.PlanOperationTime<'" + PlanOperationTime.AddDays(1) + "' AND of1.OperationRoomId=" + OperationRoomId + " AND of1.[State]='已排程' order by OperationRoomId,PlanOrder asc"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public void UpdateOperationRoom(int ApplyId, int OperationRoomId) - { - string strSql = "UPDATE OperationApply SET OperationRoomId =" + OperationRoomId + " WHERE Id=" + ApplyId + ""; - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - } -} diff --git a/AIMS/OperationFront/DAL/Oris_PatientDB.cs b/AIMS/OperationFront/DAL/Oris_PatientDB.cs deleted file mode 100644 index d5b9ec4..0000000 --- a/AIMS/OperationFront/DAL/Oris_PatientDB.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace AIMS.OperationFront.DAL -{ - public class Oris_PatientDB - { - public void Add(Model.Oris_Patient Oris_PatientObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [Oris_Patient]("); - strSql.Append("MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+Oris_PatientObj.MdrecNo+"',"); - strSql.Append("'"+Oris_PatientObj.ArchivesNo+"',"); - strSql.Append("'"+Oris_PatientObj.Name+"',"); - strSql.Append("'"+Oris_PatientObj.Sex+"',"); - strSql.Append("'"+Oris_PatientObj.BirthDay+"',"); - strSql.Append("'"+Oris_PatientObj.Height+"',"); - strSql.Append("'"+Oris_PatientObj.Weight+"',"); - strSql.Append(""+Oris_PatientObj.DepId+","); - strSql.Append("'"+Oris_PatientObj.Illdistrict+"',"); - strSql.Append("'"+Oris_PatientObj.SickBed+"',"); - strSql.Append("'"+Oris_PatientObj.BloodType+"',"); - strSql.Append("'"+Oris_PatientObj.RHBloodType+"',"); - strSql.Append("'"+Oris_PatientObj.PatientKind+"',"); - strSql.Append("'"+Oris_PatientObj.InHosDate+"',"); - strSql.Append("'"+Oris_PatientObj.IdentityCard+"',"); - strSql.Append("'"+Oris_PatientObj.Contacts+"',"); - strSql.Append("'"+Oris_PatientObj.ContactsPhone+"',"); - strSql.Append("'"+Oris_PatientObj.OperatorNo+"',"); - strSql.Append("'"+Oris_PatientObj.OperatorName+"',"); - strSql.Append("'"+Oris_PatientObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.Oris_Patient Oris_PatientObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update Oris_Patient set "); - strSql.Append("MdrecNo='"+Oris_PatientObj.MdrecNo+"',"); - strSql.Append("ArchivesNo='"+Oris_PatientObj.ArchivesNo+"',"); - strSql.Append("Name='"+Oris_PatientObj.Name+"',"); - strSql.Append("Sex='"+Oris_PatientObj.Sex+"',"); - strSql.Append("BirthDay='"+Oris_PatientObj.BirthDay+"',"); - strSql.Append("Height='"+Oris_PatientObj.Height+"',"); - strSql.Append("Weight='"+Oris_PatientObj.Weight+"',"); - strSql.Append("DepId="+Oris_PatientObj.DepId+","); - strSql.Append("Illdistrict='"+Oris_PatientObj.Illdistrict+"',"); - strSql.Append("SickBed='"+Oris_PatientObj.SickBed+"',"); - strSql.Append("BloodType='"+Oris_PatientObj.BloodType+"',"); - strSql.Append("RHBloodType='"+Oris_PatientObj.RHBloodType+"',"); - strSql.Append("PatientKind='"+Oris_PatientObj.PatientKind+"',"); - strSql.Append("InHosDate='"+Oris_PatientObj.InHosDate+"',"); - strSql.Append("IdentityCard='"+Oris_PatientObj.IdentityCard+"',"); - strSql.Append("Contacts='"+Oris_PatientObj.Contacts+"',"); - strSql.Append("ContactsPhone='"+Oris_PatientObj.ContactsPhone+"',"); - strSql.Append("OperatorNo='"+Oris_PatientObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+Oris_PatientObj.OperatorName+"',"); - strSql.Append("OperateDate='"+Oris_PatientObj.OperateDate+"'"); - strSql.Append(" where Id="+Oris_PatientObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.Oris_Patient GetModel(int Id) - { - Model.Oris_Patient Oris_PatientObj = new Model.Oris_Patient(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Oris_Patient "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - Oris_PatientObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - Oris_PatientObj.MdrecNo = ds.Tables[0].Rows[0]["MdrecNo"].ToString(); - Oris_PatientObj.ArchivesNo = ds.Tables[0].Rows[0]["ArchivesNo"].ToString(); - Oris_PatientObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - Oris_PatientObj.Sex = ds.Tables[0].Rows[0]["Sex"].ToString(); - if(ds.Tables[0].Rows[0]["BirthDay"].ToString()!="") - { - Oris_PatientObj.BirthDay = DateTime.Parse(ds.Tables[0].Rows[0]["BirthDay"].ToString()); - } - Oris_PatientObj.Height = ds.Tables[0].Rows[0]["Height"].ToString(); - Oris_PatientObj.Weight = ds.Tables[0].Rows[0]["Weight"].ToString(); - if(ds.Tables[0].Rows[0]["DepId"].ToString()!="") - { - Oris_PatientObj.DepId = int.Parse(ds.Tables[0].Rows[0]["DepId"].ToString()); - } - Oris_PatientObj.Illdistrict = ds.Tables[0].Rows[0]["Illdistrict"].ToString(); - Oris_PatientObj.SickBed = ds.Tables[0].Rows[0]["SickBed"].ToString(); - Oris_PatientObj.BloodType = ds.Tables[0].Rows[0]["BloodType"].ToString(); - Oris_PatientObj.RHBloodType = ds.Tables[0].Rows[0]["RHBloodType"].ToString(); - Oris_PatientObj.PatientKind = ds.Tables[0].Rows[0]["PatientKind"].ToString(); - if(ds.Tables[0].Rows[0]["InHosDate"].ToString()!="") - { - Oris_PatientObj.InHosDate = DateTime.Parse(ds.Tables[0].Rows[0]["InHosDate"].ToString()); - } - Oris_PatientObj.IdentityCard = ds.Tables[0].Rows[0]["IdentityCard"].ToString(); - Oris_PatientObj.Contacts = ds.Tables[0].Rows[0]["Contacts"].ToString(); - Oris_PatientObj.ContactsPhone = ds.Tables[0].Rows[0]["ContactsPhone"].ToString(); - Oris_PatientObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - Oris_PatientObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - Oris_PatientObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return Oris_PatientObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[MdrecNo],[ArchivesNo],[Name],[Sex],[BirthDay],[Height],[Weight],[DepId],[Illdistrict],[SickBed],[BloodType],[RHBloodType],[PatientKind],[InHosDate],[IdentityCard],[Contacts],[ContactsPhone] "); - strSql.Append(" FROM Oris_Patient "); - if(strWhere.Trim()!="") - { - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public int GetOris_PatientMaxId() - { - string strSql = "SELECT (ISNULL(MAX(Id),0)) AS Id FROM Oris_Patient"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - return int.Parse(dt.Rows[0]["Id"].ToString()); - } - } -} diff --git a/AIMS/OperationFront/UI/FrmScheduling2.cs b/AIMS/OperationFront/FrmScheduling2.cs similarity index 98% rename from AIMS/OperationFront/UI/FrmScheduling2.cs rename to AIMS/OperationFront/FrmScheduling2.cs index 5ae71d6..19c183b 100644 --- a/AIMS/OperationFront/UI/FrmScheduling2.cs +++ b/AIMS/OperationFront/FrmScheduling2.cs @@ -323,7 +323,7 @@ namespace AIMS.OperationFront.UI dtDoctors = dbHelper.GetDataTable(sql); /*读取手术麻醉科护士信息 WorkersType=1*/ - sql = "select w.Id, w.[Name], w.[HelpCode] HCode, w.[PersonOrder] Orderby from Person as w where w.PersonType='护士' and w.IsValid=1 order by w.[PersonOrder] "; + sql = "select w.Id, w.[Name], w.[HelpCode] HCode, w.[PersonOrder] Orderby from Person as w where w.PersonType='手术室护士' and w.IsValid=1 order by w.[PersonOrder] "; dtNurses = dbHelper.GetDataTable(sql); /*读取手术间信息*/ @@ -603,21 +603,22 @@ namespace AIMS.OperationFront.UI } else { - dv2.RowFilter = string.Format("ScheduleMonth={0} and WorkerId={1}", strMonth, workerId); - if (dv2.Count > 0) - { - dr2["OperationRoom"] = getOperationRoomName((int)dv2[0]["OperationRoomId"]); - dr2["Role"] = dv2[0]["nurseType"]; - dr2["BeginDate"] = dv2[0]["BeginTime"]; - dr2["EndDate"] = dv2[0]["EndTime"]; - } - else - { - dr2["OperationRoom"] = getOperationRoomName(int.Parse(dr["OperationRoomId"].ToString())); - dr2["Role"] = dr["NurseRole"].ToString(); - dr2["BeginDate"] = beginTime; - dr2["EndDate"] = endTime; - } + dr2["Role"] = "手术室护士"; + //dv2.RowFilter = string.Format("ScheduleMonth={0} and WorkerId={1}", strMonth, workerId); + //if (dv2.Count > 0) + //{ + // dr2["OperationRoom"] = getOperationRoomName((int)dv2[0]["OperationRoomId"]); + // dr2["Role"] = dv2[0]["nurseType"]; + // dr2["BeginDate"] = dv2[0]["BeginTime"]; + // dr2["EndDate"] = dv2[0]["EndTime"]; + //} + //else + //{ + // //dr2["OperationRoom"] = "";// getOperationRoomName(int.Parse(dr["OperationRoomId"].ToString())); + // //dr2["Role"] = dr["NurseRole"].ToString(); + // //dr2["BeginDate"] = beginTime; + // //dr2["EndDate"] = endTime; + //} } dv1.RowFilter = string.Format("ScheduleMonth={0} and WorkerId={1}", strMonth, workerId); int n = dv1.Count; diff --git a/AIMS/OperationFront/UI/FrmScheduling2.designer.cs b/AIMS/OperationFront/FrmScheduling2.designer.cs similarity index 100% rename from AIMS/OperationFront/UI/FrmScheduling2.designer.cs rename to AIMS/OperationFront/FrmScheduling2.designer.cs diff --git a/AIMS/OperationFront/UI/FrmScheduling2.resx b/AIMS/OperationFront/FrmScheduling2.resx similarity index 100% rename from AIMS/OperationFront/UI/FrmScheduling2.resx rename to AIMS/OperationFront/FrmScheduling2.resx diff --git a/AIMS/OperationFront/UI/FrmScheduling2Option.cs b/AIMS/OperationFront/FrmScheduling2Option.cs similarity index 100% rename from AIMS/OperationFront/UI/FrmScheduling2Option.cs rename to AIMS/OperationFront/FrmScheduling2Option.cs diff --git a/AIMS/OperationFront/UI/FrmScheduling2Option.designer.cs b/AIMS/OperationFront/FrmScheduling2Option.designer.cs similarity index 100% rename from AIMS/OperationFront/UI/FrmScheduling2Option.designer.cs rename to AIMS/OperationFront/FrmScheduling2Option.designer.cs diff --git a/AIMS/OperationFront/UI/FrmScheduling2Option.resx b/AIMS/OperationFront/FrmScheduling2Option.resx similarity index 100% rename from AIMS/OperationFront/UI/FrmScheduling2Option.resx rename to AIMS/OperationFront/FrmScheduling2Option.resx diff --git a/AIMS/OperationFront/UI/GlossyCustomItem.cs b/AIMS/OperationFront/GlossyCustomItem.cs similarity index 100% rename from AIMS/OperationFront/UI/GlossyCustomItem.cs rename to AIMS/OperationFront/GlossyCustomItem.cs diff --git a/AIMS/OperationFront/Model/ApplyAnaesthesiaMethod.cs b/AIMS/OperationFront/Model/ApplyAnaesthesiaMethod.cs deleted file mode 100644 index a45a41c..0000000 --- a/AIMS/OperationFront/Model/ApplyAnaesthesiaMethod.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class ApplyAnaesthesiaMethod - { - private int _id; - private int _operationapplyid; - private int _anaesthesiamethodid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int OperationApplyId - { - set { _operationapplyid = value; } - get { return _operationapplyid; } - } - /// - /// - /// - public int AnaesthesiaMethodId - { - set { _anaesthesiamethodid = value; } - get { return _anaesthesiamethodid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationFront/Model/ApplyDiagnoseInfo.cs b/AIMS/OperationFront/Model/ApplyDiagnoseInfo.cs deleted file mode 100644 index ebee0f7..0000000 --- a/AIMS/OperationFront/Model/ApplyDiagnoseInfo.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class ApplyDiagnoseInfo - { - private int _id; - private int _operationapplyid; - private int _diagnoseid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int OperationApplyId - { - set { _operationapplyid = value; } - get { return _operationapplyid; } - } - /// - /// - /// - public int DiagnoseId - { - set { _diagnoseid = value; } - get { return _diagnoseid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationFront/Model/ApplyOperationCutType.cs b/AIMS/OperationFront/Model/ApplyOperationCutType.cs deleted file mode 100644 index adb8322..0000000 --- a/AIMS/OperationFront/Model/ApplyOperationCutType.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class ApplyOperationCutType - { - private int _id; - private int _operationapplyid; - private int _operationcuttypeid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int OperationApplyId - { - set { _operationapplyid = value; } - get { return _operationapplyid; } - } - /// - /// - /// - public int OperationCutTypeId - { - set { _operationcuttypeid = value; } - get { return _operationcuttypeid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationFront/Model/ApplyOperationInfo.cs b/AIMS/OperationFront/Model/ApplyOperationInfo.cs deleted file mode 100644 index 7f08abe..0000000 --- a/AIMS/OperationFront/Model/ApplyOperationInfo.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class ApplyOperationInfo - { - private int _id; - private int _operationapplyid; - private int _operationid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - private string operationName; - private string leftRemark; - private string rightRemark; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int OperationApplyId - { - set { _operationapplyid = value; } - get { return _operationapplyid; } - } - /// - /// - /// - public int OperationId - { - set { _operationid = value; } - get { return _operationid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - /// - /// - /// - public string OperationName - { - get { return operationName; } - set { operationName = value; } - } - /// - /// - /// - public string LeftRemark - { - get { return leftRemark; } - set { leftRemark = value; } - } - /// - /// - /// - public string RightRemark - { - get { return rightRemark; } - set { rightRemark = value; } - } - } -} diff --git a/AIMS/OperationFront/Model/ApplyOperationPosition.cs b/AIMS/OperationFront/Model/ApplyOperationPosition.cs deleted file mode 100644 index 353b262..0000000 --- a/AIMS/OperationFront/Model/ApplyOperationPosition.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class ApplyOperationPosition - { - private int _id; - private int _operationapplyid; - private int _operationpositionid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int OperationApplyId - { - set { _operationapplyid = value; } - get { return _operationapplyid; } - } - /// - /// - /// - public int OperationPositionId - { - set { _operationpositionid = value; } - get { return _operationpositionid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationFront/Model/ApplyPersonDuty.cs b/AIMS/OperationFront/Model/ApplyPersonDuty.cs deleted file mode 100644 index 570af97..0000000 --- a/AIMS/OperationFront/Model/ApplyPersonDuty.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class ApplyPersonDuty - { - private int _id; - private int _operationapplyid; - private int _persondutyid; - private int _personid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int OperationApplyId - { - set { _operationapplyid = value; } - get { return _operationapplyid; } - } - /// - /// - /// - public int PersonDutyId - { - set { _persondutyid = value; } - get { return _persondutyid; } - } - /// - /// - /// - public int PersonId - { - set { _personid = value; } - get { return _personid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMS/OperationFront/Model/OperationApply.cs b/AIMS/OperationFront/Model/OperationApply.cs deleted file mode 100644 index 86d7c90..0000000 --- a/AIMS/OperationFront/Model/OperationApply.cs +++ /dev/null @@ -1,260 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class OperationApply - { - private int _id; - private int _oris_patientid; - private int _applydepid; - private string _operationtype; - private DateTime _orderoperationtime; - private int _operationtimeleight; - private int _isreturnoperation; - private int _isplanreturnoperation; - private int _isnotplanreturnoperation; - private string _diagnoseremark; - private string _operationremark; - private int _operationlevelid; - private string _contagion; - private string _intern; - private string _other; - private DateTime _applytime; - private string _applyoperatorno; - private DateTime _verifytime; - private string _verifypperatorno; - private DateTime _planoperationtime; - private int _operationroomid; - private int _state; - private string _remark; - private string _planOrder; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - - /// - /// - /// - public int Id - { - set{ _id=value;} - get{return _id;} - } - /// - /// - /// - public int Oris_PatientId - { - set{ _oris_patientid=value;} - get{return _oris_patientid;} - } - /// - /// 手术申请科室 - /// - public int ApplyDepId - { - set{ _applydepid=value;} - get{return _applydepid;} - } - /// - /// 手术类型(急诊或择期) - /// - public string OperationType - { - set{ _operationtype=value;} - get{return _operationtype;} - } - /// - /// 预约时间 - /// - public DateTime OrderOperationTime - { - set{ _orderoperationtime=value;} - get{return _orderoperationtime;} - } - /// - /// - /// - public int OperationTimeLeight - { - set{ _operationtimeleight=value;} - get{return _operationtimeleight;} - } - /// - /// 是否重返再手术 - /// - public int IsReturnOperation - { - set{ _isreturnoperation=value;} - get{return _isreturnoperation;} - } - /// - /// 计划手术 - /// - public int IsPlanReturnOperation - { - set{ _isplanreturnoperation=value;} - get{return _isplanreturnoperation;} - } - /// - /// 非计划手术 - /// - public int IsNotPlanReturnOperation - { - set{ _isnotplanreturnoperation=value;} - get{return _isnotplanreturnoperation;} - } - /// - /// - /// - public string DiagnoseRemark - { - set{ _diagnoseremark=value;} - get{return _diagnoseremark;} - } - /// - /// - /// - public string OperationRemark - { - set{ _operationremark=value;} - get{return _operationremark;} - } - /// - /// 手术分级 - /// - public int OperationLevelId - { - set{ _operationlevelid=value;} - get{return _operationlevelid;} - } - /// - /// 术前感染筛查 - /// - public string Contagion - { - set{ _contagion=value;} - get{return _contagion;} - } - /// - /// - /// - public string Intern - { - set{ _intern=value;} - get{return _intern;} - } - /// - /// - /// - public string Other - { - set{ _other=value;} - get{return _other;} - } - /// - /// 手术申请时间 - /// - public DateTime ApplyTime - { - set{ _applytime=value;} - get{return _applytime;} - } - /// - /// - /// - public string ApplyOperatorNo - { - set{ _applyoperatorno=value;} - get{return _applyoperatorno;} - } - /// - /// 审核时间 - /// - public DateTime VerifyTime - { - set { _verifytime = value; } - get { return _verifytime; } - } - /// - /// 审核医生 - /// - public string VerifyOperatorNo - { - set { _verifypperatorno = value; } - get { return _verifypperatorno; } - } - /// - /// 计划时间 - /// - public DateTime PlanOperationTime - { - set{ _planoperationtime=value;} - get{return _planoperationtime;} - } - /// - /// - /// - public int OperationRoomId - { - set{ _operationroomid=value;} - get{return _operationroomid;} - } - /// - //1 待申请审核 - //2 已审核 - //3 已排程 - //4 已访视 - //5.手术中 - //6.手术结束 - //7.已归档 - //8.手术终止 - - /// - public int State - { - set{ _state=value;} - get{return _state;} - } - /// - /// - /// - public string Remark - { - set{ _remark=value;} - get{return _remark;} - } - public string PlanOrder - { - set{ _planOrder = value;} - get{return _planOrder; } - } - /// - /// - /// - public string OperatorNo - { - set{ _operatorno=value;} - get{return _operatorno;} - } - /// - /// - /// - public string OperatorName - { - set{ _operatorname=value;} - get{return _operatorname;} - } - /// - /// - /// - public DateTime OperateDate - { - set{ _operatedate=value;} - get{return _operatedate;} - } - } -} diff --git a/AIMS/OperationFront/Model/Oris_Patient.cs b/AIMS/OperationFront/Model/Oris_Patient.cs deleted file mode 100644 index 1483fed..0000000 --- a/AIMS/OperationFront/Model/Oris_Patient.cs +++ /dev/null @@ -1,201 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.OperationFront.Model -{ - public class Oris_Patient - { - private int _id; - private string _mdrecno; - private string _archivesno; - private string _name; - private string _sex; - private DateTime _birthday; - private string _height; - private string _weight; - private int _depid; - private string _illdistrict; - private string _sickbed; - private string _bloodtype; - private string _rhbloodtype; - private string _patientkind; - private DateTime _inhosdate; - private string _identitycard; - private string _contacts; - private string _contactsphone; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string MdrecNo - { - set { _mdrecno = value; } - get { return _mdrecno; } - } - /// - /// - /// - public string ArchivesNo - { - set { _archivesno = value; } - get { return _archivesno; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string Sex - { - set { _sex = value; } - get { return _sex; } - } - /// - /// - /// - public DateTime BirthDay - { - set { _birthday = value; } - get { return _birthday; } - } - /// - /// - /// - public string Height - { - set { _height = value; } - get { return _height; } - } - /// - /// - /// - public string Weight - { - set { _weight = value; } - get { return _weight; } - } - /// - /// - /// - public int DepId - { - set { _depid = value; } - get { return _depid; } - } - /// - /// - /// - public string Illdistrict - { - set { _illdistrict = value; } - get { return _illdistrict; } - } - /// - /// - /// - public string SickBed - { - set { _sickbed = value; } - get { return _sickbed; } - } - /// - /// - /// - public string BloodType - { - set { _bloodtype = value; } - get { return _bloodtype; } - } - /// - /// - /// - public string RHBloodType - { - set { _rhbloodtype = value; } - get { return _rhbloodtype; } - } - /// - /// - /// - public string PatientKind - { - set { _patientkind = value; } - get { return _patientkind; } - } - /// - /// - /// - public DateTime InHosDate - { - set { _inhosdate = value; } - get { return _inhosdate; } - } - /// - /// - /// - public string IdentityCard - { - set { _identitycard = value; } - get { return _identitycard; } - } - /// - /// - /// - public string Contacts - { - set { _contacts = value; } - get { return _contacts; } - } - /// - /// - /// - public string ContactsPhone - { - set { _contactsphone = value; } - get { return _contactsphone; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - - } -} diff --git a/AIMS/OperationFront/UI/NoteCustomItem.cs b/AIMS/OperationFront/NoteCustomItem.cs similarity index 100% rename from AIMS/OperationFront/UI/NoteCustomItem.cs rename to AIMS/OperationFront/NoteCustomItem.cs diff --git a/AIMS/OperationFront/UI/frmApplyConfigSet.Designer.cs b/AIMS/OperationFront/frmApplyConfigSet.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmApplyConfigSet.Designer.cs rename to AIMS/OperationFront/frmApplyConfigSet.Designer.cs diff --git a/AIMS/OperationFront/UI/frmApplyConfigSet.cs b/AIMS/OperationFront/frmApplyConfigSet.cs similarity index 100% rename from AIMS/OperationFront/UI/frmApplyConfigSet.cs rename to AIMS/OperationFront/frmApplyConfigSet.cs diff --git a/AIMS/OperationFront/UI/frmApplyConfigSet.resx b/AIMS/OperationFront/frmApplyConfigSet.resx similarity index 100% rename from AIMS/OperationFront/UI/frmApplyConfigSet.resx rename to AIMS/OperationFront/frmApplyConfigSet.resx diff --git a/AIMS/OperationFront/UI/frmExeOperationPlan.Designer.cs b/AIMS/OperationFront/frmExeOperationPlan.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmExeOperationPlan.Designer.cs rename to AIMS/OperationFront/frmExeOperationPlan.Designer.cs diff --git a/AIMS/OperationFront/UI/frmExeOperationPlan.cs b/AIMS/OperationFront/frmExeOperationPlan.cs similarity index 88% rename from AIMS/OperationFront/UI/frmExeOperationPlan.cs rename to AIMS/OperationFront/frmExeOperationPlan.cs index be3ab2f..d314377 100644 --- a/AIMS/OperationFront/UI/frmExeOperationPlan.cs +++ b/AIMS/OperationFront/frmExeOperationPlan.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -32,7 +33,7 @@ namespace AIMS.OperationFront.UI { int ApplyId = int.Parse(dgv1.Rows[i].Cells["ApplyIdColumn1"].Value.ToString()); - BLL.OperationApply.UpdateApplyState(ApplyId, 4); + BOperationApply.UpdateApplyState(ApplyId, 4); } } MessageBox.Show("执行成功!", "系统提示"); @@ -50,7 +51,7 @@ namespace AIMS.OperationFront.UI private void btnFind_Click(object sender, EventArgs e) { - DataTable dt = BLL.OperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "OperationType <>'特急' and State IN ('预排程')", ""); dgv1.DataSource = Newdt; for (int i = 0; i < dgv1.Rows.Count; i++) diff --git a/AIMS/OperationFront/UI/frmExeOperationPlan.resx b/AIMS/OperationFront/frmExeOperationPlan.resx similarity index 100% rename from AIMS/OperationFront/UI/frmExeOperationPlan.resx rename to AIMS/OperationFront/frmExeOperationPlan.resx diff --git a/AIMS/OperationFront/UI/frmOperationApply.Designer.cs b/AIMS/OperationFront/frmOperationApply.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmOperationApply.Designer.cs rename to AIMS/OperationFront/frmOperationApply.Designer.cs diff --git a/AIMS/OperationFront/UI/frmOperationApply.cs b/AIMS/OperationFront/frmOperationApply.cs similarity index 88% rename from AIMS/OperationFront/UI/frmOperationApply.cs rename to AIMS/OperationFront/frmOperationApply.cs index b6b9f19..ceb2913 100644 --- a/AIMS/OperationFront/UI/frmOperationApply.cs +++ b/AIMS/OperationFront/frmOperationApply.cs @@ -32,10 +32,10 @@ namespace AIMS.OperationFront.UI cboDepartment.DisplayMember = "Name"; cboDepartment.ValueMember = "Id"; - cboDepartment.DataSource = AIMS.PublicUI.BLL.Department.GetDepartmentDataTable("IsValid=1 "); + cboDepartment.DataSource = BDepartment.GetDepartmentDataTable("IsValid=1 "); cboDepartment.SelectedIndex = -1; - cboDepartment.Text = AIMS.PublicUI.BLL.Department.GetModel(AIMSExtension.PublicMethod.DepId).Name; + cboDepartment.Text = BDepartment.GetModel(AIMSExtension.PublicMethod.DepId).Name; btnFind_Click(null, null); } @@ -74,7 +74,7 @@ namespace AIMS.OperationFront.UI private void btnFind_Click(object sender, EventArgs e) { - DataTable dt = BLL.OperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "State IN ('已申请','已审核') and ApplyDepName LIKE '%" + cboDepartment.Text + "%' AND MdrecNo LIKE '%" + txtMdrecNo.Text.Trim() + "%'", ""); dgv.DataSource = Newdt; @@ -111,12 +111,12 @@ namespace AIMS.OperationFront.UI if (dgv.Rows[i].Cells["OperationTypeColumn"].Value.ToString() == "特急") { - BLL.OperationApply.UpdatePlanOperationTime(ApplyId, AIMSExtension.PublicMethod.SystemDate().ToString(), 1, 4); //状态4 已排程 + BOperationApply.UpdatePlanOperationTime(ApplyId, AIMSExtension.PublicMethod.SystemDate().ToString(), 1, 4); //状态4 已排程 } else { - BLL.OperationApply.UpdateVerifyTime(ApplyId, AIMSExtension.PublicMethod.SystemDate().ToString(), AIMSExtension.PublicMethod.OperatorNo); + BOperationApply.UpdateVerifyTime(ApplyId, AIMSExtension.PublicMethod.SystemDate().ToString(), AIMSExtension.PublicMethod.OperatorNo); } } } @@ -148,7 +148,7 @@ namespace AIMS.OperationFront.UI { try { - BLL.OperationApply.UpdateApplyState(ApplyId, 11); + BOperationApply.UpdateApplyState(ApplyId, 11); MessageBox.Show("作废成功!"); btnFind_Click(null, null); } diff --git a/AIMS/OperationFront/UI/frmOperationApply.resx b/AIMS/OperationFront/frmOperationApply.resx similarity index 100% rename from AIMS/OperationFront/UI/frmOperationApply.resx rename to AIMS/OperationFront/frmOperationApply.resx diff --git a/AIMS/OperationFront/UI/frmOperationApplyDetail.Designer.cs b/AIMS/OperationFront/frmOperationApplyDetail.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmOperationApplyDetail.Designer.cs rename to AIMS/OperationFront/frmOperationApplyDetail.Designer.cs diff --git a/AIMS/OperationFront/UI/frmOperationApplyDetail.cs b/AIMS/OperationFront/frmOperationApplyDetail.cs similarity index 84% rename from AIMS/OperationFront/UI/frmOperationApplyDetail.cs rename to AIMS/OperationFront/frmOperationApplyDetail.cs index e561600..79266ea 100644 --- a/AIMS/OperationFront/UI/frmOperationApplyDetail.cs +++ b/AIMS/OperationFront/frmOperationApplyDetail.cs @@ -1,16 +1,11 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Configuration; -using HelperDB; +using AIMSBLL; using AIMSExtension; using AIMSModel; -using AIMSBLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Windows.Forms; namespace AIMS.OperationFront.UI { @@ -30,7 +25,7 @@ namespace AIMS.OperationFront.UI private PublicUI.UI.frmSelectPerson frmAssistant2; private PublicUI.UI.frmSelectPerson frmAssistant3; private List SelectDiseaseData = new List(); //选择后的诊断信息 - private List SelectOperationData = new List();//选择后的手术信息 + private List SelectOperationData = new List();//选择后的手术信息 private List SelectOperationCutTypeData = new List(); //切口类型 private List SelectOperationPositionData = new List(); //手术部位 private List SelectAnaesthesiaMethodData = new List(); //拟施麻醉 @@ -63,8 +58,8 @@ namespace AIMS.OperationFront.UI } - Model.OperationApply EditOperationApplyObj = new Model.OperationApply(); - Model.Oris_Patient EditOris_PatientObj = new Model.Oris_Patient(); + OperationApply EditOperationApplyObj = new OperationApply(); + OrisPatient EditOris_PatientObj = new OrisPatient(); private void frmOperationApplyDetail_Load(object sender, EventArgs e) { Initial(); @@ -75,14 +70,14 @@ namespace AIMS.OperationFront.UI { #region 修改给界面赋值 - EditOperationApplyObj = BLL.OperationApply.GetModel(EditApplyId); - EditOris_PatientObj = BLL.Oris_Patient.GetModel(EditOperationApplyObj.Oris_PatientId); + EditOperationApplyObj = BOperationApply.GetModel(EditApplyId); + EditOris_PatientObj = BOrisPatient.GetModel(EditOperationApplyObj.OrisPatientId.Value); txtMdrecNo.Text = EditOris_PatientObj.MdrecNo; txtArchivesNo.Text = EditOris_PatientObj.ArchivesNo; txtName.Text = EditOris_PatientObj.Name; cboSex.Text = EditOris_PatientObj.Sex; - dtpBirthDay.Value = EditOris_PatientObj.BirthDay; + dtpBirthDay.Value = EditOris_PatientObj.BirthDay.Value; txtHeight.Text = EditOris_PatientObj.Height; txtWeight.Text = EditOris_PatientObj.Weight; cboDepartment.SelectedValue = EditOris_PatientObj.DepId; @@ -91,7 +86,7 @@ namespace AIMS.OperationFront.UI cboBloodType.Text = EditOris_PatientObj.BloodType; cboRHBloodType.Text = EditOris_PatientObj.RHBloodType; cboPatientKind.Text = EditOris_PatientObj.PatientKind; - dtpInHosDate.Value = EditOris_PatientObj.InHosDate; + dtpInHosDate.Value = EditOris_PatientObj.InHosDate.Value; txtIdentityCard.Text = EditOris_PatientObj.IdentityCard; txtContacts.Text = EditOris_PatientObj.Contacts; txtContactsPhone.Text = EditOris_PatientObj.ContactsPhone; @@ -101,7 +96,8 @@ namespace AIMS.OperationFront.UI rboZQ.Checked = true; else rboJZ.Checked = true; - dtpOrderOperationTime.Value = EditOperationApplyObj.OrderOperationTime; + if (EditOperationApplyObj.OrderOperationTime != null) + dtpOrderOperationTime.Value = EditOperationApplyObj.OrderOperationTime.Value; //txtOperationTimeLeight.Text = EditOperationApplyObj.OperationTimeLeight.ToString(); if (EditOperationApplyObj.IsReturnOperation == 1) @@ -131,11 +127,11 @@ namespace AIMS.OperationFront.UI rdbIsNotPlanReturnOperation.Checked = false; } //诊断 - SelectDiseaseData = BLL.ApplyDiagnoseInfo.GetApplyDiagnoseIdList(EditApplyId); + SelectDiseaseData = BApplyDiagnoseInfo.GetApplyDiagnoseIdList(EditApplyId); foreach (int RowId in SelectDiseaseData) { - txtDisease.Text += DataDictionary.BLL.Disease.GetModel(RowId).Name + " ,"; + txtDisease.Text += BDisease.SelectSingle(RowId).Name + " ,"; } if (txtDisease.Text != "") txtDisease.Text = txtDisease.Text.Substring(0, txtDisease.Text.LastIndexOf(" ,")); @@ -143,14 +139,14 @@ namespace AIMS.OperationFront.UI txtDiseaseRemark.Text = EditOperationApplyObj.DiagnoseRemark; //手术 - SelectOperationData = BLL.ApplyOperationInfo.GetApplyOperationIdList(EditApplyId); + SelectOperationData = BApplyOperationInfo.GetApplyOperationIdList(EditApplyId); for (int i = 0; i < SelectOperationData.Count; i++) { - Model.ApplyOperationInfo info = SelectOperationData[i]; + ApplyOperationInfo info = SelectOperationData[i]; if (i == 0) { - txtOperation.Text = DataDictionary.BLL.Operation.GetModel(info.OperationId).Name; + txtOperation.Text = BOperation.SelectSingle(info.OperationId).Name; txtOperation.Tag = info.OperationId; txtLeft.Text = info.LeftRemark; txtRight.Text = info.RightRemark; @@ -159,7 +155,7 @@ namespace AIMS.OperationFront.UI } if (i == 1) { - txtOperation2.Text = DataDictionary.BLL.Operation.GetModel(info.OperationId).Name; + txtOperation2.Text = BOperation.SelectSingle(info.OperationId).Name; txtOperation2.Tag = info.OperationId; txtLeft2.Text = info.LeftRemark; txtRight2.Text = info.RightRemark; @@ -168,7 +164,7 @@ namespace AIMS.OperationFront.UI } if (i == 2) { - txtOperation3.Text = DataDictionary.BLL.Operation.GetModel(info.OperationId).Name; + txtOperation3.Text = BOperation.SelectSingle(info.OperationId).Name; txtOperation3.Tag = info.OperationId; txtLeft3.Text = info.LeftRemark; txtRight3.Text = info.RightRemark; @@ -177,7 +173,7 @@ namespace AIMS.OperationFront.UI } if (i == 3) { - txtOperation4.Text = DataDictionary.BLL.Operation.GetModel(info.OperationId).Name; + txtOperation4.Text = BOperation.SelectSingle(info.OperationId).Name; txtOperation4.Tag = info.OperationId; txtLeft4.Text = info.LeftRemark; txtRight4.Text = info.RightRemark; @@ -186,7 +182,7 @@ namespace AIMS.OperationFront.UI } if (i == 4) { - txtOperation5.Text = DataDictionary.BLL.Operation.GetModel(info.OperationId).Name; + txtOperation5.Text = BOperation.SelectSingle(info.OperationId).Name; txtOperation5.Tag = info.OperationId; txtLeft5.Text = info.LeftRemark; txtRight5.Text = info.RightRemark; @@ -196,7 +192,7 @@ namespace AIMS.OperationFront.UI } //foreach (int RowId in SelectOperationData) //{ - // string name = DataDictionary.BLL.Operation.GetModel(RowId).Name; + // string name = BOperation.SelectSingle(RowId).Name; // // Create one token and select it for keywords TokenEditor // //tokenEditor1.Tokens.Add(new DevComponents.DotNetBar.Controls.EditToken(name)); @@ -207,26 +203,26 @@ namespace AIMS.OperationFront.UI cboOperationLevel.SelectedValue = EditOperationApplyObj.OperationLevelId; //切口类型 - SelectOperationCutTypeData = BLL.ApplyOperationCutType.GetApplyOperationCutTypeIdList(EditApplyId); + SelectOperationCutTypeData = BApplyOperationCutType.GetApplyOperationCutTypeIdList(EditApplyId); foreach (int RowId in SelectOperationCutTypeData) { - txtOperationCutType.Text += DataDictionary.BLL.OperationCutType.GetModel(RowId).Name + " ,"; + txtOperationCutType.Text += BOperationCutType.SelectSingle(RowId).Name + " ,"; } if (txtOperationCutType.Text != "") txtOperationCutType.Text = txtOperationCutType.Text.Substring(0, txtOperationCutType.Text.LastIndexOf(" ,")); //手术部位 - SelectOperationPositionData = BLL.ApplyOperationPosition.GetApplyOperationPositionIdList(EditApplyId); + SelectOperationPositionData = BApplyOperationPosition.GetApplyOperationPositionIdList(EditApplyId); foreach (int RowId in SelectOperationPositionData) { - txtOperationPosition.Text += DataDictionary.BLL.OperationPosition.GetModel(RowId).Name + " ,"; + txtOperationPosition.Text += BOperationPosition.SelectSingle(RowId).Name + " ,"; } if (txtOperationPosition.Text != "") txtOperationPosition.Text = txtOperationPosition.Text.Substring(0, txtOperationPosition.Text.LastIndexOf(" ,")); //麻醉方式 - SelectAnaesthesiaMethodData = BLL.ApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(EditApplyId); + SelectAnaesthesiaMethodData = BApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(EditApplyId); foreach (int RowId in SelectAnaesthesiaMethodData) { - txtAnaesthesiaMethod.Text += DataDictionary.BLL.AnaesthesiaMethod.GetModel(RowId).Name + " ,"; + txtAnaesthesiaMethod.Text += BAnaesthesiaMethod.SelectSingle(RowId).Name + " ,"; } if (txtAnaesthesiaMethod.Text != "") txtAnaesthesiaMethod.Text = txtAnaesthesiaMethod.Text.Substring(0, txtAnaesthesiaMethod.Text.LastIndexOf(" ,")); @@ -235,20 +231,20 @@ namespace AIMS.OperationFront.UI txtContagion.Text = EditOperationApplyObj.Contagion; txtRemark.Text = EditOperationApplyObj.Remark; //术者 - SelectOperationDoctor = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 1); + SelectOperationDoctor = BApplyPersonDuty.GetPersonIdList(EditApplyId, 1); foreach (int RowId in SelectOperationDoctor) { - string name = AIMS.PublicUI.BLL.Person.GetModel(RowId).Name; + string name = BPerson.SelectSingle(RowId).Name; txtOperationDoctor.Text += name + " ,"; } if (txtOperationDoctor.Text != "") txtOperationDoctor.Text = txtOperationDoctor.Text.Substring(0, txtOperationDoctor.Text.LastIndexOf(" ,")); //一助 - SelectAssistant1Data = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 2); + SelectAssistant1Data = BApplyPersonDuty.GetPersonIdList(EditApplyId, 2); foreach (int RowId in SelectAssistant1Data) { - txtAssistant1.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAssistant1.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectAssistant1Data.Count > 0) { @@ -256,10 +252,10 @@ namespace AIMS.OperationFront.UI } //二助 - SelectAssistant2Data = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 3); + SelectAssistant2Data = BApplyPersonDuty.GetPersonIdList(EditApplyId, 3); foreach (int RowId in SelectAssistant2Data) { - txtAssistant2.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAssistant2.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectAssistant2Data.Count > 0) { @@ -267,10 +263,10 @@ namespace AIMS.OperationFront.UI } //三助 - SelectAssistant3Data = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 4); + SelectAssistant3Data = BApplyPersonDuty.GetPersonIdList(EditApplyId, 4); foreach (int RowId in SelectAssistant3Data) { - txtAssistant3.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAssistant3.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectAssistant3Data.Count > 0) { @@ -295,46 +291,46 @@ namespace AIMS.OperationFront.UI { cboOperationRoom.DisplayMember = "Name"; cboOperationRoom.ValueMember = "Id"; - cboOperationRoom.DataSource = DataDictionary.BLL.OperationRoom.GetDataTable("IsValid=1"); + cboOperationRoom.DataSource = BOperationRoom.GetDataTable("IsValid=1"); cboOperationRoom.SelectedIndex = -1; - - dtpPlanOperationTime.Value = EditOperationApplyObj.PlanOperationTime; + if (EditOperationApplyObj.PlanOperationTime != null) + dtpPlanOperationTime.Value = EditOperationApplyObj.PlanOperationTime.Value; cboOperationRoom.SelectedValue = int.Parse(EditOperationApplyObj.OperationRoomId.ToString()); - SelectAnesthesiaDoctorData = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 5); + SelectAnesthesiaDoctorData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 5); foreach (int RowId in SelectAnesthesiaDoctorData) { - txtAnesthesiaDoctor.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctor.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectAnesthesiaDoctorData.Count > 0) { txtAnesthesiaDoctor.Text = txtAnesthesiaDoctor.Text.Substring(0, txtAnesthesiaDoctor.Text.LastIndexOf(" ,")); } - SelectInstrumentNurseData = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 6); + SelectInstrumentNurseData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 6); foreach (int RowId in SelectInstrumentNurseData) { - txtInstrumentNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurse.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectInstrumentNurseData.Count > 0) { txtInstrumentNurse.Text = txtInstrumentNurse.Text.Substring(0, txtInstrumentNurse.Text.LastIndexOf(" ,")); } - SelectTourNurseData = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 7); + SelectTourNurseData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 7); foreach (int RowId in SelectTourNurseData) { - txtTourNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurse.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectTourNurseData.Count > 0) { txtTourNurse.Text = txtTourNurse.Text.Substring(0, txtTourNurse.Text.LastIndexOf(" ,")); } - SelectAnesthesiaDoctorSucceedData = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 8); + SelectAnesthesiaDoctorSucceedData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 8); foreach (int RowId in SelectAnesthesiaDoctorSucceedData) { - txtAnesthesiaDoctorSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctorSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectAnesthesiaDoctorSucceedData.Count > 0) { @@ -342,10 +338,10 @@ namespace AIMS.OperationFront.UI } - SelectInstrumentNurseSucceedData = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 9); + SelectInstrumentNurseSucceedData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 9); foreach (int RowId in SelectInstrumentNurseSucceedData) { - txtInstrumentNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurseSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectInstrumentNurseSucceedData.Count > 0) { @@ -353,10 +349,10 @@ namespace AIMS.OperationFront.UI } - SelectTourNurseSucceedData = BLL.ApplyPersonDuty.GetPersonIdList(EditApplyId, 10); + SelectTourNurseSucceedData = BApplyPersonDuty.GetPersonIdList(EditApplyId, 10); foreach (int RowId in SelectTourNurseSucceedData) { - txtTourNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurseSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,"; } if (SelectTourNurseSucceedData.Count > 0) { @@ -400,28 +396,28 @@ namespace AIMS.OperationFront.UI cboDepartment.DisplayMember = "Name"; cboDepartment.ValueMember = "Id"; - cboDepartment.DataSource = AIMS.PublicUI.BLL.Department.GetDepartmentDataTable("IsValid=1 "); + cboDepartment.DataSource = BDepartment.GetDepartmentDataTable("IsValid=1 "); cboDepartment.SelectedIndex = -1; cboApplyDepId.DisplayMember = "Name"; cboApplyDepId.ValueMember = "Id"; - cboApplyDepId.DataSource = AIMS.PublicUI.BLL.Department.GetDepartmentDataTable("IsValid=1 "); + cboApplyDepId.DataSource = BDepartment.GetDepartmentDataTable("IsValid=1 "); cboApplyDepId.SelectedIndex = -1; cboPatientKind.DisplayMember = "Name"; cboPatientKind.ValueMember = "Id"; - cboPatientKind.DataSource = DataDictionary.BLL.PatientKind.GetDataTable("IsValid=1"); + cboPatientKind.DataSource = BPatientKind.GetDataTable("IsValid=1"); cboPatientKind.SelectedIndex = -1; cboOperationLevel.DisplayMember = "Name"; cboOperationLevel.ValueMember = "Id"; - cboOperationLevel.DataSource = DataDictionary.BLL.OperationLevel.GetDataTable("IsValid=1"); + cboOperationLevel.DataSource = BOperationLevel.GetDataTable("IsValid=1"); cboOperationLevel.SelectedIndex = -1; if (State == AIMSExtension.EditState.ADD) { Text = Text + " 增加"; - cboApplyDepId.Text = AIMS.PublicUI.BLL.Department.GetModel(AIMSExtension.PublicMethod.DepId).Name; + cboApplyDepId.Text = BDepartment.SelectSingle(AIMSExtension.PublicMethod.DepId).Name; cboApplyDepId.SelectedValue = AIMSExtension.PublicMethod.DepId; } if (State == AIMSExtension.EditState.EDIT) @@ -449,7 +445,7 @@ namespace AIMS.OperationFront.UI foreach (int RowId in frmSelectDisease.SelectRightData) { - txtDisease.Text += DataDictionary.BLL.Disease.GetModel(RowId).Name + " ,"; + txtDisease.Text += BDisease.SelectSingle(RowId).Name + " ,"; } int idxStart = txtDisease.Text.LastIndexOf(" ,"); @@ -474,7 +470,7 @@ namespace AIMS.OperationFront.UI if (frmSelectOperation.SelectRightData.Count > 0) { - txtOperation.Text = DataDictionary.BLL.Operation.GetModel(frmSelectOperation.SelectRightData[0]).Name; + txtOperation.Text = BOperation.SelectSingle(frmSelectOperation.SelectRightData[0]).Name; txtOperation.Tag = frmSelectOperation.SelectRightData[0]; txtLeft.Enabled = true; txtRight.Enabled = true; @@ -505,7 +501,7 @@ namespace AIMS.OperationFront.UI if (frmSelectOperation.SelectRightData.Count > 0) { - txtOperation2.Text = DataDictionary.BLL.Operation.GetModel(frmSelectOperation.SelectRightData[0]).Name; + txtOperation2.Text = BOperation.SelectSingle(frmSelectOperation.SelectRightData[0]).Name; txtOperation2.Tag = frmSelectOperation.SelectRightData[0]; txtLeft2.Enabled = true; txtRight2.Enabled = true; @@ -536,7 +532,7 @@ namespace AIMS.OperationFront.UI if (frmSelectOperation.SelectRightData.Count > 0) { - txtOperation3.Text = DataDictionary.BLL.Operation.GetModel(frmSelectOperation.SelectRightData[0]).Name; + txtOperation3.Text = BOperation.SelectSingle(frmSelectOperation.SelectRightData[0]).Name; txtOperation3.Tag = frmSelectOperation.SelectRightData[0]; txtLeft3.Enabled = true; @@ -569,7 +565,7 @@ namespace AIMS.OperationFront.UI if (frmSelectOperation.SelectRightData.Count > 0) { - txtOperation4.Text = DataDictionary.BLL.Operation.GetModel(frmSelectOperation.SelectRightData[0]).Name; + txtOperation4.Text = BOperation.SelectSingle(frmSelectOperation.SelectRightData[0]).Name; txtOperation4.Tag = frmSelectOperation.SelectRightData[0]; txtLeft4.Enabled = true; @@ -602,7 +598,7 @@ namespace AIMS.OperationFront.UI if (frmSelectOperation.SelectRightData.Count > 0) { - txtOperation5.Text = DataDictionary.BLL.Operation.GetModel(frmSelectOperation.SelectRightData[0]).Name; + txtOperation5.Text = BOperation.SelectSingle(frmSelectOperation.SelectRightData[0]).Name; txtOperation5.Tag = frmSelectOperation.SelectRightData[0]; txtLeft5.Enabled = true; @@ -635,7 +631,7 @@ namespace AIMS.OperationFront.UI SelectOperationCutTypeData = frmOperationCutType.SelectOperationCutTypeData; foreach (int RowId in frmOperationCutType.SelectOperationCutTypeData) { - txtOperationCutType.Text += DataDictionary.BLL.OperationCutType.GetModel(RowId).Name + " ,"; + txtOperationCutType.Text += BOperationCutType.SelectSingle(RowId).Name + " ,"; } int idxStart = txtOperationCutType.Text.LastIndexOf(" ,"); txtOperationCutType.Text = txtOperationCutType.Text.Substring(0, idxStart); @@ -658,7 +654,7 @@ namespace AIMS.OperationFront.UI SelectOperationPositionData = frmOperationPosition.SelectOperationPositionData; foreach (int RowId in frmOperationPosition.SelectOperationPositionData) { - txtOperationPosition.Text += DataDictionary.BLL.OperationPosition.GetModel(RowId).Name + " ,"; + txtOperationPosition.Text += BOperationPosition.SelectSingle(RowId).Name + " ,"; } int idxStart = txtOperationPosition.Text.LastIndexOf(" ,"); txtOperationPosition.Text = txtOperationPosition.Text.Substring(0, idxStart); @@ -682,7 +678,7 @@ namespace AIMS.OperationFront.UI SelectAnaesthesiaMethodData = frmAnaesthesiaMethod.SelectAnaesthesiaMethodData; foreach (int RowId in frmAnaesthesiaMethod.SelectAnaesthesiaMethodData) { - txtAnaesthesiaMethod.Text += DataDictionary.BLL.AnaesthesiaMethod.GetModel(RowId).Name + " ,"; + txtAnaesthesiaMethod.Text += BAnaesthesiaMethod.SelectSingle(RowId).Name + " ,"; } int idxStart = txtAnaesthesiaMethod.Text.LastIndexOf(" ,"); txtAnaesthesiaMethod.Text = txtAnaesthesiaMethod.Text.Substring(0, idxStart); @@ -707,7 +703,7 @@ namespace AIMS.OperationFront.UI SelectContagionData = frmContagion.SelectContagionData; foreach (int RowId in frmContagion.SelectContagionData) { - txtContagion.Text += DataDictionary.BLL.DataDictionary.GetModel(RowId).Name + " ,"; + txtContagion.Text += BBasicDictionary.GetModel(RowId).Name + " ,"; } int idxStart = txtContagion.Text.LastIndexOf(" ,"); txtContagion.Text = txtContagion.Text.Substring(0, idxStart); @@ -732,7 +728,7 @@ namespace AIMS.OperationFront.UI SelectOperationDoctor = frmOperationDoctor.SelectPersonData; foreach (int RowId in frmOperationDoctor.SelectPersonData) { - txtOperationDoctor.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtOperationDoctor.Text += BPerson.SelectSingle(RowId).Name + " ,"; } int idxStart = txtOperationDoctor.Text.LastIndexOf(" ,"); txtOperationDoctor.Text = txtOperationDoctor.Text.Substring(0, idxStart); @@ -757,7 +753,7 @@ namespace AIMS.OperationFront.UI SelectAssistant1Data = frmAssistant1.SelectPersonData; foreach (int RowId in frmAssistant1.SelectPersonData) { - txtAssistant1.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAssistant1.Text += BPerson.SelectSingle(RowId).Name + " ,"; } int idxStart = txtAssistant1.Text.LastIndexOf(" ,"); txtAssistant1.Text = txtAssistant1.Text.Substring(0, idxStart); @@ -782,7 +778,7 @@ namespace AIMS.OperationFront.UI SelectAssistant2Data = frmAssistant2.SelectPersonData; foreach (int RowId in frmAssistant2.SelectPersonData) { - txtAssistant2.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAssistant2.Text += BPerson.SelectSingle(RowId).Name + " ,"; } int idxStart = txtAssistant2.Text.LastIndexOf(" ,"); txtAssistant2.Text = txtAssistant2.Text.Substring(0, idxStart); @@ -809,7 +805,7 @@ namespace AIMS.OperationFront.UI SelectAssistant3Data = frmAssistant3.SelectPersonData; foreach (int RowId in frmAssistant3.SelectPersonData) { - txtAssistant3.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAssistant3.Text += BPerson.SelectSingle(RowId).Name + " ,"; } int idxStart = txtAssistant3.Text.LastIndexOf(" ,"); txtAssistant3.Text = txtAssistant3.Text.Substring(0, idxStart); @@ -863,7 +859,7 @@ namespace AIMS.OperationFront.UI SelectAssistant2Data.Clear(); SelectAssistant3Data.Clear(); txtMdrecNo.Select(); - cboApplyDepId.Text = AIMS.PublicUI.BLL.Department.GetModel(AIMSExtension.PublicMethod.DepId).Name; + cboApplyDepId.Text = BDepartment.SelectSingle(AIMSExtension.PublicMethod.DepId).Name; } @@ -879,7 +875,7 @@ namespace AIMS.OperationFront.UI } } - Model.Oris_Patient Oris_PatientObj = new Model.Oris_Patient(); + OrisPatient Oris_PatientObj = new OrisPatient(); if (State == AIMSExtension.EditState.EDIT) { Oris_PatientObj = EditOris_PatientObj; @@ -905,7 +901,7 @@ namespace AIMS.OperationFront.UI Oris_PatientObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; Oris_PatientObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - Model.OperationApply OperationApplyObj = new Model.OperationApply(); + OperationApply OperationApplyObj = new OperationApply(); if (State == AIMSExtension.EditState.EDIT) { OperationApplyObj = EditOperationApplyObj; @@ -950,10 +946,10 @@ namespace AIMS.OperationFront.UI HelperDB.DbHelperSQL.BeginTrans(); - BLL.Oris_Patient.Add(Oris_PatientObj); - OperationApplyObj.Oris_PatientId = BLL.Oris_Patient.GetOris_PatientMaxId(); - BLL.OperationApply.Add(OperationApplyObj); - SaveSelectItem(BLL.OperationApply.GetOperationApplyMaxId(), OperationApplyObj.OperateDate); + BOrisPatient.Add(Oris_PatientObj); + OperationApplyObj.OrisPatientId = BOrisPatient.GetOris_PatientMaxId(); + BOperationApply.Add(OperationApplyObj); + SaveSelectItem(BOperationApply.GetOperationApplyMaxId(), OperationApplyObj.OperateDate.Value ); HelperDB.DbHelperSQL.CommitTrans(); MessageBox.Show("提交成功!", "系统提示"); @@ -967,16 +963,16 @@ namespace AIMS.OperationFront.UI //{ HelperDB.DbHelperSQL.BeginTrans(); - //Oris_PatientObj.Id = BLL.OperationApply.GetModel(EditApplyId).Oris_PatientId; + //Oris_PatientObj.Id = BOperationApply.SelectSingle(EditApplyId).Oris_PatientId; //OperationApplyObj.Id = EditApplyId; - if (OperationApplyObj.PlanOperationTime.Year != 1) - if (OperationApplyObj.OrderOperationTime.Day != OperationApplyObj.PlanOperationTime.Day) + if (OperationApplyObj.PlanOperationTime.Value.Year != 1) + if (OperationApplyObj.OrderOperationTime.Value.Day != OperationApplyObj.PlanOperationTime.Value.Day) { OperationApplyObj.PlanOperationTime = OperationApplyObj.OrderOperationTime; } - BLL.Oris_Patient.Update(Oris_PatientObj); - BLL.OperationApply.Update(OperationApplyObj); - SaveSelectItem(EditApplyId, OperationApplyObj.OperateDate); + BOrisPatient.Update(Oris_PatientObj); + BOperationApply.Update(OperationApplyObj); + SaveSelectItem(EditApplyId, OperationApplyObj.OperateDate.Value); HelperDB.DbHelperSQL.CommitTrans(); MessageBox.Show("修改成功!", "系统提示"); @@ -993,7 +989,7 @@ namespace AIMS.OperationFront.UI string PlanOperationTime = dtpPlanOperationTime.Value.ToString("yyyy-MM-dd HH:mm"); int OperationRoomId = int.Parse(cboOperationRoom.SelectedValue.ToString()); - BLL.OperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, 4); //状态4 已排程 + BOperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, 4); //状态4 已排程 SaveSelectItem2(ApplyId, AIMSExtension.PublicMethod.SystemDate()); HelperDB.DbHelperSQL.CommitTrans(); @@ -1018,8 +1014,8 @@ namespace AIMS.OperationFront.UI private void SaveSelectItem(int OperationApplyId, DateTime OperateDate) { //诊断 - Model.ApplyDiagnoseInfo ApplyDiagnoseInfoObj = new Model.ApplyDiagnoseInfo(); - BLL.ApplyDiagnoseInfo.Delete(OperationApplyId); + ApplyDiagnoseInfo ApplyDiagnoseInfoObj = new ApplyDiagnoseInfo(); + BApplyDiagnoseInfo.Delete(OperationApplyId); foreach (int DiseaseId in SelectDiseaseData) { ApplyDiagnoseInfoObj.OperationApplyId = OperationApplyId; @@ -1027,14 +1023,14 @@ namespace AIMS.OperationFront.UI ApplyDiagnoseInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyDiagnoseInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyDiagnoseInfoObj.OperateDate = OperateDate; - BLL.ApplyDiagnoseInfo.Add(ApplyDiagnoseInfoObj); + BApplyDiagnoseInfo.Add(ApplyDiagnoseInfoObj); } //手术 - BLL.ApplyOperationInfo.Delete(OperationApplyId); + BApplyOperationInfo.Delete(OperationApplyId); if (txtOperation.Tag != null && txtOperation.Text != "") { - Model.ApplyOperationInfo ApplyOperationInfoObj = new Model.ApplyOperationInfo(); + ApplyOperationInfo ApplyOperationInfoObj = new ApplyOperationInfo(); ApplyOperationInfoObj.OperationApplyId = OperationApplyId; ApplyOperationInfoObj.OperationId = int.Parse(txtOperation.Tag.ToString()); ApplyOperationInfoObj.OperationName = txtLeft.Text + txtOperation.Text + txtRight.Text; @@ -1043,11 +1039,11 @@ namespace AIMS.OperationFront.UI ApplyOperationInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyOperationInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyOperationInfoObj.OperateDate = OperateDate; - BLL.ApplyOperationInfo.Add(ApplyOperationInfoObj); + BApplyOperationInfo.Add(ApplyOperationInfoObj); } if (txtOperation2.Tag != null && txtOperation2.Text != "") { - Model.ApplyOperationInfo ApplyOperationInfoObj = new Model.ApplyOperationInfo(); + ApplyOperationInfo ApplyOperationInfoObj = new ApplyOperationInfo(); ApplyOperationInfoObj.OperationApplyId = OperationApplyId; ApplyOperationInfoObj.OperationId = int.Parse(txtOperation2.Tag.ToString()); ApplyOperationInfoObj.OperationName = txtLeft2.Text + txtOperation2.Text + txtRight2.Text; @@ -1056,11 +1052,11 @@ namespace AIMS.OperationFront.UI ApplyOperationInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyOperationInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyOperationInfoObj.OperateDate = OperateDate; - BLL.ApplyOperationInfo.Add(ApplyOperationInfoObj); + BApplyOperationInfo.Add(ApplyOperationInfoObj); } if (txtOperation3.Tag != null && txtOperation3.Text != "") { - Model.ApplyOperationInfo ApplyOperationInfoObj = new Model.ApplyOperationInfo(); + ApplyOperationInfo ApplyOperationInfoObj = new ApplyOperationInfo(); ApplyOperationInfoObj.OperationApplyId = OperationApplyId; ApplyOperationInfoObj.OperationId = int.Parse(txtOperation3.Tag.ToString()); ApplyOperationInfoObj.OperationName = txtLeft3.Text + txtOperation3.Text + txtRight3.Text; @@ -1069,11 +1065,11 @@ namespace AIMS.OperationFront.UI ApplyOperationInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyOperationInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyOperationInfoObj.OperateDate = OperateDate; - BLL.ApplyOperationInfo.Add(ApplyOperationInfoObj); + BApplyOperationInfo.Add(ApplyOperationInfoObj); } if (txtOperation4.Tag != null && txtOperation4.Text != "") { - Model.ApplyOperationInfo ApplyOperationInfoObj = new Model.ApplyOperationInfo(); + ApplyOperationInfo ApplyOperationInfoObj = new ApplyOperationInfo(); ApplyOperationInfoObj.OperationApplyId = OperationApplyId; ApplyOperationInfoObj.OperationId = int.Parse(txtOperation4.Tag.ToString()); ApplyOperationInfoObj.OperationName = txtLeft4.Text + txtOperation4.Text + txtRight4.Text; @@ -1082,11 +1078,11 @@ namespace AIMS.OperationFront.UI ApplyOperationInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyOperationInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyOperationInfoObj.OperateDate = OperateDate; - BLL.ApplyOperationInfo.Add(ApplyOperationInfoObj); + BApplyOperationInfo.Add(ApplyOperationInfoObj); } if (txtOperation5.Tag != null && txtOperation5.Text != "") { - Model.ApplyOperationInfo ApplyOperationInfoObj = new Model.ApplyOperationInfo(); + ApplyOperationInfo ApplyOperationInfoObj = new ApplyOperationInfo(); ApplyOperationInfoObj.OperationApplyId = OperationApplyId; ApplyOperationInfoObj.OperationId = int.Parse(txtOperation5.Tag.ToString()); ApplyOperationInfoObj.OperationName = txtLeft5.Text + txtOperation5.Text + txtRight5.Text; @@ -1095,11 +1091,11 @@ namespace AIMS.OperationFront.UI ApplyOperationInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyOperationInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyOperationInfoObj.OperateDate = OperateDate; - BLL.ApplyOperationInfo.Add(ApplyOperationInfoObj); + BApplyOperationInfo.Add(ApplyOperationInfoObj); } //切口类型 - Model.ApplyOperationCutType ApplyOperationCutTypeObj = new Model.ApplyOperationCutType(); - BLL.ApplyOperationCutType.Delete(OperationApplyId); + ApplyOperationCutType ApplyOperationCutTypeObj = new ApplyOperationCutType(); + BApplyOperationCutType.Delete(OperationApplyId); foreach (int OperationCutTypeId in SelectOperationCutTypeData) { @@ -1108,11 +1104,11 @@ namespace AIMS.OperationFront.UI ApplyOperationCutTypeObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyOperationCutTypeObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyOperationCutTypeObj.OperateDate = OperateDate; - BLL.ApplyOperationCutType.Add(ApplyOperationCutTypeObj); + BApplyOperationCutType.Add(ApplyOperationCutTypeObj); } //手术部位 - Model.ApplyOperationPosition ApplyOperationPositionObj = new Model.ApplyOperationPosition(); - BLL.ApplyOperationPosition.Delete(OperationApplyId); + ApplyOperationPosition ApplyOperationPositionObj = new ApplyOperationPosition(); + BApplyOperationPosition.Delete(OperationApplyId); foreach (int OperationPositionId in SelectOperationPositionData) { ApplyOperationPositionObj.OperationApplyId = OperationApplyId; @@ -1120,11 +1116,11 @@ namespace AIMS.OperationFront.UI ApplyOperationPositionObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyOperationPositionObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyOperationPositionObj.OperateDate = OperateDate; - BLL.ApplyOperationPosition.Add(ApplyOperationPositionObj); + BApplyOperationPosition.Add(ApplyOperationPositionObj); } //拟施麻醉 - Model.ApplyAnaesthesiaMethod ApplyAnaesthesiaMethodObj = new Model.ApplyAnaesthesiaMethod(); - BLL.ApplyAnaesthesiaMethod.Delete(OperationApplyId); + ApplyAnaesthesiaMethod ApplyAnaesthesiaMethodObj = new ApplyAnaesthesiaMethod(); + BApplyAnaesthesiaMethod.Delete(OperationApplyId); foreach (int AnaesthesiaMethodId in SelectAnaesthesiaMethodData) { ApplyAnaesthesiaMethodObj.OperationApplyId = OperationApplyId; @@ -1132,11 +1128,11 @@ namespace AIMS.OperationFront.UI ApplyAnaesthesiaMethodObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyAnaesthesiaMethodObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyAnaesthesiaMethodObj.OperateDate = OperateDate; - BLL.ApplyAnaesthesiaMethod.Add(ApplyAnaesthesiaMethodObj); + BApplyAnaesthesiaMethod.Add(ApplyAnaesthesiaMethodObj); } //术者 - Model.ApplyPersonDuty ApplyPersonDutyOperationDoctor = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 1); + ApplyPersonDuty ApplyPersonDutyOperationDoctor = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 1); foreach (int PersonId in SelectOperationDoctor) { ApplyPersonDutyOperationDoctor.OperationApplyId = OperationApplyId; @@ -1145,12 +1141,12 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyOperationDoctor.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyOperationDoctor.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyOperationDoctor.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyOperationDoctor); + BApplyPersonDuty.Add(ApplyPersonDutyOperationDoctor); } //一助 - Model.ApplyPersonDuty ApplyPersonDutyAssistant1 = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 2); + ApplyPersonDuty ApplyPersonDutyAssistant1 = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 2); foreach (int PersonId in SelectAssistant1Data) { ApplyPersonDutyAssistant1.OperationApplyId = OperationApplyId; @@ -1159,11 +1155,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyAssistant1.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAssistant1.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAssistant1.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyAssistant1); + BApplyPersonDuty.Add(ApplyPersonDutyAssistant1); } //二助 - Model.ApplyPersonDuty ApplyPersonDutyAssistant2 = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 3); + ApplyPersonDuty ApplyPersonDutyAssistant2 = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 3); foreach (int PersonId in SelectAssistant2Data) { ApplyPersonDutyAssistant2.OperationApplyId = OperationApplyId; @@ -1172,11 +1168,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyAssistant2.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAssistant2.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAssistant2.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyAssistant2); + BApplyPersonDuty.Add(ApplyPersonDutyAssistant2); } // - Model.ApplyPersonDuty ApplyPersonDutyAssistant3 = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 4); + ApplyPersonDuty ApplyPersonDutyAssistant3 = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 4); foreach (int PersonId in SelectAssistant3Data) { ApplyPersonDutyAssistant3.OperationApplyId = OperationApplyId; @@ -1185,7 +1181,7 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyAssistant3.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAssistant3.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAssistant3.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyAssistant3); + BApplyPersonDuty.Add(ApplyPersonDutyAssistant3); } } @@ -1210,8 +1206,8 @@ namespace AIMS.OperationFront.UI } private void SaveSelectItem2(int OperationApplyId, DateTime OperateDate) { - Model.ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 5); + ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 5); foreach (int PersonId in SelectAnesthesiaDoctorData) { ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = OperationApplyId; @@ -1220,11 +1216,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyAnesthesiaDoctor.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAnesthesiaDoctor.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAnesthesiaDoctor.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); + BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); } - Model.ApplyPersonDuty ApplyPersonDutyInstrumentNurse = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 6); + ApplyPersonDuty ApplyPersonDutyInstrumentNurse = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 6); foreach (int PersonId in SelectInstrumentNurseData) { ApplyPersonDutyInstrumentNurse.OperationApplyId = OperationApplyId; @@ -1233,11 +1229,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyInstrumentNurse.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyInstrumentNurse.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyInstrumentNurse.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurse); + BApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurse); } - Model.ApplyPersonDuty ApplyPersonDutyTourNurse = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 7); + ApplyPersonDuty ApplyPersonDutyTourNurse = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 7); foreach (int PersonId in SelectTourNurseData) { ApplyPersonDutyTourNurse.OperationApplyId = OperationApplyId; @@ -1246,11 +1242,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyTourNurse.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyTourNurse.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyTourNurse.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyTourNurse); + BApplyPersonDuty.Add(ApplyPersonDutyTourNurse); } - Model.ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctorSucceed = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 8); + ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctorSucceed = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 8); foreach (int PersonId in SelectAnesthesiaDoctorSucceedData) { ApplyPersonDutyAnesthesiaDoctorSucceed.OperationApplyId = OperationApplyId; @@ -1259,11 +1255,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyAnesthesiaDoctorSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAnesthesiaDoctorSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAnesthesiaDoctorSucceed.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctorSucceed); + BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctorSucceed); } - Model.ApplyPersonDuty ApplyPersonDutyInstrumentNurseSucceed = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 9); + ApplyPersonDuty ApplyPersonDutyInstrumentNurseSucceed = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 9); foreach (int PersonId in SelectInstrumentNurseSucceedData) { ApplyPersonDutyInstrumentNurseSucceed.OperationApplyId = OperationApplyId; @@ -1272,11 +1268,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyInstrumentNurseSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyInstrumentNurseSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyInstrumentNurseSucceed.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurseSucceed); + BApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurseSucceed); } - Model.ApplyPersonDuty ApplyPersonDutyTourNurseSucceed = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 10); + ApplyPersonDuty ApplyPersonDutyTourNurseSucceed = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 10); foreach (int PersonId in SelectTourNurseSucceedData) { ApplyPersonDutyTourNurseSucceed.OperationApplyId = OperationApplyId; @@ -1285,7 +1281,7 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyTourNurseSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyTourNurseSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyTourNurseSucceed.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyTourNurseSucceed); + BApplyPersonDuty.Add(ApplyPersonDutyTourNurseSucceed); } } @@ -1430,7 +1426,7 @@ namespace AIMS.OperationFront.UI SelectAnesthesiaDoctorData = frmAnesthesiaDoctor.SelectPersonData; foreach (int RowId in frmAnesthesiaDoctor.SelectPersonData) { - txtAnesthesiaDoctor.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctor.Text += BPerson.SelectSingle(RowId).Name + " ,"; } txtAnesthesiaDoctor.Text = txtAnesthesiaDoctor.Text.Substring(0, txtAnesthesiaDoctor.Text.LastIndexOf(" ,")); } @@ -1455,7 +1451,7 @@ namespace AIMS.OperationFront.UI SelectAnesthesiaDoctorSucceedData = frmAnesthesiaDoctorSucceed.SelectPersonData; foreach (int RowId in frmAnesthesiaDoctorSucceed.SelectPersonData) { - txtAnesthesiaDoctorSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctorSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,"; } txtAnesthesiaDoctorSucceed.Text = txtAnesthesiaDoctorSucceed.Text.Substring(0, txtAnesthesiaDoctorSucceed.Text.LastIndexOf(" ,")); } @@ -1481,7 +1477,7 @@ namespace AIMS.OperationFront.UI SelectInstrumentNurseData = frmInstrumentNurse.SelectPersonData; foreach (int RowId in frmInstrumentNurse.SelectPersonData) { - txtInstrumentNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurse.Text += BPerson.SelectSingle(RowId).Name + " ,"; } txtInstrumentNurse.Text = txtInstrumentNurse.Text.Substring(0, txtInstrumentNurse.Text.LastIndexOf(" ,")); } @@ -1506,7 +1502,7 @@ namespace AIMS.OperationFront.UI SelectInstrumentNurseSucceedData = frmInstrumentNurseSucceed.SelectPersonData; foreach (int RowId in frmInstrumentNurseSucceed.SelectPersonData) { - txtInstrumentNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurseSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,"; } txtInstrumentNurseSucceed.Text = txtInstrumentNurseSucceed.Text.Substring(0, txtInstrumentNurseSucceed.Text.LastIndexOf(" ,")); } @@ -1531,7 +1527,7 @@ namespace AIMS.OperationFront.UI SelectTourNurseData = frmTourNurse.SelectPersonData; foreach (int RowId in frmTourNurse.SelectPersonData) { - txtTourNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurse.Text += BPerson.SelectSingle(RowId).Name + " ,"; } txtTourNurse.Text = txtTourNurse.Text.Substring(0, txtTourNurse.Text.LastIndexOf(" ,")); } @@ -1556,7 +1552,7 @@ namespace AIMS.OperationFront.UI SelectTourNurseSucceedData = frmTourNurseSucceed.SelectPersonData; foreach (int RowId in frmTourNurseSucceed.SelectPersonData) { - txtTourNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurseSucceed.Text += BPerson.SelectSingle(RowId).Name + " ,"; } txtTourNurseSucceed.Text = txtTourNurseSucceed.Text.Substring(0, txtTourNurseSucceed.Text.LastIndexOf(" ,")); } diff --git a/AIMS/OperationFront/UI/frmOperationApplyDetail.resx b/AIMS/OperationFront/frmOperationApplyDetail.resx similarity index 100% rename from AIMS/OperationFront/UI/frmOperationApplyDetail.resx rename to AIMS/OperationFront/frmOperationApplyDetail.resx diff --git a/AIMS/OperationFront/UI/frmOperationFrontVisit.Designer.cs b/AIMS/OperationFront/frmOperationFrontVisit.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmOperationFrontVisit.Designer.cs rename to AIMS/OperationFront/frmOperationFrontVisit.Designer.cs diff --git a/AIMS/OperationFront/UI/frmOperationFrontVisit.cs b/AIMS/OperationFront/frmOperationFrontVisit.cs similarity index 89% rename from AIMS/OperationFront/UI/frmOperationFrontVisit.cs rename to AIMS/OperationFront/frmOperationFrontVisit.cs index 94f96c1..ba32a3a 100644 --- a/AIMS/OperationFront/UI/frmOperationFrontVisit.cs +++ b/AIMS/OperationFront/frmOperationFrontVisit.cs @@ -8,6 +8,8 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSModel; +using AIMSBLL; namespace AIMS.OperationFront.UI { @@ -29,9 +31,9 @@ namespace AIMS.OperationFront.UI dtpBegInDate2.Value = DateTime.Parse(dtpBegInDate2.Value.ToString("yyyy-MM-dd")); dtpEndDate2.Value = DateTime.Parse(dtpEndDate2.Value.ToString("yyyy-MM-dd")).AddDays(4); - List list = new List(); - list = AIMS.PublicUI.BLL.Department.GetDepartmentAllList("诊疗部门"); - list.Insert(0, new AIMS.PublicUI.Model.Department + List list = new List(); + list = BDepartment.GetDepartmentAllList("诊疗部门"); + list.Insert(0, new Department { Id = -1, Name = "全部科室" @@ -46,9 +48,9 @@ namespace AIMS.OperationFront.UI dtpEndDate2.Value = DateTime.Parse(dtpEndDate2.Value.ToString("yyyy-MM-dd")).AddDays(4); - List list2 = new List(); - list2 = AIMS.PublicUI.BLL.Department.GetDepartmentAllList("诊疗部门"); - list2.Insert(0, new AIMS.PublicUI.Model.Department + List list2 = new List(); + list2 = BDepartment.GetDepartmentAllList("诊疗部门"); + list2.Insert(0, new Department { Id = -1, Name = "全部科室" @@ -71,7 +73,7 @@ namespace AIMS.OperationFront.UI { Department = ""; } - DataTable dt = BLL.OperationApply.GetOperationFrontDataTableByPlanOperationTime(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTableByPlanOperationTime(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "State IN ('已排程') and ApplyDepName LIKE '%" + Department + "%' AND MdrecNo LIKE '%" + txtMdrecNo.Text.Trim() + "%'", ""); dgv1.DataSource = Newdt; for (int i = 0; i < dgv1.Rows.Count; i++) @@ -94,7 +96,7 @@ namespace AIMS.OperationFront.UI { Department = ""; } - DataTable dt = BLL.OperationApply.GetOperationFrontDataTableByPlanOperationTime(dtpBegInDate2.Value.ToString("yyyy-MM-dd"), dtpEndDate2.Value.ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTableByPlanOperationTime(dtpBegInDate2.Value.ToString("yyyy-MM-dd"), dtpEndDate2.Value.ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "State IN ('已访视') and ApplyDepName LIKE '%" + Department + "%' AND MdrecNo LIKE '%" + txtMdrecNo.Text.Trim() + "%'", ""); dgv2.DataSource = Newdt; for (int i = 0; i < dgv2.Rows.Count; i++) diff --git a/AIMS/OperationFront/UI/frmOperationFrontVisit.resx b/AIMS/OperationFront/frmOperationFrontVisit.resx similarity index 100% rename from AIMS/OperationFront/UI/frmOperationFrontVisit.resx rename to AIMS/OperationFront/frmOperationFrontVisit.resx diff --git a/AIMS/OperationFront/UI/frmOperationPlan.Designer.cs b/AIMS/OperationFront/frmOperationPlan.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmOperationPlan.Designer.cs rename to AIMS/OperationFront/frmOperationPlan.Designer.cs diff --git a/AIMS/OperationFront/UI/frmOperationPlan.cs b/AIMS/OperationFront/frmOperationPlan.cs similarity index 91% rename from AIMS/OperationFront/UI/frmOperationPlan.cs rename to AIMS/OperationFront/frmOperationPlan.cs index 177e57f..abbd389 100644 --- a/AIMS/OperationFront/UI/frmOperationPlan.cs +++ b/AIMS/OperationFront/frmOperationPlan.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -37,9 +39,9 @@ namespace AIMS.OperationFront.UI dtpBegInDate.Value = DateTime.Parse(dtpBegInDate.Value.ToString("yyyy-MM-dd")); dtpEndDate.Value = DateTime.Parse(dtpEndDate.Value.ToString("yyyy-MM-dd")).AddDays(4); - List list = new List(); - list = AIMS.PublicUI.BLL.Department.GetDepartmentAllList("诊疗部门"); - list.Insert(0, new AIMS.PublicUI.Model.Department + List list = new List(); + list = BDepartment.GetDepartmentAllList("诊疗部门"); + list.Insert(0, new Department { Id = -1, Name = "全部科室" @@ -55,9 +57,9 @@ namespace AIMS.OperationFront.UI dtpEndDate2.Value = DateTime.Parse(dtpEndDate2.Value.ToString("yyyy-MM-dd")).AddDays(4); - List list2 = new List(); - list2 = AIMS.PublicUI.BLL.Department.GetDepartmentAllList("诊疗部门"); - list2.Insert(0, new AIMS.PublicUI.Model.Department + List list2 = new List(); + list2 = BDepartment.GetDepartmentAllList("诊疗部门"); + list2.Insert(0, new Department { Id = -1, Name = "全部科室" @@ -88,7 +90,7 @@ namespace AIMS.OperationFront.UI { Department = ""; } - DataTable dt = BLL.OperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "OperationType <>'特急' and State IN ('已审核') and ApplyDepName LIKE '%" + Department + "%' AND MdrecNo LIKE '%" + txtMdrecNo.Text.Trim() + "%'", ""); dgv1.DataSource = Newdt; for (int i = 0; i < dgv1.Rows.Count; i++) @@ -180,7 +182,7 @@ namespace AIMS.OperationFront.UI { Department = ""; } - DataTable dt = BLL.OperationApply.GetOperationFrontDataTable(dtpBegInDate2.Value.ToString("yyyy-MM-dd"), dtpEndDate2.Value.ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate2.Value.ToString("yyyy-MM-dd"), dtpEndDate2.Value.ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "OperationType <>'特急' and State IN ('已排程') and ApplyDepName LIKE '%" + Department + "%' AND MdrecNo LIKE '%" + txtMdrecNo.Text.Trim() + "%'", ""); dgv2.DataSource = Newdt; for (int i = 0; i < dgv2.Rows.Count; i++) diff --git a/AIMS/OperationFront/UI/frmOperationPlan.resx b/AIMS/OperationFront/frmOperationPlan.resx similarity index 100% rename from AIMS/OperationFront/UI/frmOperationPlan.resx rename to AIMS/OperationFront/frmOperationPlan.resx diff --git a/AIMS/OperationFront/UI/frmOperationPlanDetail.Designer.cs b/AIMS/OperationFront/frmOperationPlanDetail.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmOperationPlanDetail.Designer.cs rename to AIMS/OperationFront/frmOperationPlanDetail.Designer.cs diff --git a/AIMS/OperationFront/UI/frmOperationPlanDetail.cs b/AIMS/OperationFront/frmOperationPlanDetail.cs similarity index 83% rename from AIMS/OperationFront/UI/frmOperationPlanDetail.cs rename to AIMS/OperationFront/frmOperationPlanDetail.cs index 67fd970..61bdd5f 100644 --- a/AIMS/OperationFront/UI/frmOperationPlanDetail.cs +++ b/AIMS/OperationFront/frmOperationPlanDetail.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -37,12 +39,12 @@ namespace AIMS.OperationFront.UI { cboOperationRoom.DisplayMember = "Name"; cboOperationRoom.ValueMember = "Id"; - cboOperationRoom.DataSource = DataDictionary.BLL.OperationRoom.GetDataTable("IsValid=1"); + cboOperationRoom.DataSource = BOperationRoom.GetDataTable("IsValid=1"); cboOperationRoom.SelectedIndex = -1; if (CheckBoxApplyIdList.Count > 0) { - DataTable dt = BLL.OperationApply.GetOperationFrontByApplyId(CheckBoxApplyIdList); + DataTable dt = BOperationApply.GetOperationFrontByApplyId(CheckBoxApplyIdList); for (int i = 0; i < dt.Rows.Count; i++) { dgv.Rows.Add(dt.Rows[i]["ApplyId"], @@ -66,44 +68,44 @@ namespace AIMS.OperationFront.UI if (CheckBoxApplyIdList.Count > 0) { int ApplyId = int.Parse(CheckBoxApplyIdList[0].ToString()); - Model.OperationApply OperationApplyObj = BLL.OperationApply.GetModel(ApplyId); - dtpPlanOperationTime.Value = OperationApplyObj.PlanOperationTime; + OperationApply OperationApplyObj = BOperationApply.GetModel(ApplyId); + dtpPlanOperationTime.Value = OperationApplyObj.PlanOperationTime.Value; cboOperationRoom.SelectedValue = int.Parse(OperationApplyObj.OperationRoomId.ToString()); - SelectAnesthesiaDoctorData = BLL.ApplyPersonDuty.GetPersonIdList(ApplyId, 5); + SelectAnesthesiaDoctorData = BApplyPersonDuty.GetPersonIdList(ApplyId, 5); foreach (int RowId in SelectAnesthesiaDoctorData) { - txtAnesthesiaDoctor.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctor.Text += BPerson.GetModel(RowId).Name + " ,"; } if (SelectAnesthesiaDoctorData.Count > 0) { txtAnesthesiaDoctor.Text = txtAnesthesiaDoctor.Text.Substring(0, txtAnesthesiaDoctor.Text.LastIndexOf(" ,")); } - SelectInstrumentNurseData = BLL.ApplyPersonDuty.GetPersonIdList(ApplyId, 6); + SelectInstrumentNurseData = BApplyPersonDuty.GetPersonIdList(ApplyId, 6); foreach (int RowId in SelectInstrumentNurseData) { - txtInstrumentNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurse.Text += BPerson.GetModel(RowId).Name + " ,"; } if (SelectInstrumentNurseData.Count > 0) { txtInstrumentNurse.Text = txtInstrumentNurse.Text.Substring(0, txtInstrumentNurse.Text.LastIndexOf(" ,")); } - SelectTourNurseData = BLL.ApplyPersonDuty.GetPersonIdList(ApplyId, 7); + SelectTourNurseData = BApplyPersonDuty.GetPersonIdList(ApplyId, 7); foreach (int RowId in SelectTourNurseData) { - txtTourNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurse.Text += BPerson.GetModel(RowId).Name + " ,"; } if (SelectTourNurseData.Count > 0) { txtTourNurse.Text = txtTourNurse.Text.Substring(0, txtTourNurse.Text.LastIndexOf(" ,")); } - SelectAnesthesiaDoctorSucceedData = BLL.ApplyPersonDuty.GetPersonIdList(ApplyId, 8); + SelectAnesthesiaDoctorSucceedData = BApplyPersonDuty.GetPersonIdList(ApplyId, 8); foreach (int RowId in SelectAnesthesiaDoctorSucceedData) { - txtAnesthesiaDoctorSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctorSucceed.Text += BPerson.GetModel(RowId).Name + " ,"; } if (SelectAnesthesiaDoctorSucceedData.Count > 0) { @@ -111,10 +113,10 @@ namespace AIMS.OperationFront.UI } - SelectInstrumentNurseSucceedData = BLL.ApplyPersonDuty.GetPersonIdList(ApplyId, 9); + SelectInstrumentNurseSucceedData = BApplyPersonDuty.GetPersonIdList(ApplyId, 9); foreach (int RowId in SelectInstrumentNurseSucceedData) { - txtInstrumentNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurseSucceed.Text += BPerson.GetModel(RowId).Name + " ,"; } if (SelectInstrumentNurseSucceedData.Count > 0) { @@ -122,10 +124,10 @@ namespace AIMS.OperationFront.UI } - SelectTourNurseSucceedData = BLL.ApplyPersonDuty.GetPersonIdList(ApplyId, 10); + SelectTourNurseSucceedData = BApplyPersonDuty.GetPersonIdList(ApplyId, 10); foreach (int RowId in SelectTourNurseSucceedData) { - txtTourNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurseSucceed.Text += BPerson.GetModel(RowId).Name + " ,"; } if (SelectTourNurseSucceedData.Count > 0) { @@ -154,11 +156,11 @@ namespace AIMS.OperationFront.UI if (State == AIMSExtension.EditState.ADD) { - BLL.OperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, 3); //状态3 预排程 + BOperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, 3); //状态3 预排程 } if (State == AIMSExtension.EditState.EDIT) { - BLL.OperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, 4); //状态4 已排程 + BOperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, 4); //状态4 已排程 } SaveSelectItem(ApplyId, AIMSExtension.PublicMethod.SystemDate()); @@ -176,8 +178,8 @@ namespace AIMS.OperationFront.UI private void SaveSelectItem(int OperationApplyId, DateTime OperateDate) { - Model.ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 5); + ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 5); foreach (int PersonId in SelectAnesthesiaDoctorData) { ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = OperationApplyId; @@ -186,11 +188,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyAnesthesiaDoctor.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAnesthesiaDoctor.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAnesthesiaDoctor.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); + BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); } - Model.ApplyPersonDuty ApplyPersonDutyInstrumentNurse = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 6); + ApplyPersonDuty ApplyPersonDutyInstrumentNurse = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 6); foreach (int PersonId in SelectInstrumentNurseData) { ApplyPersonDutyInstrumentNurse.OperationApplyId = OperationApplyId; @@ -199,11 +201,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyInstrumentNurse.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyInstrumentNurse.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyInstrumentNurse.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurse); + BApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurse); } - Model.ApplyPersonDuty ApplyPersonDutyTourNurse = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 7); + ApplyPersonDuty ApplyPersonDutyTourNurse = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 7); foreach (int PersonId in SelectTourNurseData) { ApplyPersonDutyTourNurse.OperationApplyId = OperationApplyId; @@ -212,11 +214,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyTourNurse.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyTourNurse.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyTourNurse.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyTourNurse); + BApplyPersonDuty.Add(ApplyPersonDutyTourNurse); } - Model.ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctorSucceed = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 8); + ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctorSucceed = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 8); foreach (int PersonId in SelectAnesthesiaDoctorSucceedData) { ApplyPersonDutyAnesthesiaDoctorSucceed.OperationApplyId = OperationApplyId; @@ -225,11 +227,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyAnesthesiaDoctorSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAnesthesiaDoctorSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAnesthesiaDoctorSucceed.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctorSucceed); + BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctorSucceed); } - Model.ApplyPersonDuty ApplyPersonDutyInstrumentNurseSucceed = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 9); + ApplyPersonDuty ApplyPersonDutyInstrumentNurseSucceed = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 9); foreach (int PersonId in SelectInstrumentNurseSucceedData) { ApplyPersonDutyInstrumentNurseSucceed.OperationApplyId = OperationApplyId; @@ -238,11 +240,11 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyInstrumentNurseSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyInstrumentNurseSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyInstrumentNurseSucceed.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurseSucceed); + BApplyPersonDuty.Add(ApplyPersonDutyInstrumentNurseSucceed); } - Model.ApplyPersonDuty ApplyPersonDutyTourNurseSucceed = new Model.ApplyPersonDuty(); - BLL.ApplyPersonDuty.Delete(OperationApplyId, 10); + ApplyPersonDuty ApplyPersonDutyTourNurseSucceed = new ApplyPersonDuty(); + BApplyPersonDuty.Delete(OperationApplyId, 10); foreach (int PersonId in SelectTourNurseSucceedData) { ApplyPersonDutyTourNurseSucceed.OperationApplyId = OperationApplyId; @@ -251,7 +253,7 @@ namespace AIMS.OperationFront.UI ApplyPersonDutyTourNurseSucceed.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyTourNurseSucceed.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyTourNurseSucceed.OperateDate = OperateDate; - BLL.ApplyPersonDuty.Add(ApplyPersonDutyTourNurseSucceed); + BApplyPersonDuty.Add(ApplyPersonDutyTourNurseSucceed); } } @@ -300,7 +302,7 @@ namespace AIMS.OperationFront.UI SelectAnesthesiaDoctorData = frmAnesthesiaDoctor.SelectPersonData; foreach (int RowId in frmAnesthesiaDoctor.SelectPersonData) { - txtAnesthesiaDoctor.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctor.Text += BPerson.GetModel(RowId).Name + " ,"; } txtAnesthesiaDoctor.Text = txtAnesthesiaDoctor.Text.Substring(0, txtAnesthesiaDoctor.Text.LastIndexOf(" ,")); } @@ -324,7 +326,7 @@ namespace AIMS.OperationFront.UI SelectAnesthesiaDoctorSucceedData = frmAnesthesiaDoctorSucceed.SelectPersonData; foreach (int RowId in frmAnesthesiaDoctorSucceed.SelectPersonData) { - txtAnesthesiaDoctorSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtAnesthesiaDoctorSucceed.Text += BPerson.GetModel(RowId).Name + " ,"; } txtAnesthesiaDoctorSucceed.Text = txtAnesthesiaDoctorSucceed.Text.Substring(0, txtAnesthesiaDoctorSucceed.Text.LastIndexOf(" ,")); } @@ -349,7 +351,7 @@ namespace AIMS.OperationFront.UI SelectInstrumentNurseData = frmInstrumentNurse.SelectPersonData ; foreach (int RowId in frmInstrumentNurse.SelectPersonData) { - txtInstrumentNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurse.Text += BPerson.GetModel(RowId).Name + " ,"; } txtInstrumentNurse.Text = txtInstrumentNurse.Text.Substring(0, txtInstrumentNurse.Text.LastIndexOf(" ,")); } @@ -373,7 +375,7 @@ namespace AIMS.OperationFront.UI SelectInstrumentNurseSucceedData = frmInstrumentNurseSucceed.SelectPersonData; foreach (int RowId in frmInstrumentNurseSucceed.SelectPersonData) { - txtInstrumentNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtInstrumentNurseSucceed.Text += BPerson.GetModel(RowId).Name + " ,"; } txtInstrumentNurseSucceed.Text = txtInstrumentNurseSucceed.Text.Substring(0, txtInstrumentNurseSucceed.Text.LastIndexOf(" ,")); } @@ -397,7 +399,7 @@ namespace AIMS.OperationFront.UI SelectTourNurseData = frmTourNurse.SelectPersonData; foreach (int RowId in frmTourNurse.SelectPersonData) { - txtTourNurse.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurse.Text += BPerson.GetModel(RowId).Name + " ,"; } txtTourNurse.Text = txtTourNurse.Text.Substring(0, txtTourNurse.Text.LastIndexOf(" ,")); } @@ -421,7 +423,7 @@ namespace AIMS.OperationFront.UI SelectTourNurseSucceedData = frmTourNurseSucceed.SelectPersonData; foreach (int RowId in frmTourNurseSucceed.SelectPersonData) { - txtTourNurseSucceed.Text += AIMS.PublicUI.BLL.Person.GetModel(RowId).Name + " ,"; + txtTourNurseSucceed.Text += BPerson.GetModel(RowId).Name + " ,"; } txtTourNurseSucceed.Text = txtTourNurseSucceed.Text.Substring(0, txtTourNurseSucceed.Text.LastIndexOf(" ,")); } diff --git a/AIMS/OperationFront/UI/frmOperationPlanDetail.resx b/AIMS/OperationFront/frmOperationPlanDetail.resx similarity index 100% rename from AIMS/OperationFront/UI/frmOperationPlanDetail.resx rename to AIMS/OperationFront/frmOperationPlanDetail.resx diff --git a/AIMS/OperationFront/UI/frmOperationSchedulePlan.cs b/AIMS/OperationFront/frmOperationSchedulePlan.cs similarity index 98% rename from AIMS/OperationFront/UI/frmOperationSchedulePlan.cs rename to AIMS/OperationFront/frmOperationSchedulePlan.cs index 3ac8ce0..fba9a7f 100644 --- a/AIMS/OperationFront/UI/frmOperationSchedulePlan.cs +++ b/AIMS/OperationFront/frmOperationSchedulePlan.cs @@ -3787,7 +3787,7 @@ namespace AIMS.OperationFront.UI public void LoadOperationInfo(int UpdateRoom) { - NowPatientDataTable = BLL.OperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); + NowPatientDataTable = BOperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); foreach (ucPlanOperationRoomCard item in ucOpeRooms) { if (item.operationRoom.Id.Value != UpdateRoom) continue; @@ -3799,7 +3799,7 @@ namespace AIMS.OperationFront.UI } public void LoadOperationInfoDgv(int UpdateRoom) { - NowPatientDataTable = BLL.OperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); + NowPatientDataTable = BOperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); foreach (ucPlanOperationRoomCard item in ucOpeRooms) { if (item.operationRoom.Id.Value != UpdateRoom) continue; @@ -3817,7 +3817,7 @@ namespace AIMS.OperationFront.UI /// public void LoadSelectDate(string selname) { - NowPatientDataTable = BLL.OperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); + NowPatientDataTable = BOperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); DataTable Newdt = new DataTable(); if (selname == "") Newdt = AIMSExtension.PublicMethod.GetNewDataTable(NowPatientDataTable, "State IN ('') ", ""); @@ -3945,7 +3945,7 @@ namespace AIMS.OperationFront.UI } opeapply.OperationRoomId = room; opeapply.PlanOperationTime = dtpSearchTime.Value; - opeapply.PlanOrder = BLL.OperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1; + opeapply.PlanOrder = BOperationApply.GetMaxPlanOrder(opeapply.PlanOperationTime.Value, opeapply.OperationRoomId.Value) + 1; return BOperationApply.Update(opeapply); } /// @@ -3960,41 +3960,41 @@ namespace AIMS.OperationFront.UI if (_workerType == workerType.AnesthesiaDoctor) { //BLL.ApplyPersonDuty.Delete(applyId, 5); - Model.ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new Model.ApplyPersonDuty(); + ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty(); ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = applyId; ApplyPersonDutyAnesthesiaDoctor.PersonDutyId = 5; // ҽ ApplyPersonDutyAnesthesiaDoctor.PersonId = int.Parse(dnIDs); ApplyPersonDutyAnesthesiaDoctor.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAnesthesiaDoctor.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAnesthesiaDoctor.OperateDate = DateTime.Now; - res += BLL.ApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); + res += BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); } else { if (_workerType == workerType.InstrumentNurse) { //BLL.ApplyPersonDuty.Delete(applyId, 6); - Model.ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new Model.ApplyPersonDuty(); + ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty(); ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = applyId; ApplyPersonDutyAnesthesiaDoctor.PersonDutyId = 6; ApplyPersonDutyAnesthesiaDoctor.PersonId = int.Parse(dnIDs); ApplyPersonDutyAnesthesiaDoctor.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAnesthesiaDoctor.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAnesthesiaDoctor.OperateDate = DateTime.Now; - res += BLL.ApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); + res += BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); } if (_workerType == workerType.TourNurse) { //BLL.ApplyPersonDuty.Delete(applyId, 7); - Model.ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new Model.ApplyPersonDuty(); + ApplyPersonDuty ApplyPersonDutyAnesthesiaDoctor = new ApplyPersonDuty(); ApplyPersonDutyAnesthesiaDoctor.OperationApplyId = applyId; ApplyPersonDutyAnesthesiaDoctor.PersonDutyId = 7; ApplyPersonDutyAnesthesiaDoctor.PersonId = int.Parse(dnIDs); ApplyPersonDutyAnesthesiaDoctor.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; ApplyPersonDutyAnesthesiaDoctor.OperatorName = AIMSExtension.PublicMethod.OperatorName; ApplyPersonDutyAnesthesiaDoctor.OperateDate = DateTime.Now; - res += BLL.ApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); + res += BApplyPersonDuty.Add(ApplyPersonDutyAnesthesiaDoctor); } } return res; @@ -4048,7 +4048,7 @@ namespace AIMS.OperationFront.UI { try { - BLL.OperationApply.UpdateApplyState(int.Parse(selApply), 10); + BOperationApply.UpdateApplyState(int.Parse(selApply), 10); outMsg = string.Format("{2} ֹͣ :{0} :{1} ɹ", grCurrentSub.Cells["Patient"].Value, grCurrentSub.Cells["OperationName"].Value, RoomCardManage.lastSelectOpeRoom.operationRoom.Name); RoomCardManage.WriteMsg(rtbLog, outMsg); @@ -4071,7 +4071,7 @@ namespace AIMS.OperationFront.UI try { OperationRoom opeRoom = (sender as ToolStripItem).Tag as OperationRoom; - BLL.OperationApply.UpdateApplyRoom(int.Parse(selApply), opeRoom.Id.Value); + BOperationApply.UpdateApplyRoom(int.Parse(selApply), opeRoom.Id.Value); outMsg = string.Format("{2} :{0} {1} ɹ", grCurrentSub.Cells["Patient"].Value, opeRoom, RoomCardManage.lastSelectOpeRoom.operationRoom.Name); RoomCardManage.WriteMsg(rtbLog, outMsg); LoadOperationInfo(RoomCardManage.lastSelectOpeRoom.operationRoom.Id.Value); @@ -4087,7 +4087,7 @@ namespace AIMS.OperationFront.UI private void ȡųͨToolStripMenuItem_Click(object sender, EventArgs e) { - DataTable dt = BLL.OperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd"), dtpSearchTime.Value.AddDays(1).ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd"), dtpSearchTime.Value.AddDays(1).ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "OperationType <>'ؼ' and State IN ('Ԥų','ų')", ""); if (Newdt.Rows.Count > 0) { @@ -4095,7 +4095,7 @@ namespace AIMS.OperationFront.UI { int ApplyId = int.Parse(Newdt.Rows[i]["ApplyId"].ToString()); - BLL.OperationApply.UpdateApplyState(ApplyId, 3); + BOperationApply.UpdateApplyState(ApplyId, 3); } MessageBox.Show("ȡͨɹ", "ϵͳʾ"); @@ -4106,7 +4106,7 @@ namespace AIMS.OperationFront.UI private void btnPlan_Click(object sender, EventArgs e) { - NowPatientDataTable = BLL.OperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); + NowPatientDataTable = BOperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(NowPatientDataTable, " State <> '˻' ", ""); if (Newdt == null || Newdt.Rows.Count <= 0) return; frmSelectiveOperationsPrint frm = new frmSelectiveOperationsPrint(); @@ -4118,7 +4118,7 @@ namespace AIMS.OperationFront.UI private void button3_Click(object sender, EventArgs e) { - NowPatientDataTable = BLL.OperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); + NowPatientDataTable = BOperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd 00:00:00"), dtpSearchTime.Value.ToString("yyyy-MM-dd 23:59:59")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(NowPatientDataTable, " State <> '˻' ", ""); if (Newdt == null || Newdt.Rows.Count <= 0) return; frmPrintingArrangemen frm = new frmPrintingArrangemen(); @@ -4267,12 +4267,12 @@ namespace AIMS.OperationFront.UI } if (_workerType == workerType.AnesthesiaDoctor) { - SchedulingTable = AIMS.PublicUI.BLL.Person.GetSchedulingForSelect(dtpSearchTime.Value, "ҽ");//MZKDept[0].Id.Value + SchedulingTable = BPerson.GetSchedulingForSelect(dtpSearchTime.Value, "ҽ");//MZKDept[0].Id.Value RoomCardManage.SelectDgv.DataSource = SchedulingTable; } else { - SchedulingTable = AIMS.PublicUI.BLL.Person.GetSchedulingForSelect(dtpSearchTime.Value, "ʿ");//SSSDept[0].Id.Value + SchedulingTable = BPerson.GetSchedulingForSelect(dtpSearchTime.Value, "ʿ");//SSSDept[0].Id.Value RoomCardManage.SelectDgv.DataSource = SchedulingTable; } } @@ -4435,8 +4435,8 @@ namespace AIMS.OperationFront.UI if (SelGridRow == null) return; - BLL.OperationApply.UpdatePlanOrder(Convert.ToInt32(SelGridRow.Cells[0].Value), Convert.ToInt32(stepGridRow.Cells[1].Value)); - BLL.OperationApply.UpdatePlanOrder(Convert.ToInt32(stepGridRow.Cells[0].Value), Convert.ToInt32(SelGridRow.Cells[1].Value)); + BOperationApply.UpdatePlanOrder(Convert.ToInt32(SelGridRow.Cells[0].Value), Convert.ToInt32(stepGridRow.Cells[1].Value)); + BOperationApply.UpdatePlanOrder(Convert.ToInt32(stepGridRow.Cells[0].Value), Convert.ToInt32(SelGridRow.Cells[1].Value)); //int tempIndex = Convert.ToInt32(SelGridRow.Cells[1].Value); //SelGridRow.Cells[1].Value = stepGridRow.Cells[1].Value; @@ -4546,7 +4546,7 @@ namespace AIMS.OperationFront.UI private void button1_Click(object sender, EventArgs e) { - DataTable dt = BLL.OperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd"), dtpSearchTime.Value.AddDays(1).ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpSearchTime.Value.ToString("yyyy-MM-dd"), dtpSearchTime.Value.AddDays(1).ToString("yyyy-MM-dd")); DataTable Newdt = AIMSExtension.PublicMethod.GetNewDataTable(dt, "OperationType <>'ؼ' and State IN ('Ԥų')", ""); if (Newdt.Rows.Count > 0) { @@ -4554,7 +4554,7 @@ namespace AIMS.OperationFront.UI { int ApplyId = int.Parse(Newdt.Rows[i]["ApplyId"].ToString()); - BLL.OperationApply.UpdateApplyState(ApplyId, 4); + BOperationApply.UpdateApplyState(ApplyId, 4); } LoadSelectDate(""); LoadOperationInfo(); diff --git a/AIMS/OperationFront/UI/frmOperationSchedulePlan.resx b/AIMS/OperationFront/frmOperationSchedulePlan.resx similarity index 100% rename from AIMS/OperationFront/UI/frmOperationSchedulePlan.resx rename to AIMS/OperationFront/frmOperationSchedulePlan.resx diff --git a/AIMS/OperationFront/UI/frmPlanOrder.Designer.cs b/AIMS/OperationFront/frmPlanOrder.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmPlanOrder.Designer.cs rename to AIMS/OperationFront/frmPlanOrder.Designer.cs diff --git a/AIMS/OperationFront/UI/frmPlanOrder.cs b/AIMS/OperationFront/frmPlanOrder.cs similarity index 93% rename from AIMS/OperationFront/UI/frmPlanOrder.cs rename to AIMS/OperationFront/frmPlanOrder.cs index 74003ca..695fa91 100644 --- a/AIMS/OperationFront/UI/frmPlanOrder.cs +++ b/AIMS/OperationFront/frmPlanOrder.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -25,7 +26,7 @@ namespace AIMS.OperationFront.UI int y = (System.Windows.Forms.SystemInformation.WorkingArea.Height - this.Size.Height) / 2 - 60; this.StartPosition = FormStartPosition.Manual; this.Location = (Point)new Size(x, y); - dgv.DataSource = AIMS.OperationFront.BLL.OperationApply.GetOperationRoomDataTable(Time, RoomId); + dgv.DataSource = BOperationApply.GetOperationRoomDataTable(Time, RoomId); } private void btnUp_Click(object sender, EventArgs e) @@ -76,7 +77,7 @@ namespace AIMS.OperationFront.UI { int ApplyId = int.Parse(dgv.Rows[i].Cells["ApplyId"].Value.ToString()); - BLL.OperationApply.UpdatePlanOrder(ApplyId, i + 1); + BOperationApply.UpdatePlanOrder(ApplyId, i + 1); } Close(); } diff --git a/AIMS/OperationFront/UI/frmPlanOrder.resx b/AIMS/OperationFront/frmPlanOrder.resx similarity index 100% rename from AIMS/OperationFront/UI/frmPlanOrder.resx rename to AIMS/OperationFront/frmPlanOrder.resx diff --git a/AIMS/OperationFront/UI/frmPlanPatientInfo.Designer.cs b/AIMS/OperationFront/frmPlanPatientInfo.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmPlanPatientInfo.Designer.cs rename to AIMS/OperationFront/frmPlanPatientInfo.Designer.cs diff --git a/AIMS/OperationFront/UI/frmPlanPatientInfo.cs b/AIMS/OperationFront/frmPlanPatientInfo.cs similarity index 86% rename from AIMS/OperationFront/UI/frmPlanPatientInfo.cs rename to AIMS/OperationFront/frmPlanPatientInfo.cs index f444d57..9f9daa4 100644 --- a/AIMS/OperationFront/UI/frmPlanPatientInfo.cs +++ b/AIMS/OperationFront/frmPlanPatientInfo.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; +using AIMSBLL; +using System; using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace AIMS.OperationFront.UI @@ -26,7 +22,7 @@ namespace AIMS.OperationFront.UI this.StartPosition = FormStartPosition.Manual; this.Location = (Point)new Size(x, y); - dgv.DataSource = AIMS.OperationFront.BLL.OperationApply.GetOperationRoomDataTable(Time, RoomId); + dgv.DataSource = BOperationApply.GetOperationRoomDataTable(Time, RoomId); for (int i = 0; i < dgv.Rows.Count; i++) { diff --git a/AIMS/OperationFront/UI/frmPlanPatientInfo.resx b/AIMS/OperationFront/frmPlanPatientInfo.resx similarity index 100% rename from AIMS/OperationFront/UI/frmPlanPatientInfo.resx rename to AIMS/OperationFront/frmPlanPatientInfo.resx diff --git a/AIMS/OperationFront/UI/frmPrintingArrangemen.cs b/AIMS/OperationFront/frmPrintingArrangemen.cs similarity index 93% rename from AIMS/OperationFront/UI/frmPrintingArrangemen.cs rename to AIMS/OperationFront/frmPrintingArrangemen.cs index ff07268..acaccb5 100644 --- a/AIMS/OperationFront/UI/frmPrintingArrangemen.cs +++ b/AIMS/OperationFront/frmPrintingArrangemen.cs @@ -1,4 +1,6 @@ using AIMS.OremrUserControl; +using AIMSBLL; +using AIMSModel; using System; using System.Collections.Generic; using System.ComponentModel; @@ -48,11 +50,11 @@ namespace AIMS.OperationFront.UI { if (cboOperationRoom.SelectedIndex > 0) { - dt = BLL.OperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' and OperationRoom = '" + cboOperationRoom.Text + "' Order By OperationRoomID ,PlanOrder"); + dt = BOperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' and OperationRoom = '" + cboOperationRoom.Text + "' Order By OperationRoomID ,PlanOrder"); } else if (cboOperationRoom.SelectedIndex <= 0) { - dt = BLL.OperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' Order By OperationRoomID ,PlanOrder"); + dt = BOperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' Order By OperationRoomID ,PlanOrder"); } if (dt == null) return; FullDgv(dt); @@ -186,7 +188,7 @@ namespace AIMS.OperationFront.UI string Ids = string.Join(",", SelectIds); dt = null; flowLayoutPanel1.Controls.Clear(); - dt = BLL.OperationApply.SelectPlanedOpeByRoom(" [ApplyId] in (" + Ids + ") "); + dt = BOperationApply.SelectPlanedOpeByRoom(" [ApplyId] in (" + Ids + ") "); ReportData(); } else @@ -246,8 +248,8 @@ namespace AIMS.OperationFront.UI /// private void Initial() { - List rooms = DataDictionary.BLL.OperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); - rooms.Insert(0, new DataDictionary.Model.OperationRoom() { Id = -1, Name = "" }); + List rooms = BOperationRoom.GetOperationRooms("IsValid=1 and Site='手术室'"); + rooms.Insert(0, new OperationRoom() { Id = -1, Name = "" }); cboOperationRoom.DataSource = rooms; cboOperationRoom.DisplayMember = "Name"; cboOperationRoom.ValueMember = "Id"; @@ -317,7 +319,7 @@ namespace AIMS.OperationFront.UI string Ids = string.Join(",", SelectIds); dt = null; flowLayoutPanel1.Controls.Clear(); - dt = BLL.OperationApply.SelectPlanedOpeByRoom(" [OperationApplyId] in (" + Ids + ") Order By OperationRoom.OrderBy,TableIndex"); + dt = BOperationApply.SelectPlanedOpeByRoom(" [OperationApplyId] in (" + Ids + ") Order By OperationRoom.OrderBy,TableIndex"); ReportData(); } } diff --git a/AIMS/OperationFront/UI/frmPrintingArrangemen.designer.cs b/AIMS/OperationFront/frmPrintingArrangemen.designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmPrintingArrangemen.designer.cs rename to AIMS/OperationFront/frmPrintingArrangemen.designer.cs diff --git a/AIMS/OperationFront/UI/frmPrintingArrangemen.resx b/AIMS/OperationFront/frmPrintingArrangemen.resx similarity index 100% rename from AIMS/OperationFront/UI/frmPrintingArrangemen.resx rename to AIMS/OperationFront/frmPrintingArrangemen.resx diff --git a/AIMS/OperationFront/UI/frmSchedulePlan.cs b/AIMS/OperationFront/frmSchedulePlan.cs similarity index 100% rename from AIMS/OperationFront/UI/frmSchedulePlan.cs rename to AIMS/OperationFront/frmSchedulePlan.cs diff --git a/AIMS/OperationFront/UI/frmSchedulePlan.designer.cs b/AIMS/OperationFront/frmSchedulePlan.designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmSchedulePlan.designer.cs rename to AIMS/OperationFront/frmSchedulePlan.designer.cs diff --git a/AIMS/OperationFront/UI/frmSchedulePlan.resx b/AIMS/OperationFront/frmSchedulePlan.resx similarity index 100% rename from AIMS/OperationFront/UI/frmSchedulePlan.resx rename to AIMS/OperationFront/frmSchedulePlan.resx diff --git a/AIMS/OperationFront/UI/frmSchedulePlan2.cs b/AIMS/OperationFront/frmSchedulePlan2.cs similarity index 100% rename from AIMS/OperationFront/UI/frmSchedulePlan2.cs rename to AIMS/OperationFront/frmSchedulePlan2.cs diff --git a/AIMS/OperationFront/UI/frmSchedulePlan2.designer.cs b/AIMS/OperationFront/frmSchedulePlan2.designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmSchedulePlan2.designer.cs rename to AIMS/OperationFront/frmSchedulePlan2.designer.cs diff --git a/AIMS/OperationFront/UI/frmSchedulePlan2.resx b/AIMS/OperationFront/frmSchedulePlan2.resx similarity index 100% rename from AIMS/OperationFront/UI/frmSchedulePlan2.resx rename to AIMS/OperationFront/frmSchedulePlan2.resx diff --git a/AIMS/OperationFront/UI/frmSelectiveOperationsPrint.cs b/AIMS/OperationFront/frmSelectiveOperationsPrint.cs similarity index 93% rename from AIMS/OperationFront/UI/frmSelectiveOperationsPrint.cs rename to AIMS/OperationFront/frmSelectiveOperationsPrint.cs index 8e259b9..91b4eaa 100644 --- a/AIMS/OperationFront/UI/frmSelectiveOperationsPrint.cs +++ b/AIMS/OperationFront/frmSelectiveOperationsPrint.cs @@ -8,6 +8,7 @@ using System.Text; using System.Windows.Forms; using Microsoft.Reporting.WinForms; using System.IO; +using AIMSBLL; namespace AIMS.OperationFront.UI { @@ -132,11 +133,11 @@ namespace AIMS.OperationFront.UI { if (cboOperationRoom.SelectedIndex > 0) { - dt = BLL.OperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' and OperationRoom = '" + cboOperationRoom.Text + "' Order By OperationRoomID ,PlanOrder"); + dt = BOperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' and OperationRoom = '" + cboOperationRoom.Text + "' Order By OperationRoomID ,PlanOrder"); } else if (cboOperationRoom.SelectedIndex <= 0) { - dt = BLL.OperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' Order By OperationRoomID ,PlanOrder"); + dt = BOperationApply.SelectPlanedOpeByRoom("OrderOperationTime>='" + dtpTime.Value.ToString("yyyy-MM-dd 00:00:00") + "' and OrderOperationTime<='" + dtpTime.Value.ToString("yyyy-MM-dd 23:59:59") + "' Order By OperationRoomID ,PlanOrder"); } if (dt == null) return; FullDgv(dt); diff --git a/AIMS/OperationFront/UI/frmSelectiveOperationsPrint.designer.cs b/AIMS/OperationFront/frmSelectiveOperationsPrint.designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmSelectiveOperationsPrint.designer.cs rename to AIMS/OperationFront/frmSelectiveOperationsPrint.designer.cs diff --git a/AIMS/OperationFront/UI/frmSelectiveOperationsPrint.resx b/AIMS/OperationFront/frmSelectiveOperationsPrint.resx similarity index 100% rename from AIMS/OperationFront/UI/frmSelectiveOperationsPrint.resx rename to AIMS/OperationFront/frmSelectiveOperationsPrint.resx diff --git a/AIMS/OperationFront/UI/frmStopOperation.Designer.cs b/AIMS/OperationFront/frmStopOperation.Designer.cs similarity index 100% rename from AIMS/OperationFront/UI/frmStopOperation.Designer.cs rename to AIMS/OperationFront/frmStopOperation.Designer.cs diff --git a/AIMS/OperationFront/UI/frmStopOperation.cs b/AIMS/OperationFront/frmStopOperation.cs similarity index 90% rename from AIMS/OperationFront/UI/frmStopOperation.cs rename to AIMS/OperationFront/frmStopOperation.cs index d0f5a79..e1bcc91 100644 --- a/AIMS/OperationFront/UI/frmStopOperation.cs +++ b/AIMS/OperationFront/frmStopOperation.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -36,7 +37,7 @@ namespace AIMS.OperationFront.UI { for (int i = 0; i < ApplyIdList.Count; i++) { - BLL.OperationApply.UpdateStopOperation(ApplyIdList[i], txtContent.Text.Trim()); + BOperationApply.UpdateStopOperation(ApplyIdList[i], txtContent.Text.Trim()); } MessageBox.Show("退回成功!"); Close(); diff --git a/AIMS/OperationFront/UI/frmStopOperation.resx b/AIMS/OperationFront/frmStopOperation.resx similarity index 100% rename from AIMS/OperationFront/UI/frmStopOperation.resx rename to AIMS/OperationFront/frmStopOperation.resx diff --git a/AIMS/OremrUserControl/PrescriptionDocument.cs b/AIMS/OremrUserControl/PrescriptionDocument.cs index d7c0b9c..2a1c5d7 100644 --- a/AIMS/OremrUserControl/PrescriptionDocument.cs +++ b/AIMS/OremrUserControl/PrescriptionDocument.cs @@ -1,17 +1,9 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Drawing.Printing; -using Newtonsoft.Json; -using System.IO; +using AIMSModel; using DrawGraph; -using AIMS.PublicUI.BLL; -using AIMSModel; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; namespace AIMS.OperationDoing.AnasRecordBill { diff --git a/AIMS/OremrUserControl/ucDocument.cs b/AIMS/OremrUserControl/ucDocument.cs index 3be612c..b91efed 100644 --- a/AIMS/OremrUserControl/ucDocument.cs +++ b/AIMS/OremrUserControl/ucDocument.cs @@ -1,19 +1,14 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; +using AIMS.DocManager; +using AIMSBLL; +using DCSoft.Writer; +using DCSoft.Writer.Data; +using DCSoft.Writer.Dom; +using DocumentManagement; +using System; using System.Data; using System.Linq; -using System.Text; -using System.Windows.Forms; -using DCSoft.Writer; -using DocumentManagement; -using DCSoft.Writer.Data; -using DCSoft.Writer.Security; -using AIMS.DocManager; -using DCSoft.Writer.Dom; using System.Reflection; -using DevComponents.DotNetBar; +using System.Windows.Forms; using System.Xml; namespace AIMS.OremrUserControl @@ -298,7 +293,7 @@ namespace AIMS.OremrUserControl var hf = myEditControl.Document.Fields.ToArray().Where(x => x is XTextInputFieldElement && (x as XTextInputFieldElement).ToolTip == "心功能分级").FirstOrDefault(); string strH = hf == null ? "" : hf.Text; - AIMS.OperationFront.BLL.OperationApply.UpdateASA(Patient.ApplyId, strASA, strH); + BOperationApply.UpdateASA(Patient.ApplyId, strASA, strH); } } catch diff --git a/AIMS/OremrUserControl/ucPatientRecoverCard.cs b/AIMS/OremrUserControl/ucPatientRecoverCard.cs index df7b3fa..7b07478 100644 --- a/AIMS/OremrUserControl/ucPatientRecoverCard.cs +++ b/AIMS/OremrUserControl/ucPatientRecoverCard.cs @@ -51,7 +51,7 @@ namespace AIMS.OremrUserControl lblSys.Text = "--"; lblT.Text = "--"; } - public ucPatientRecoverCard(DataDictionary.Model.OperationRoom room) + public ucPatientRecoverCard(OperationRoom room) { InitializeComponent(); this.Tag = room.Id; diff --git a/AIMS/PublicUI/MainFormManage.cs b/AIMS/PublicUI/MainFormManage.cs index 10d9d27..1bf2fda 100644 --- a/AIMS/PublicUI/MainFormManage.cs +++ b/AIMS/PublicUI/MainFormManage.cs @@ -1,17 +1,8 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; -using DevComponents.DotNetBar.Metro; -using DevComponents.DotNetBar; -using System.Diagnostics; -using DevComponents.AdvTree; -using DevComponents.DotNetBar.Metro.ColorTables; using System.Reflection; -using System.Linq; +using System.Windows.Forms; namespace AIMS { @@ -24,11 +15,11 @@ namespace AIMS private void MainFormNew_Load(object sender, EventArgs e) { - List menuListP = new List(); - menuListP = AIMS.PublicUI.BLL.Menu.GetMenuRootListManage(AIMSExtension.PublicMethod.RoleId, "1,3,4"); + List menuListP = new List(); + menuListP = BMenu.GetMenuRootListManage(AIMSExtension.PublicMethod.RoleId, "1,3,4"); for (int i = 0; i < menuListP.Count; i++) { - AIMS.PublicUI.Model.Menu menuSec = menuListP[i]; + AIMSModel.Menu menuSec = menuListP[i]; DevComponents.DotNetBar.Controls.SideNavPanel sideNavPanel = new DevComponents.DotNetBar.Controls.SideNavPanel(); sideNavPanel.AutoScroll = true; sideNavPanel.Dock = System.Windows.Forms.DockStyle.Fill; @@ -53,7 +44,7 @@ namespace AIMS { DevComponents.DotNetBar.Controls.SideNavItem sideNavItem = sideNav1.SelectedItem; if (sideNavItem.Tag == null) return; - AIMS.PublicUI.Model.Menu menu = sideNavItem.Tag as AIMS.PublicUI.Model.Menu; + AIMSModel.Menu menu = sideNavItem.Tag as AIMSModel.Menu; string path = menu.Path; if (path.Length > 0) { diff --git a/AIMS/PublicUI/frmAnaesthesiaMethod.cs b/AIMS/PublicUI/frmAnaesthesiaMethod.cs index c93aa0b..4f5c7de 100644 --- a/AIMS/PublicUI/frmAnaesthesiaMethod.cs +++ b/AIMS/PublicUI/frmAnaesthesiaMethod.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -21,7 +22,7 @@ namespace AIMS.PublicUI.UI { AIMSExtension.PublicMethod.SetDgvAttribute(dgvAnaesthesiaMethod); this.txtHelpCode.Text = "简拼/汉字/ICD码"; - dgvAnaesthesiaMethod.DataSource = DataDictionary.BLL.AnaesthesiaMethod.GetDataTable("IsValid =1"); + dgvAnaesthesiaMethod.DataSource = BAnaesthesiaMethod.GetDataTable("IsValid =1"); dgvAnaesthesiaMethod.Select(); if (SelectAnaesthesiaMethodData.Count > 0) @@ -70,7 +71,7 @@ namespace AIMS.PublicUI.UI private void txtHelpCode_TextChanged(object sender, EventArgs e) { dgvAnaesthesiaMethod.DataSource = - DataDictionary.BLL.AnaesthesiaMethod.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); + BAnaesthesiaMethod.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); } } } diff --git a/AIMS/PublicUI/frmContagion.cs b/AIMS/PublicUI/frmContagion.cs index 683fa3b..cf5adf7 100644 --- a/AIMS/PublicUI/frmContagion.cs +++ b/AIMS/PublicUI/frmContagion.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -21,7 +22,7 @@ namespace AIMS.PublicUI.UI { AIMSExtension.PublicMethod.SetDgvAttribute(dgvContagion); this.txtHelpCode.Text = "简拼/汉字/ICD码"; - dgvContagion.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTableByParentName("术前感染筛查", ""); + dgvContagion.DataSource = BBasicDictionary.GetDataDictionaryDataTableByParentName("术前感染筛查", ""); dgvContagion.Select(); @@ -54,7 +55,7 @@ namespace AIMS.PublicUI.UI } private void txtHelpCode_TextChanged(object sender, EventArgs e) { - dgvContagion.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTableByParentName("术前感染筛查", txtHelpCode.Text.Trim()); + dgvContagion.DataSource = BBasicDictionary.GetDataDictionaryDataTableByParentName("术前感染筛查", txtHelpCode.Text.Trim()); } private void dgvContagion_Click(object sender, EventArgs e) diff --git a/AIMS/PublicUI/frmCreateTemplate.cs b/AIMS/PublicUI/frmCreateTemplate.cs index e934702..af9910c 100644 --- a/AIMS/PublicUI/frmCreateTemplate.cs +++ b/AIMS/PublicUI/frmCreateTemplate.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -26,7 +27,7 @@ namespace AIMS.PublicUI.UI MessageBox.Show("模板名称不能为空!"); return; } - if(BLL.OperationTemplate.Exists(txtName.Text.Trim(),TypeId)) + if(BOperationTemplate.Exists(txtName.Text.Trim(),TypeId)) { MessageBox.Show("名称不能重复!"); return; @@ -34,7 +35,7 @@ namespace AIMS.PublicUI.UI try { int IsPublic = radioButton1.Checked == true ? 1 : 0; - BLL.OperationTemplate.Add(InRoomTime,txtName.Text.Trim(), PatientId, TypeId,IsPublic); + BOperationTemplate.Add(InRoomTime,txtName.Text.Trim(), PatientId, TypeId,IsPublic); MessageBox.Show("保存成功!"); Close(); } diff --git a/AIMS/PublicUI/frmDepartment.cs b/AIMS/PublicUI/frmDepartment.cs index b967d88..7fa64a8 100644 --- a/AIMS/PublicUI/frmDepartment.cs +++ b/AIMS/PublicUI/frmDepartment.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,7 +14,7 @@ namespace AIMS.PublicUI.UI public partial class frmDepartment : Form { public AIMSExtension.EditState _state; - private Model.Department SelectDepartmentRow = new Model.Department(); + private Department SelectDepartmentRow = new Department(); public frmDepartment() { InitializeComponent(); @@ -92,7 +94,7 @@ namespace AIMS.PublicUI.UI { if (this.ValidInput()) { - Model.Department DepartmentObj = new Model.Department(); + Department DepartmentObj = new Department(); DepartmentObj.Name = txtName.Text.Trim(); DepartmentObj.HelpCode = AIMSExtension.PublicMethod.GetFirstLetter(txtName.Text.Trim()); DepartmentObj.Kind = cboKind.Text; @@ -107,12 +109,12 @@ namespace AIMS.PublicUI.UI if (_state == AIMSExtension.EditState.ADD) { - BLL.Department.Add(DepartmentObj); + BDepartment.Add(DepartmentObj); } if (_state == AIMSExtension.EditState.EDIT) { DepartmentObj.Id = SelectDepartmentRow.Id; - BLL.Department.Update(DepartmentObj); + BDepartment.Update(DepartmentObj); } } _state = AIMSExtension.EditState.BROWSE; @@ -153,7 +155,7 @@ namespace AIMS.PublicUI.UI private void GetDepartmentDataTable() { dgvDepartment.Rows.Clear(); - DataTable dt = BLL.Department.GetDepartmentDataTable(""); + DataTable dt = BDepartment.GetDepartmentDataTable(""); for (int i = 0; i < dt.Rows.Count; i++) { dgvDepartment.Rows.Add(dt.Rows[i]["Id"].ToString(), diff --git a/AIMS/PublicUI/frmEditPassWord.cs b/AIMS/PublicUI/frmEditPassWord.cs index c9da531..655fb08 100644 --- a/AIMS/PublicUI/frmEditPassWord.cs +++ b/AIMS/PublicUI/frmEditPassWord.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -25,11 +27,11 @@ namespace AIMS.PublicUI.UI { if (txtNewPassWord.Text.Trim() == txtConfirmPassWord.Text.Trim()) { - if (BLL.Person.Login(AIMSExtension.PublicMethod.OperatorNo, txtOldPassWord.Text)) + if (BPerson.Login(AIMSExtension.PublicMethod.OperatorNo, txtOldPassWord.Text)) { - Model.Person PersonObj = BLL.Person.GetModelByNo(AIMSExtension.PublicMethod.OperatorNo); + Person PersonObj = BPerson.GetModelByNo(AIMSExtension.PublicMethod.OperatorNo); PersonObj.PassWord = txtNewPassWord.Text; - BLL.Person.Update(PersonObj); + BPerson.Update(PersonObj); } else { diff --git a/AIMS/PublicUI/frmMenu.cs b/AIMS/PublicUI/frmMenu.cs index 8ee205f..c010146 100644 --- a/AIMS/PublicUI/frmMenu.cs +++ b/AIMS/PublicUI/frmMenu.cs @@ -9,13 +9,15 @@ using System.Windows.Forms; using AIMSExtension; using System.Reflection; using DevComponents.DotNetBar; +using AIMSBLL; + namespace AIMS.PublicUI.UI { public partial class frmMenu : Form { public AIMSExtension.EditState _state; - public List MenuObjList; - private Model.Menu MenuRowData; + public List MenuObjList; + private AIMSModel.Menu MenuRowData; public frmMenu() { InitializeComponent(); @@ -72,13 +74,13 @@ namespace AIMS.PublicUI.UI private void Initial() { InitTreeView(); - MenuObjList = BLL.Menu.GetModelList(); - MenuObjList.Insert(0, new Model.Menu{ Id = -1,Name = "无", ParentId = 0}); + MenuObjList = BMenu.GetModelList(); + MenuObjList.Insert(0, new AIMSModel.Menu{ Id = -1,Name = "无", ParentId = 0}); this.cboParent.DataSource = MenuObjList; this.cboParent.DisplayMember = "Name"; this.cboParent.ValueMember = "Id"; - DataTable dt = BLL.Menu.GetDateTable(""); + DataTable dt = BMenu.GetDateTable(""); dgvMenu.DataSource = dt; foreach (ButtonItem fite in this.galleryContainer2.SubItems) { @@ -90,18 +92,18 @@ namespace AIMS.PublicUI.UI { treeView1.Nodes.Clear(); - List MenuList = new List(); - Model.Menu Menu = new Model.Menu(); - MenuList = BLL.Menu.GetMenuRootList(0); + List MenuList = new List(); + AIMSModel.Menu Menu = new AIMSModel.Menu(); + MenuList = BMenu.GetMenuRootList(0); for (int i = 0; i < MenuList.Count; i++) { - Menu = BLL.Menu.GetMenuById(MenuList[i].Id,AIMSExtension.PublicMethod.RoleId,1); + Menu = BMenu.GetMenuById(MenuList[i].Id.Value,AIMSExtension.PublicMethod.RoleId,1); TreeNode Node = treeView1.Nodes.Add(Menu.Id.ToString(), Menu.Name); BuildChildNode(Menu, Node); } } - private void BuildChildNode(Model.Menu Menu, TreeNode ParentNode) + private void BuildChildNode(AIMSModel.Menu Menu, TreeNode ParentNode) { for (int i = 0; i < Menu.Children.Count; i++) { @@ -141,7 +143,7 @@ namespace AIMS.PublicUI.UI if (dgvMenu.Rows.Count > 0) { - MenuRowData = BLL.Menu.GetModel(int.Parse(dgvMenu.CurrentRow.Cells["Id"].Value.ToString())); + MenuRowData = BMenu.GetModel(int.Parse(dgvMenu.CurrentRow.Cells["Id"].Value.ToString())); txtName.Text = MenuRowData.Name; txtPath.Text = MenuRowData.Path; @@ -193,7 +195,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.EnabledControl(panel4, false); if (this.ValidInput()) { - Model.Menu MenuObj = new Model.Menu(); + AIMSModel.Menu MenuObj = new AIMSModel.Menu(); if (System.Convert.ToInt32(this.cboParent.SelectedValue) > -1) { MenuObj.ParentId = System.Convert.ToInt32(this.cboParent.SelectedValue); @@ -214,7 +216,7 @@ namespace AIMS.PublicUI.UI MenuObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (this._state == EditState.ADD) { - BLL.Menu.Add(MenuObj); + BMenu.Add(MenuObj); AIMSExtension.PublicMethod.ClearControl(panel4); } @@ -224,7 +226,7 @@ namespace AIMS.PublicUI.UI if (dgvMenu.Rows.Count > 0) { MenuObj.Id = MenuRowData.Id; - BLL.Menu.Update(MenuObj); + BMenu.Update(MenuObj); AIMSExtension.PublicMethod.ClearControl(panel4); this._state = EditState.BROWSE; } diff --git a/AIMS/PublicUI/frmNotice.cs b/AIMS/PublicUI/frmNotice.cs index 6321f1b..dfb6831 100644 --- a/AIMS/PublicUI/frmNotice.cs +++ b/AIMS/PublicUI/frmNotice.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -22,8 +24,8 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.EnabledControl(groupBox2, false); AIMSExtension.PublicMethod.ClearControl(groupBox2); _state = AIMSExtension.EditState.BROWSE; - dgvOperation.DataSource = PublicUI.BLL.NoticeTemplate.GetOperation(); - dgvNoticeTemplate.DataSource = PublicUI.BLL.NoticeTemplate.GetOperationList(); + dgvOperation.DataSource = BNotice.GetOperation(); + dgvNoticeTemplate.DataSource = BNotice.GetOperationList(); } private void tsbAdd_Click(object sender, EventArgs e) { @@ -35,20 +37,20 @@ namespace AIMS.PublicUI.UI { if (this.txtContentTemplate.Text.Trim().Length > 0) { - Model.Notice NoticeObj = new Model.Notice(); + Notice NoticeObj = new Notice(); NoticeObj.Contents = txtContentTemplate.Text.Trim(); NoticeObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; NoticeObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; NoticeObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); if (_state == AIMSExtension.EditState.ADD) { - BLL.NoticeTemplate.Add(NoticeObj); + BNotice.Add(NoticeObj); } _state = AIMSExtension.EditState.BROWSE; AIMSExtension.PublicMethod.EnabledControl(panel1, false); AIMSExtension.PublicMethod.ClearControl(panel1); - dgvOperation.DataSource = PublicUI.BLL.NoticeTemplate.GetOperation(); - dgvNoticeTemplate.DataSource = PublicUI.BLL.NoticeTemplate.GetOperationList(); + dgvOperation.DataSource = BNotice.GetOperation(); + dgvNoticeTemplate.DataSource = BNotice.GetOperationList(); } } private void tsbExit_Click(object sender, EventArgs e) @@ -78,8 +80,8 @@ namespace AIMS.PublicUI.UI if (MessageBox.Show("您确认需要删除该名联系人吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes) { int Id = int.Parse(dgvNoticeTemplate.CurrentRow.Cells["NoticeTemplateIdColumn"].Value.ToString()); - BLL.NoticeTemplate.Delete(Id); - dgvNoticeTemplate.DataSource = PublicUI.BLL.NoticeTemplate.GetOperationList(); + BNotice.Delete(Id); + dgvNoticeTemplate.DataSource = BNotice.GetOperationList(); } } } @@ -89,13 +91,13 @@ namespace AIMS.PublicUI.UI if (this.txtConcent.Text.Trim().Length > 0) { - Model.Notice NoticeObj = new Model.Notice(); + Notice NoticeObj = new Notice(); NoticeObj.Contents = txtConcent.Text.Trim(); - NoticeObj.SendState = "1"; + NoticeObj.SendState = 1; NoticeObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; NoticeObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; NoticeObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - BLL.NoticeTemplate.sendout(NoticeObj); + BNotice.sendout(NoticeObj); } txtMdrecNo.Clear(); txtPatientName.Clear(); @@ -106,7 +108,7 @@ namespace AIMS.PublicUI.UI { dgvHistory.Rows.Clear(); - List NoticeList = PublicUI.BLL.NoticeTemplate.HistoryNoticeData(); + List NoticeList = BNotice.HistoryNoticeData(); for(int i=0;i NoticeList = PublicUI.BLL.NoticeTemplate.HistoryNoticeData(); + List NoticeList = BNotice.HistoryNoticeData(); for (int i = 0; i < NoticeList.Count; i++) { @@ -38,12 +40,12 @@ namespace AIMS.PublicUI.UI { if (this.txtConcent.Text.Trim().Length > 0) { - Model.Notice NoticeObj = new Model.Notice(); + Notice NoticeObj = new Notice(); NoticeObj.Contents = txtConcent.Text.Trim(); NoticeObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; NoticeObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; NoticeObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - BLL.NoticeTemplate.Add(NoticeObj); + BNotice.Add(NoticeObj); BindDate(); } } @@ -58,7 +60,7 @@ namespace AIMS.PublicUI.UI if (MessageBox.Show("您确认需要删除该公告吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes) { int Id = int.Parse(dgvHistory.CurrentRow.Cells["Id"].Value.ToString()); - BLL.NoticeTemplate.Delete(Id); + BNotice.Delete(Id); BindDate(); } } diff --git a/AIMS/PublicUI/frmOperationBodyPosition.cs b/AIMS/PublicUI/frmOperationBodyPosition.cs index d2ffcd5..e7f1e55 100644 --- a/AIMS/PublicUI/frmOperationBodyPosition.cs +++ b/AIMS/PublicUI/frmOperationBodyPosition.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -21,7 +22,7 @@ namespace AIMS.PublicUI.UI { AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperationBodyPosition); this.txtHelpCode.Text = "简拼/汉字/ICD码"; - dgvOperationBodyPosition.DataSource = DataDictionary.BLL.OperationBodyPosition.GetDataTable("IsValid =1"); + dgvOperationBodyPosition.DataSource = BOperationBodyPosition.GetDataTable("IsValid =1"); dgvOperationBodyPosition.Select(); @@ -60,7 +61,7 @@ namespace AIMS.PublicUI.UI private void txtHelpCode_TextChanged(object sender, EventArgs e) { dgvOperationBodyPosition.DataSource = - DataDictionary.BLL.OperationBodyPosition.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); + BOperationBodyPosition.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); } private void txtHelpCode_Click(object sender, EventArgs e) diff --git a/AIMS/PublicUI/frmOperationCutType.cs b/AIMS/PublicUI/frmOperationCutType.cs index 920dfd2..e41a319 100644 --- a/AIMS/PublicUI/frmOperationCutType.cs +++ b/AIMS/PublicUI/frmOperationCutType.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -21,7 +22,7 @@ namespace AIMS.PublicUI.UI { AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperationCutType); this.txtHelpCode.Text = "简拼/汉字/ICD码"; - dgvOperationCutType.DataSource = DataDictionary.BLL.OperationCutType.GetDataTable("IsValid =1"); + dgvOperationCutType.DataSource = BOperationCutType.GetDataTable("IsValid =1"); dgvOperationCutType.Select(); if (SelectOperationCutTypeData.Count > 0) @@ -69,7 +70,7 @@ namespace AIMS.PublicUI.UI private void txtHelpCode_TextChanged(object sender, EventArgs e) { dgvOperationCutType.DataSource = - DataDictionary.BLL.OperationCutType.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); + BOperationCutType.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); } } diff --git a/AIMS/PublicUI/frmOperationPosition.cs b/AIMS/PublicUI/frmOperationPosition.cs index 291f1ea..7718adb 100644 --- a/AIMS/PublicUI/frmOperationPosition.cs +++ b/AIMS/PublicUI/frmOperationPosition.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -21,7 +22,7 @@ namespace AIMS.PublicUI.UI { AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperationPosition); this.txtHelpCode.Text = "简拼/汉字/ICD码"; - dgvOperationPosition.DataSource = DataDictionary.BLL.OperationPosition.GetDataTable("IsValid =1"); + dgvOperationPosition.DataSource = BOperationPosition.GetDataTable("IsValid =1"); dgvOperationPosition.Select(); @@ -79,7 +80,7 @@ namespace AIMS.PublicUI.UI private void txtHelpCode_TextChanged(object sender, EventArgs e) { dgvOperationPosition.DataSource = - DataDictionary.BLL.OperationPosition.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); + BOperationPosition.GetDataTable("IsValid =1 AND (Name LIKE '%" + txtHelpCode.Text.Trim() + "%' or helpCode LIKE '%" + txtHelpCode.Text.Trim() + "%')"); } } } diff --git a/AIMS/PublicUI/frmPerson.cs b/AIMS/PublicUI/frmPerson.cs index 3759f7c..70f5e30 100644 --- a/AIMS/PublicUI/frmPerson.cs +++ b/AIMS/PublicUI/frmPerson.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,7 +14,7 @@ namespace AIMS.PublicUI.UI public partial class frmPerson : Form { public AIMSExtension.EditState _state; - private Model.Person SelectPerson = new Model.Person(); + private Person SelectPerson = new Person(); public frmPerson() { InitializeComponent(); @@ -31,29 +33,29 @@ namespace AIMS.PublicUI.UI { cboDepartment.DisplayMember = "Name"; cboDepartment.ValueMember = "Id"; - cboDepartment.DataSource = BLL.Department.GetDepartmentDataTable(""); + cboDepartment.DataSource = BDepartment.GetDepartmentDataTable(""); cboDepartment.SelectedIndex = -1; cboRole.DisplayMember = "RoleName"; cboRole.ValueMember = "Id"; - cboRole.DataSource = BLL.Role.GetDataTable(); + cboRole.DataSource = BRole.GetDataTable(); cboRole.SelectedIndex = -1; cboDiploma.DisplayMember = "Name"; cboDiploma.ValueMember = "Id"; - cboDiploma.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='学历')"); + cboDiploma.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='学历')"); cboDiploma.SelectedIndex = -1; cboJobTitle.DisplayMember = "Name"; cboJobTitle.ValueMember = "Id"; - cboJobTitle.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='工作职称')"); + cboJobTitle.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='工作职称')"); cboJobTitle.SelectedIndex = -1; cboPersonType.DisplayMember = "Name"; cboPersonType.ValueMember = "Id"; - cboPersonType.DataSource = DataDictionary.BLL.DataDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='人员类型')"); + cboPersonType.DataSource = BBasicDictionary.GetDataDictionaryDataTable(" ParentId IN (SELECT Id FROM BasicDictionary WHERE NAME='人员类型')"); cboPersonType.SelectedIndex = -1; this.txtName.Enabled = true; @@ -130,7 +132,7 @@ namespace AIMS.PublicUI.UI { if (ValidInput()) { - Model.Person PersonObj = new Model.Person(); + Person PersonObj = new Person(); PersonObj.DepId = int.Parse(cboDepartment.SelectedValue.ToString()); PersonObj.No = txtNo.Text; PersonObj.Name = txtName.Text.Trim(); @@ -152,7 +154,7 @@ namespace AIMS.PublicUI.UI if (_state == AIMSExtension.EditState.ADD) { - BLL.Person.Add(PersonObj); + BPerson.Add(PersonObj); dgvPerson.CurrentRow.Cells["DepNameColumn"].Value = cboDepartment.Text; dgvPerson.CurrentRow.Cells["NoColumn"].Value = txtNo.Text; @@ -172,7 +174,7 @@ namespace AIMS.PublicUI.UI if (_state == AIMSExtension.EditState.EDIT) { PersonObj.Id = SelectPerson.Id; - BLL.Person.Update(PersonObj); + BPerson.Update(PersonObj); dgvPerson.CurrentRow.Cells["DepNameColumn"].Value = cboDepartment.Text; dgvPerson.CurrentRow.Cells["NoColumn"].Value = txtNo.Text; @@ -238,7 +240,7 @@ namespace AIMS.PublicUI.UI private void GetPersonDataTable(string name, string DepartName) { dgvPerson.Rows.Clear(); - DataTable dt = BLL.Person.GetPersonDataTable(name,DepartName); + DataTable dt = BPerson.GetPersonDataTable(name,DepartName); for (int i = 0; i < dt.Rows.Count; i++) { dgvPerson.Rows.Add(dt.Rows[i]["Id"].ToString(), diff --git a/AIMS/PublicUI/frmSelectDisease.cs b/AIMS/PublicUI/frmSelectDisease.cs index eac8a8e..b23b902 100644 --- a/AIMS/PublicUI/frmSelectDisease.cs +++ b/AIMS/PublicUI/frmSelectDisease.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -27,7 +29,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.SetDgvAttribute(dgvDisease); AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectDisease); - SelectLeftdt = DataDictionary.BLL.Disease.GetDataTable(""); + SelectLeftdt = BDisease.GetDataTable(""); this.currentPage = 0; this.total = SelectLeftdt.Rows.Count; @@ -46,7 +48,7 @@ namespace AIMS.PublicUI.UI { foreach (int RowId in SelectRightData) { - DataDictionary.Model.Disease DiseaseObj = DataDictionary.BLL.Disease.GetModel(RowId); + Disease DiseaseObj = BDisease.GetModel(RowId); dgvSelectDisease.Rows.Add(DiseaseObj.Id, DiseaseObj.IcdCode, DiseaseObj.Name); } } @@ -70,7 +72,7 @@ namespace AIMS.PublicUI.UI private void txtHelpCode_TextChanged(object sender, EventArgs e) { this.dgvDisease.AutoGenerateColumns = false; - this.SelectLeftdt = DataDictionary.BLL.Disease.GetDataTable(txtHelpCode.Text.Trim()); + this.SelectLeftdt = BDisease.GetDataTable(txtHelpCode.Text.Trim()); this.dgvDisease.DataSource = this.SelectLeftdt; this.currentPage = 0; @@ -163,7 +165,7 @@ namespace AIMS.PublicUI.UI private void btnAddDisease_Click(object sender, EventArgs e) { - DataDictionary.Model.Disease DiseaseObj = new DataDictionary.Model.Disease(); + Disease DiseaseObj = new Disease(); DiseaseObj.Name = txtHelpCode.Text.Trim(); DiseaseObj.IcdCode = ""; DiseaseObj.HelpCode = AIMSExtension.PublicMethod.GetFirstLetter(DiseaseObj.Name); @@ -176,12 +178,12 @@ namespace AIMS.PublicUI.UI MessageBox.Show("名称不能为空!"); return; } - if (DataDictionary.BLL.Disease.IsExit(DiseaseObj.Name)) + if (BDisease.IsExit(DiseaseObj.Name)) { MessageBox.Show("该事件已存在"); return; } - DataDictionary.BLL.Disease.Add(DiseaseObj); + BDisease.Add(DiseaseObj); txtHelpCode_TextChanged(null, null); } diff --git a/AIMS/PublicUI/frmSelectOperation.cs b/AIMS/PublicUI/frmSelectOperation.cs index c7ef513..d2e3001 100644 --- a/AIMS/PublicUI/frmSelectOperation.cs +++ b/AIMS/PublicUI/frmSelectOperation.cs @@ -1,10 +1,8 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace AIMS.PublicUI.UI @@ -26,7 +24,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectOperation); - SelectLeftdt = DataDictionary.BLL.Operation.GetDataTable(""); + SelectLeftdt = BOperation.GetDataTable(""); this.currentPage = 0; this.total = SelectLeftdt.Rows.Count; @@ -45,7 +43,7 @@ namespace AIMS.PublicUI.UI { foreach (int RowId in SelectRightData) { - DataDictionary.Model.Operation OperationObj = DataDictionary.BLL.Operation.GetModel(RowId); + Operation OperationObj = BOperation.GetModel(RowId); dgvSelectOperation.Rows.Add(OperationObj.Id, OperationObj.IcdCode, OperationObj.Name); } @@ -104,7 +102,7 @@ namespace AIMS.PublicUI.UI private void txtHelpCode_TextChanged(object sender, EventArgs e) { this.dgvOperation.AutoGenerateColumns = false; - this.SelectLeftdt = DataDictionary.BLL.Operation.GetDataTable(txtHelpCode.Text.Trim()); + this.SelectLeftdt = BOperation.GetDataTable(txtHelpCode.Text.Trim()); this.dgvOperation.DataSource = this.SelectLeftdt; this.currentPage = 0; @@ -166,7 +164,7 @@ namespace AIMS.PublicUI.UI } private void btnAddOperation_Click(object sender, EventArgs e) { - DataDictionary.Model.Operation OperationObj = new DataDictionary.Model.Operation(); + Operation OperationObj = new Operation(); OperationObj.Name = txtHelpCode.Text.Trim(); OperationObj.IcdCode = ""; OperationObj.HelpCode = AIMSExtension.PublicMethod.GetFirstLetter(OperationObj.Name); @@ -179,12 +177,12 @@ namespace AIMS.PublicUI.UI MessageBox.Show("名称不能为空!"); return; } - if (DataDictionary.BLL.Operation.IsExit(OperationObj.Name)) + if (BOperation.IsExit(OperationObj.Name)) { MessageBox.Show("该事件已存在"); return; } - DataDictionary.BLL.Operation.Add(OperationObj); + BOperation.Add(OperationObj); txtHelpCode_TextChanged(null, null); diff --git a/AIMS/PublicUI/frmSelectOperationOne.cs b/AIMS/PublicUI/frmSelectOperationOne.cs index 188fb00..b77b3ff 100644 --- a/AIMS/PublicUI/frmSelectOperationOne.cs +++ b/AIMS/PublicUI/frmSelectOperationOne.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -26,7 +28,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.SetDgvAttribute(dgvOperation); //AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectOperation); - SelectLeftdt = DataDictionary.BLL.Operation.GetDataTable(""); + SelectLeftdt = BOperation.GetDataTable(""); this.currentPage = 0; this.total = SelectLeftdt.Rows.Count; @@ -45,7 +47,7 @@ namespace AIMS.PublicUI.UI //{ // foreach (int RowId in SelectRightData) // { - // DataDictionary.Model.Operation OperationObj = DataDictionary.BLL.Operation.GetModel(RowId); + // Operation OperationObj = BOperation.GetModel(RowId); // dgvSelectOperation.Rows.Add(OperationObj.Id, OperationObj.IcdCode, OperationObj.Name); // } @@ -87,7 +89,7 @@ namespace AIMS.PublicUI.UI private void txtHelpCode_TextChanged(object sender, EventArgs e) { this.dgvOperation.AutoGenerateColumns = false; - this.SelectLeftdt = DataDictionary.BLL.Operation.GetDataTable(txtHelpCode.Text.Trim()); + this.SelectLeftdt = BOperation.GetDataTable(txtHelpCode.Text.Trim()); this.dgvOperation.DataSource = this.SelectLeftdt; this.currentPage = 0; @@ -135,7 +137,7 @@ namespace AIMS.PublicUI.UI } private void btnAddOperation_Click(object sender, EventArgs e) { - DataDictionary.Model.Operation OperationObj = new DataDictionary.Model.Operation(); + Operation OperationObj = new Operation(); OperationObj.Name = txtHelpCode.Text.Trim(); OperationObj.IcdCode = ""; OperationObj.HelpCode = AIMSExtension.PublicMethod.GetFirstLetter(OperationObj.Name); @@ -148,12 +150,12 @@ namespace AIMS.PublicUI.UI MessageBox.Show("名称不能为空!"); return; } - if (DataDictionary.BLL.Operation.IsExit(OperationObj.Name)) + if (BOperation.IsExit(OperationObj.Name)) { MessageBox.Show("该事件已存在"); return; } - DataDictionary.BLL.Operation.Add(OperationObj); + BOperation.Add(OperationObj); txtHelpCode_TextChanged(null, null); diff --git a/AIMS/PublicUI/frmSelectPerson.cs b/AIMS/PublicUI/frmSelectPerson.cs index 0f37ff5..b522d16 100644 --- a/AIMS/PublicUI/frmSelectPerson.cs +++ b/AIMS/PublicUI/frmSelectPerson.cs @@ -1,11 +1,8 @@ -using AIMS.PublicUI.Model; +using AIMSBLL; +using AIMSModel; using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Linq; -using System.Text; using System.Windows.Forms; namespace AIMS.PublicUI.UI @@ -30,7 +27,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.SetDgvAttribute(dgvSelectPerson); - listOnit = AIMS.PublicUI.BLL.Department.GetDepartmentAllListBYSql(""); + listOnit = BDepartment.GetDepartmentAllListBYSql(""); listOnit.Insert(0, new Department() { Id = -1, Name = "全部科室" }); this.cboDept.Items.AddRange(listOnit.ToArray()); cboDept.ValueMember = "Id"; @@ -42,8 +39,8 @@ namespace AIMS.PublicUI.UI if (SelectPersonData.Count > 0) { - int DepId = AIMS.PublicUI.BLL.Person.GetModel(int.Parse(SelectPersonData[0].ToString())).DepId; - cboDept.Text = AIMS.PublicUI.BLL.Department.GetModel(DepId).Name; + int DepId = BPerson.GetModel(int.Parse(SelectPersonData[0].ToString())).DepId.Value; + cboDept.Text = BDepartment.GetModel(DepId).Name; for (int i = 0; i < dgvSelectPerson.Rows.Count; i++) { @@ -79,16 +76,16 @@ namespace AIMS.PublicUI.UI { Department dt = cboDept.SelectedItem as Department; if (dt != null) - _deptId = dt.Id; + _deptId = dt.Id.Value; else - _deptId = AIMS.PublicUI.BLL.Department.GetModelName(cboDept.Text).Id; + _deptId = BDepartment.GetModelName(cboDept.Text).Id.Value; } catch (Exception) { - _deptId = AIMS.PublicUI.BLL.Department.GetModelName(cboDept.Text).Id; + _deptId = BDepartment.GetModelName(cboDept.Text).Id.Value; } } - dgvSelectPerson.DataSource = AIMS.PublicUI.BLL.Person.GetPersonDataTableByDepId( _deptId, txtHelpCode.Text.Trim(), PersonType); + dgvSelectPerson.DataSource = BPerson.GetPersonDataTableByDepId( _deptId, txtHelpCode.Text.Trim(), PersonType); } private void dgvSelectPerson_CellClick(object sender, DataGridViewCellEventArgs e) @@ -112,10 +109,10 @@ namespace AIMS.PublicUI.UI //清空listNew listNew.Clear(); //遍历全部备查数据 - listNew = AIMS.PublicUI.BLL.Department.GetDepartmentAllListBYSql(" and (HelpCode like '%" + cboDept.Text + "%' or Name like '%" + cboDept.Text + "%' ) "); + listNew = BDepartment.GetDepartmentAllListBYSql(" and (HelpCode like '%" + cboDept.Text + "%' or Name like '%" + cboDept.Text + "%' ) "); if (cboDept.Text.Trim() == "" || listNew == null || listNew.Count <= 0) { - listNew = AIMS.PublicUI.BLL.Department.GetDepartmentAllListBYSql(""); + listNew = BDepartment.GetDepartmentAllListBYSql(""); listNew.Insert(0, new Department() { Id = -1, Name = "全部科室" }); } //combobox添加已经查到的关键词 @@ -137,16 +134,16 @@ namespace AIMS.PublicUI.UI { Department dt = cboDept.SelectedItem as Department; if (dt != null) - _deptId = dt.Id; + _deptId = dt.Id.Value; else - _deptId = AIMS.PublicUI.BLL.Department.GetModelName(cboDept.Text).Id; + _deptId = BDepartment.GetModelName(cboDept.Text).Id.Value; } catch (Exception) { - _deptId = AIMS.PublicUI.BLL.Department.GetModelName(cboDept.Text).Id; + _deptId = BDepartment.GetModelName(cboDept.Text).Id.Value; } } - dgvSelectPerson.DataSource = AIMS.PublicUI.BLL.Person.GetPersonDataTableByDepId(_deptId, txtHelpCode.Text.Trim(), PersonType); + dgvSelectPerson.DataSource = BPerson.GetPersonDataTableByDepId(_deptId, txtHelpCode.Text.Trim(), PersonType); } } } diff --git a/AIMS/PublicUI/frmTemplate.cs b/AIMS/PublicUI/frmTemplate.cs index 8e4b530..5a181c6 100644 --- a/AIMS/PublicUI/frmTemplate.cs +++ b/AIMS/PublicUI/frmTemplate.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -38,7 +39,7 @@ namespace AIMS.PublicUI.UI } private void GetTemplateDataTable() { - dgv.DataSource = BLL.OperationTemplate.GetDataTable(TypeId); + dgv.DataSource = BOperationTemplate.GetDataTable(TypeId); } void frmCreateTemplateObj_FormClosed(object sender, FormClosedEventArgs e) @@ -57,8 +58,8 @@ namespace AIMS.PublicUI.UI { if (MessageBox.Show("确认要导入[" + dgv.CurrentRow.Cells["TemplateNameColumn"].Value.ToString() + "]模板吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) { - //BLL.OperationTemplate.ClearData(PatientId, TypeId); - BLL.OperationTemplate.InputData(dgv.CurrentRow.Cells["TemplateNameColumn"].Value.ToString(), PatientId, InRoomTime, TypeId); + //BOperationTemplate.ClearData(PatientId, TypeId); + BOperationTemplate.InputData(dgv.CurrentRow.Cells["TemplateNameColumn"].Value.ToString(), PatientId, InRoomTime, TypeId); Close(); } } @@ -78,7 +79,7 @@ namespace AIMS.PublicUI.UI if (MessageBox.Show("确认要删除[" + dgv.CurrentRow.Cells["TemplateNameColumn"].Value.ToString() + "]模板吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes) { - BLL.OperationTemplate.Delete(dgv.CurrentRow.Cells["TemplateNameColumn"].Value.ToString(), TypeId); + BOperationTemplate.Delete(dgv.CurrentRow.Cells["TemplateNameColumn"].Value.ToString(), TypeId); GetTemplateDataTable(); } } diff --git a/AIMS/PublicUI/frmUserPurview.cs b/AIMS/PublicUI/frmUserPurview.cs index a58d32f..9a8ebfc 100644 --- a/AIMS/PublicUI/frmUserPurview.cs +++ b/AIMS/PublicUI/frmUserPurview.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,7 +14,7 @@ namespace AIMS.PublicUI.UI public partial class frmUserPurview : Form { public AIMSExtension.EditState _state; - private Model.Role RoleRowData; + private Role RoleRowData; public frmUserPurview() { InitializeComponent(); @@ -29,7 +31,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.EnabledControl(panel2, false); _state = AIMSExtension.EditState.BROWSE; - dgvUserPurview.DataSource = BLL.Role.GetDataTable(); + dgvUserPurview.DataSource = BRole.GetDataTable(); } private void tsbAdd_Click(object sender, EventArgs e) @@ -53,7 +55,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.EnabledControl(panel2, true); _state = AIMSExtension.EditState.EDIT; - RoleRowData = BLL.Role.GetModel(int.Parse(dgvUserPurview.CurrentRow.Cells["Id"].Value.ToString())); + RoleRowData = BRole.GetModel(int.Parse(dgvUserPurview.CurrentRow.Cells["Id"].Value.ToString())); txtRoleName.Text = RoleRowData.RoleName; if (RoleRowData.IsValid == 1) { @@ -70,7 +72,7 @@ namespace AIMS.PublicUI.UI { if (this.ValidInput()) { - Model.Role RoleObj = new Model.Role(); + Role RoleObj = new Role(); RoleObj.RoleName = txtRoleName.Text.Trim(); RoleObj.IsValid = System.Convert.ToInt32(chkIsValid.Checked ? "1" : "0"); @@ -80,14 +82,14 @@ namespace AIMS.PublicUI.UI if (_state == AIMSExtension.EditState.ADD) { - BLL.Role.Add(RoleObj); + BRole.Add(RoleObj); } if (this._state == AIMSExtension.EditState.EDIT) { if (dgvUserPurview.Rows.Count > 0) { RoleObj.Id= RoleRowData.Id; - BLL.Role.Update(RoleObj); + BRole.Update(RoleObj); AIMSExtension.PublicMethod.ClearControl(panel2); this._state = AIMSExtension.EditState.BROWSE; } @@ -96,7 +98,7 @@ namespace AIMS.PublicUI.UI AIMSExtension.PublicMethod.EnabledControl(panel2, false); AIMSExtension.PublicMethod.ClearControl(panel2); - dgvUserPurview.DataSource = BLL.Role.GetDataTable(); + dgvUserPurview.DataSource = BRole.GetDataTable(); } private bool ValidInput() { diff --git a/AIMS/PublicUI/frmUserPurviewDetail.cs b/AIMS/PublicUI/frmUserPurviewDetail.cs index bdd4b8c..7c808ae 100644 --- a/AIMS/PublicUI/frmUserPurviewDetail.cs +++ b/AIMS/PublicUI/frmUserPurviewDetail.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -27,13 +29,13 @@ namespace AIMS.PublicUI.UI { treeView1.Nodes.Clear(); - List MenuList = new List(); - Model.Menu Menu = new Model.Menu(); - MenuList = BLL.Menu.GetMenuRootList(0); + List MenuList = new List(); + AIMSModel.Menu Menu = new AIMSModel.Menu(); + MenuList = BMenu.GetMenuRootList(0); for (int i = 0; i < MenuList.Count; i++) { - Menu = BLL.Menu.GetMenuById(MenuList[i].Id,AIMSExtension.PublicMethod.RoleId,1); + Menu = BMenu.GetMenuById(MenuList[i].Id.Value ,AIMSExtension.PublicMethod.RoleId,1); TreeNode Node = treeView1.Nodes.Add(Menu.Id.ToString(), Menu.Name); BuildChildNode(Menu, Node); } @@ -41,7 +43,7 @@ namespace AIMS.PublicUI.UI SelectCheckNodes(); } - private void BuildChildNode(Model.Menu Menu, TreeNode ParentNode) + private void BuildChildNode(AIMSModel.Menu Menu, TreeNode ParentNode) { for (int i = 0; i < Menu.Children.Count; i++) { @@ -61,13 +63,13 @@ namespace AIMS.PublicUI.UI { FindCheckNode(node, listNodes); } - BLL.UserPurview.Delete(RoleId); + BUserPurview.Delete(RoleId); for (int i = 0; i < listNodes.Count; i++) { - Model.UserPurview UserPurview = new Model.UserPurview(); + UserPurview UserPurview = new UserPurview(); UserPurview.MenuId = int.Parse(listNodes[i].Name.ToString()); UserPurview.RoleId = RoleId; - BLL.UserPurview.Add(UserPurview); + BUserPurview.Insert(UserPurview); } InitTreeView(); ////dgvRole_CellMouseClick(null, null); @@ -181,7 +183,7 @@ namespace AIMS.PublicUI.UI foreach (TreeNode node in treeView1.Nodes) { List Purview = new List(); - Purview = BLL.UserPurview.GetPurviewListByRoleId(RoleId); + Purview = BUserPurview.GetPurviewListByRoleId(RoleId); SelectCheckNode(node, Purview); } } diff --git a/AIMS/ReportManager/frmAllReport.cs b/AIMS/ReportManager/frmAllReport.cs index 8c3e5f1..0c4122e 100644 --- a/AIMS/ReportManager/frmAllReport.cs +++ b/AIMS/ReportManager/frmAllReport.cs @@ -1,4 +1,5 @@ -using System; +using AIMSBLL; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -18,7 +19,7 @@ namespace AIMS.ReportManager private void frmAllReport_Load(object sender, EventArgs e) { - DataTable dt = AIMS.PublicUI.BLL.Menu.GetMenuDataTable(31, AIMSExtension.PublicMethod.RoleId); + DataTable dt = BMenu.GetMenuDataTable(31, AIMSExtension.PublicMethod.RoleId); for (int i = 0; i < dt.Rows.Count; i++) { OremrUserControl.ucReport ucReportObj = new OremrUserControl.ucReport(); diff --git a/AIMS/ReportManager/frmOperationPlanReport.cs b/AIMS/ReportManager/frmOperationPlanReport.cs index 8a0ba7b..4321a90 100644 --- a/AIMS/ReportManager/frmOperationPlanReport.cs +++ b/AIMS/ReportManager/frmOperationPlanReport.cs @@ -1,4 +1,6 @@ -using System; +using AIMSBLL; +using AIMSModel; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -34,9 +36,9 @@ namespace AIMS.ReportManager AIMSExtension.PublicMethod.SetDgvAttribute(dgv); dgv.BackgroundColor = System.Drawing.Color.Snow; - List list = new List(); - list = AIMS.PublicUI.BLL.Department.GetDepartmentAllList("诊疗部门"); - list.Insert(0, new AIMS.PublicUI.Model.Department + List list = new List(); + list = BDepartment.GetDepartmentAllList("诊疗部门"); + list.Insert(0, new Department { Id = -1, Name = "全部科室" @@ -64,7 +66,7 @@ namespace AIMS.ReportManager { Department = ""; } - DataTable dt = OperationFront.BLL.OperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.AddDays(1).ToString("yyyy-MM-dd")); + DataTable dt = BOperationApply.GetOperationFrontDataTable(dtpBegInDate.Value.ToString("yyyy-MM-dd"), dtpEndDate.Value.AddDays(1).ToString("yyyy-MM-dd")); dgv.DataSource = AIMSExtension.PublicMethod.GetNewDataTable(dt, "State IN ('已排程','已访视') and ApplyDepName LIKE '%" + Department + "%'", ""); for (int i = 0; i < dgv.Rows.Count; i++) diff --git a/AIMS/ReportManager/frmOperationWorkloadStatisticsReport.cs b/AIMS/ReportManager/frmOperationWorkloadStatisticsReport.cs index 3579a61..6f89248 100644 --- a/AIMS/ReportManager/frmOperationWorkloadStatisticsReport.cs +++ b/AIMS/ReportManager/frmOperationWorkloadStatisticsReport.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; +using AIMSBLL; using Microsoft.Reporting.WinForms; namespace AIMS.ReportManager { @@ -19,12 +20,12 @@ namespace AIMS.ReportManager { cboDepartment.DisplayMember = "Name"; cboDepartment.ValueMember = "Id"; - cboDepartment.DataSource = AIMS.PublicUI.BLL.Department.GetDepartmentDataTable("IsValid=1 and kind ='诊疗部门'"); + cboDepartment.DataSource = BDepartment.GetDepartmentDataTable("IsValid=1 and kind ='诊疗部门'"); cboDepartment.SelectedIndex = -1; cboPersonDuty.DisplayMember = "Name"; cboPersonDuty.ValueMember = "Id"; - cboPersonDuty.DataSource = DataDictionary.BLL.PersonDuty.GetDataTablePersonDuty(); + cboPersonDuty.DataSource = BPersonDuty.GetDataTablePersonDuty(); cboPersonDuty.SelectedIndex = -1; btnFind_Click(null, null); diff --git a/AIMSEntity/AIMSEntity.csproj b/AIMSEntity/AIMSEntity.csproj index d03ec9b..553bc7b 100644 --- a/AIMSEntity/AIMSEntity.csproj +++ b/AIMSEntity/AIMSEntity.csproj @@ -115,11 +115,8 @@ - - - @@ -131,7 +128,6 @@ - @@ -189,18 +185,16 @@ - - - - + + @@ -265,11 +259,8 @@ - - - @@ -281,8 +272,7 @@ - - + @@ -339,18 +329,14 @@ - - - - @@ -365,6 +351,7 @@ + @@ -406,11 +393,8 @@ - - - @@ -421,8 +405,8 @@ + - @@ -473,20 +457,16 @@ - - - - - + @@ -557,11 +537,8 @@ - - - @@ -575,119 +552,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + ResXFileCodeGenerator @@ -719,5 +597,6 @@ DrawGraph + \ No newline at end of file diff --git a/AIMSEntity/OldEntity/BLL/BInstrumentRegistration.cs b/AIMSEntity/BLL/AutoGenerate/BInstrumentRegistration.cs similarity index 100% rename from AIMSEntity/OldEntity/BLL/BInstrumentRegistration.cs rename to AIMSEntity/BLL/AutoGenerate/BInstrumentRegistration.cs diff --git a/AIMSEntity/OldEntity/BLL/BNoticeContent.cs b/AIMSEntity/BLL/AutoGenerate/BNoticeContent.cs similarity index 100% rename from AIMSEntity/OldEntity/BLL/BNoticeContent.cs rename to AIMSEntity/BLL/AutoGenerate/BNoticeContent.cs diff --git a/AIMSEntity/OldEntity/BLL/BNoticeTemplate.cs b/AIMSEntity/BLL/AutoGenerate/BNoticeTemplate.cs similarity index 95% rename from AIMSEntity/OldEntity/BLL/BNoticeTemplate.cs rename to AIMSEntity/BLL/AutoGenerate/BNoticeTemplate.cs index 402c7eb..90a2c3d 100644 --- a/AIMSEntity/OldEntity/BLL/BNoticeTemplate.cs +++ b/AIMSEntity/BLL/AutoGenerate/BNoticeTemplate.cs @@ -157,15 +157,6 @@ namespace AIMSBLL return DNoticeTemplate.SelectSingle(id, recursiveType, recursiveDepth); } #endregion - - /// - /// 查询NoticeTemplate所有的内容 - /// - /// - public static DataTable GetNoticeTemplate() - { - return DNoticeTemplate.GetNoticeTemplate(); - } } } diff --git a/AIMSEntity/BLL/AutoGenerate/BPhysioData.cs b/AIMSEntity/BLL/AutoGenerate/BPhysioData.cs deleted file mode 100644 index b48755b..0000000 --- a/AIMSEntity/BLL/AutoGenerate/BPhysioData.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSBLL -{ - public partial class BPhysioData - { - #region 插入实体操作部份 - /// - /// 插入实体 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - public static int Insert(PhysioData physioData) - { - return DPhysioData.Insert(physioData); - } - #endregion - - #region 删除实体操作 - /// - /// 删除实体 - /// - /// 实体类对象 - /// 影响的记录行数 - public static int Delete(PhysioData physioData) - { - return DPhysioData.Delete(physioData); - } - /// - /// 根据对象查询语句删除 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Delete(string oql, ParameterList parameters) - { - return DPhysioData.Delete(oql,parameters); - } - #endregion - - #region 更新实体操作 - - /// - /// 更新实体 - /// - /// 实体类对象 - /// 影响的记录行数 - public static int Update(PhysioData physioData) - { - return DPhysioData.Update(physioData); - } - - /// - /// 根据对象查询语句更新实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Update(string oql, ParameterList parameters) - { - return DPhysioData.Update(oql,parameters); - } - #endregion - - #region 查询实体集合 - /// - /// \查询实体集合 - /// - /// 实体类对象集合 - public static List Select() - { - return DPhysioData.Select(); - } - /// - /// 递归查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioData.Select(recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters) - { - return DPhysioData.Select(oql, parameters); - } - - /// - /// 根据对象查询语句递归查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioData.Select(oql, parameters, recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - /// - /// 更据对象查询语句查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - public static PhysioData SelectSingle(string oql, ParameterList parameters) - { - return DPhysioData.SelectSingle(oql, parameters); - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - public static PhysioData SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioData.SelectSingle(oql, parameters, recursiveType, recursiveDepth); - } - - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 实体类对象 - public static PhysioData SelectSingle(int? id) - { - return DPhysioData.SelectSingle(id); - } - - /// - /// 更据主键递归查询单个实体 - /// - /// 递归类型 - /// 递归深度 - /// 实体对象 - public static PhysioData SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioData.SelectSingle(id, recursiveType, recursiveDepth); - } - #endregion - } -} diff --git a/AIMSEntity/BLL/AutoGenerate/BPhysioDataConfig.cs b/AIMSEntity/BLL/AutoGenerate/BPhysioDataConfig.cs deleted file mode 100644 index 4a713a7..0000000 --- a/AIMSEntity/BLL/AutoGenerate/BPhysioDataConfig.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSBLL -{ - public partial class BPhysioDataConfig - { - #region 插入实体操作部份 - /// - /// 插入实体 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - public static int Insert(PhysioDataConfig physioDataConfig) - { - return DPhysioDataConfig.Insert(physioDataConfig); - } - #endregion - - #region 删除实体操作 - /// - /// 删除实体 - /// - /// 实体类对象 - /// 影响的记录行数 - public static int Delete(PhysioDataConfig physioDataConfig) - { - return DPhysioDataConfig.Delete(physioDataConfig); - } - /// - /// 根据对象查询语句删除 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Delete(string oql, ParameterList parameters) - { - return DPhysioDataConfig.Delete(oql,parameters); - } - #endregion - - #region 更新实体操作 - - /// - /// 更新实体 - /// - /// 实体类对象 - /// 影响的记录行数 - public static int Update(PhysioDataConfig physioDataConfig) - { - return DPhysioDataConfig.Update(physioDataConfig); - } - - /// - /// 根据对象查询语句更新实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Update(string oql, ParameterList parameters) - { - return DPhysioDataConfig.Update(oql,parameters); - } - #endregion - - #region 查询实体集合 - /// - /// \查询实体集合 - /// - /// 实体类对象集合 - public static List Select() - { - return DPhysioDataConfig.Select(); - } - /// - /// 递归查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioDataConfig.Select(recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters) - { - return DPhysioDataConfig.Select(oql, parameters); - } - - /// - /// 根据对象查询语句递归查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioDataConfig.Select(oql, parameters, recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - /// - /// 更据对象查询语句查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - public static PhysioDataConfig SelectSingle(string oql, ParameterList parameters) - { - return DPhysioDataConfig.SelectSingle(oql, parameters); - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - public static PhysioDataConfig SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioDataConfig.SelectSingle(oql, parameters, recursiveType, recursiveDepth); - } - - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 实体类对象 - public static PhysioDataConfig SelectSingle(int? id) - { - return DPhysioDataConfig.SelectSingle(id); - } - - /// - /// 更据主键递归查询单个实体 - /// - /// 递归类型 - /// 递归深度 - /// 实体对象 - public static PhysioDataConfig SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) - { - return DPhysioDataConfig.SelectSingle(id, recursiveType, recursiveDepth); - } - #endregion - } -} diff --git a/AIMSEntity/BLL/AutoGenerate/BPrintTemplate.cs b/AIMSEntity/BLL/AutoGenerate/BPrintTemplate.cs deleted file mode 100644 index e8cf808..0000000 --- a/AIMSEntity/BLL/AutoGenerate/BPrintTemplate.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSBLL -{ - public partial class BPrintTemplate - { - #region 插入实体操作部份 - /// - /// 插入实体 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - public static int Insert(PrintTemplate printTemplate) - { - return DPrintTemplate.Insert(printTemplate); - } - #endregion - - #region 删除实体操作 - /// - /// 根据对象查询语句删除 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Delete(string oql, ParameterList parameters) - { - return DPrintTemplate.Delete(oql,parameters); - } - #endregion - - #region 更新实体操作 - - /// - /// 根据对象查询语句更新实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Update(string oql, ParameterList parameters) - { - return DPrintTemplate.Update(oql,parameters); - } - #endregion - - #region 查询实体集合 - /// - /// \查询实体集合 - /// - /// 实体类对象集合 - public static List Select() - { - return DPrintTemplate.Select(); - } - /// - /// 递归查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(RecursiveType recursiveType, int recursiveDepth) - { - return DPrintTemplate.Select(recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters) - { - return DPrintTemplate.Select(oql, parameters); - } - - /// - /// 根据对象查询语句递归查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - return DPrintTemplate.Select(oql, parameters, recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - /// - /// 更据对象查询语句查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - public static PrintTemplate SelectSingle(string oql, ParameterList parameters) - { - return DPrintTemplate.SelectSingle(oql, parameters); - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - public static PrintTemplate SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return DPrintTemplate.SelectSingle(oql, parameters, recursiveType, recursiveDepth); - } - - #endregion - } -} diff --git a/AIMSEntity/OldEntity/BLL/BUseDrugsReport.cs b/AIMSEntity/BLL/AutoGenerate/BUseDrugsReport.cs similarity index 100% rename from AIMSEntity/OldEntity/BLL/BUseDrugsReport.cs rename to AIMSEntity/BLL/AutoGenerate/BUseDrugsReport.cs diff --git a/AIMSEntity/OldEntity/BLL/BUseDrugsReportManager.cs b/AIMSEntity/BLL/AutoGenerate/BUseDrugsReportManager.cs similarity index 100% rename from AIMSEntity/OldEntity/BLL/BUseDrugsReportManager.cs rename to AIMSEntity/BLL/AutoGenerate/BUseDrugsReportManager.cs diff --git a/AIMSEntity/BLL/AutoGenerate/BUserTempPurview.cs b/AIMSEntity/BLL/AutoGenerate/BUserTempPurview.cs deleted file mode 100644 index 53f821f..0000000 --- a/AIMSEntity/BLL/AutoGenerate/BUserTempPurview.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSBLL -{ - public partial class BUserTempPurview - { - #region 插入实体操作部份 - /// - /// 插入实体 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - public static int Insert(UserTempPurview userTempPurview) - { - return DUserTempPurview.Insert(userTempPurview); - } - #endregion - - #region 删除实体操作 - /// - /// 删除实体 - /// - /// 实体类对象 - /// 影响的记录行数 - public static int Delete(UserTempPurview userTempPurview) - { - return DUserTempPurview.Delete(userTempPurview); - } - /// - /// 根据对象查询语句删除 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Delete(string oql, ParameterList parameters) - { - return DUserTempPurview.Delete(oql,parameters); - } - #endregion - - #region 更新实体操作 - - /// - /// 更新实体 - /// - /// 实体类对象 - /// 影响的记录行数 - public static int Update(UserTempPurview userTempPurview) - { - return DUserTempPurview.Update(userTempPurview); - } - - /// - /// 根据对象查询语句更新实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - public static int Update(string oql, ParameterList parameters) - { - return DUserTempPurview.Update(oql,parameters); - } - #endregion - - #region 查询实体集合 - /// - /// \查询实体集合 - /// - /// 实体类对象集合 - public static List Select() - { - return DUserTempPurview.Select(); - } - /// - /// 递归查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(RecursiveType recursiveType, int recursiveDepth) - { - return DUserTempPurview.Select(recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters) - { - return DUserTempPurview.Select(oql, parameters); - } - - /// - /// 根据对象查询语句递归查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - public static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - return DUserTempPurview.Select(oql, parameters, recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - /// - /// 更据对象查询语句查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - public static UserTempPurview SelectSingle(string oql, ParameterList parameters) - { - return DUserTempPurview.SelectSingle(oql, parameters); - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - public static UserTempPurview SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return DUserTempPurview.SelectSingle(oql, parameters, recursiveType, recursiveDepth); - } - - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 实体类对象 - public static UserTempPurview SelectSingle(int? id) - { - return DUserTempPurview.SelectSingle(id); - } - - /// - /// 更据主键递归查询单个实体 - /// - /// 递归类型 - /// 递归深度 - /// 实体对象 - public static UserTempPurview SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) - { - return DUserTempPurview.SelectSingle(id, recursiveType, recursiveDepth); - } - #endregion - } -} diff --git a/AIMSEntity/BLL/Extension/BAnaesthesiaMethod.cs b/AIMSEntity/BLL/Extension/BAnaesthesiaMethod.cs index 492c4c3..aa4e1eb 100644 --- a/AIMSEntity/BLL/Extension/BAnaesthesiaMethod.cs +++ b/AIMSEntity/BLL/Extension/BAnaesthesiaMethod.cs @@ -4,9 +4,22 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BAnaesthesiaMethod - { + { + public static AnaesthesiaMethod GetModel(int Id) + { + return DAnaesthesiaMethod.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DAnaesthesiaMethod .GetDataTable(strWhere); + } } } diff --git a/AIMSEntity/BLL/Extension/BApplyAnaesthesiaMethod.cs b/AIMSEntity/BLL/Extension/BApplyAnaesthesiaMethod.cs index f3ba6b6..f0e3e19 100644 --- a/AIMSEntity/BLL/Extension/BApplyAnaesthesiaMethod.cs +++ b/AIMSEntity/BLL/Extension/BApplyAnaesthesiaMethod.cs @@ -4,9 +4,25 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BApplyAnaesthesiaMethod { + public static void Add(ApplyAnaesthesiaMethod ApplyAnaesthesiaMethodObj) + { + DApplyAnaesthesiaMethod.Add(ApplyAnaesthesiaMethodObj); + } + + public static void Delete(int OperationApplyId) + { + DApplyAnaesthesiaMethod.Delete(OperationApplyId); + } + public static List GetApplyAnaesthesiaMethodList(int OperationApplyId) + { + return DApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(OperationApplyId); + } } } diff --git a/AIMSEntity/BLL/Extension/BApplyDiagnoseInfo.cs b/AIMSEntity/BLL/Extension/BApplyDiagnoseInfo.cs index 2f70955..037565e 100644 --- a/AIMSEntity/BLL/Extension/BApplyDiagnoseInfo.cs +++ b/AIMSEntity/BLL/Extension/BApplyDiagnoseInfo.cs @@ -8,5 +8,18 @@ namespace AIMSBLL { public partial class BApplyDiagnoseInfo { + public static void Add(ApplyDiagnoseInfo ApplyDiagnoseInfoObj) + { + DApplyDiagnoseInfo.Add(ApplyDiagnoseInfoObj); + } + + public static void Delete(int OperationApplyId) + { + DApplyDiagnoseInfo.Delete(OperationApplyId); + } + public static List GetApplyDiagnoseIdList(int OperationApplyId) + { + return DApplyDiagnoseInfo.GetApplyDiagnoseIdList(OperationApplyId); + } } } diff --git a/AIMSEntity/BLL/Extension/BApplyOperationCutType.cs b/AIMSEntity/BLL/Extension/BApplyOperationCutType.cs index 77ea4e0..71c296c 100644 --- a/AIMSEntity/BLL/Extension/BApplyOperationCutType.cs +++ b/AIMSEntity/BLL/Extension/BApplyOperationCutType.cs @@ -8,5 +8,18 @@ namespace AIMSBLL { public partial class BApplyOperationCutType { + public static void Add(ApplyOperationCutType ApplyOperationCutTypeObj) + { + DApplyOperationCutType.Add(ApplyOperationCutTypeObj); + } + + public static void Delete(int OperationApplyId) + { + DApplyOperationCutType.Delete(OperationApplyId); + } + public static List GetApplyOperationCutTypeIdList(int OperationApplyId) + { + return DApplyOperationCutType.GetApplyOperationCutTypeIdList(OperationApplyId); + } } } diff --git a/AIMSEntity/BLL/Extension/BApplyOperationInfo.cs b/AIMSEntity/BLL/Extension/BApplyOperationInfo.cs index 5152588..1de326e 100644 --- a/AIMSEntity/BLL/Extension/BApplyOperationInfo.cs +++ b/AIMSEntity/BLL/Extension/BApplyOperationInfo.cs @@ -8,5 +8,18 @@ namespace AIMSBLL { public partial class BApplyOperationInfo { + public static void Add(ApplyOperationInfo ApplyOperationInfoObj) + { + DApplyOperationInfo.Add(ApplyOperationInfoObj); + } + + public static void Delete(int OperationApplyId) + { + DApplyOperationInfo.Delete(OperationApplyId); + } + public static List GetApplyOperationIdList(int OperationApplyId) + { + return DApplyOperationInfo.GetApplyOperationIdList(OperationApplyId); + } } } diff --git a/AIMSEntity/BLL/Extension/BApplyOperationPosition.cs b/AIMSEntity/BLL/Extension/BApplyOperationPosition.cs index 79c043c..68bcbfc 100644 --- a/AIMSEntity/BLL/Extension/BApplyOperationPosition.cs +++ b/AIMSEntity/BLL/Extension/BApplyOperationPosition.cs @@ -8,5 +8,18 @@ namespace AIMSBLL { public partial class BApplyOperationPosition { + public static void Add(ApplyOperationPosition ApplyOperationPositionObj) + { + DApplyOperationPosition.Add(ApplyOperationPositionObj); + } + + public static void Delete(int OperationApplyId) + { + DApplyOperationPosition.Delete(OperationApplyId); + } + public static List GetApplyOperationPositionIdList(int OperationApplyId) + { + return DApplyOperationPosition.GetApplyOperationPositionIdList(OperationApplyId); + } } } diff --git a/AIMSEntity/BLL/Extension/BApplyPersonDuty.cs b/AIMSEntity/BLL/Extension/BApplyPersonDuty.cs index f946101..bcd4a2e 100644 --- a/AIMSEntity/BLL/Extension/BApplyPersonDuty.cs +++ b/AIMSEntity/BLL/Extension/BApplyPersonDuty.cs @@ -4,9 +4,28 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BApplyPersonDuty { + public static int Add(ApplyPersonDuty ApplyPersonDutyObj) + { + return DApplyPersonDuty.Add(ApplyPersonDutyObj); + } + + public static void Delete(int OperationApplyId, int PersonDutyId) + { + DApplyPersonDuty.Delete(OperationApplyId, PersonDutyId); + } + public static List GetPersonIdList(int OperationApplyId, int PersonDutyId) + { + return DApplyPersonDuty.GetPersonIdList(OperationApplyId, PersonDutyId); + } + public static DataTable GetPersonDataTable(int OperationApplyId) + { + return DApplyPersonDuty.GetPersonDataTable(OperationApplyId); + } } } diff --git a/AIMSEntity/BLL/Extension/BBasicDictionary.cs b/AIMSEntity/BLL/Extension/BBasicDictionary.cs index 5e25c47..2272184 100644 --- a/AIMSEntity/BLL/Extension/BBasicDictionary.cs +++ b/AIMSEntity/BLL/Extension/BBasicDictionary.cs @@ -5,6 +5,8 @@ using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; using System.Data; +using System.Reflection; +using System.Windows.Forms; namespace AIMSBLL { @@ -49,5 +51,51 @@ namespace AIMSBLL DataTable dt = DBasicDictionary.GetBasicDictionaryByWhere(where); return dt; } + + + public static void Add(BasicDictionary BasicDictionaryObj) + { + try + { + DBasicDictionary.Add(BasicDictionaryObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + public static BasicDictionary GetModel(int Id) + { + return DBasicDictionary.GetModel(Id); + } + + public static List GetModelList(int ParentId) + { + return DBasicDictionary.GetModelList(ParentId); + } + public static List GetModelParentList() + { + return DBasicDictionary.GetModelParentList(); + } + + public static DataTable GetDataDictionaryDataTable(string strWhere) + { + return DBasicDictionary.GetDataDictionaryDataTable(strWhere); + } + public static DataTable GetDataDictionaryDataTable(int ParentId) + { + return DBasicDictionary.GetDataDictionaryDataTable(ParentId); + } + + public static DataTable GetDataDictionaryDataTableByParentName(string ParentName, string HelpCode) + { + return DBasicDictionary.GetDataDictionaryDataTableByParentName(ParentName, HelpCode); + } + public static DataTable GetDataDictionaryNameAndRemark(string ParentName, string HelpCode) + { + return DBasicDictionary.GetDataDictionaryNameAndRemark(ParentName, HelpCode); + } } } diff --git a/AIMSEntity/BLL/Extension/BDepartment.cs b/AIMSEntity/BLL/Extension/BDepartment.cs index 1c8af63..5dacb5f 100644 --- a/AIMSEntity/BLL/Extension/BDepartment.cs +++ b/AIMSEntity/BLL/Extension/BDepartment.cs @@ -4,9 +4,60 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BDepartment - { + { + public static void Add(Department DepartmentObj) + { + try + { + DDepartment.Add(DepartmentObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + //public static void Update(Department DepartmentObj) + //{ + // try + // { + // DDepartment.Update(DepartmentObj); + // MessageBox.Show("修改成功!"); + // } + // catch (Exception ex) + // { + // MessageBox.Show("修改失败!" + ex.Message); + // } + //} + + public static Department GetModel(int Id) + { + return DDepartment.GetModel(Id); + } + public static Department GetModelName(string Name) + { + return DDepartment.GetModelName(Name); + } + + public static DataTable GetDepartmentDataTable(string strWhere) + { + return DDepartment.GetDepartmentDataTable(strWhere); + } + public static List GetDepartmentAllList(string Kind) + { + return DDepartment.GetDepartmentAllList(Kind); + } + public static List GetDepartmentAllListBYSql(string Kind) + { + return DDepartment.GetDepartmentAllListBYSql(Kind); + } } } diff --git a/AIMSEntity/BLL/Extension/BDisease.cs b/AIMSEntity/BLL/Extension/BDisease.cs index f914a9c..e142256 100644 --- a/AIMSEntity/BLL/Extension/BDisease.cs +++ b/AIMSEntity/BLL/Extension/BDisease.cs @@ -4,9 +4,59 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BDisease { + + public static bool IsExit(string Name) + { + return DDisease.IsExit(Name); + } + public static void Add(Disease DiseaseObj) + { + try + { + DDisease.Add(DiseaseObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + //public static void Update(Disease DiseaseObj) + //{ + + // try + // { + // DDisease.Update(DiseaseObj); + // MessageBox.Show("修改成功!"); + // } + // catch (Exception ex) + // { + // MessageBox.Show("修改失败!" + ex.Message); + // } + //} + + public static Disease GetModel(int Id) + { + return DDisease.GetModel(Id); + } + + public static DataTable GetDataTable(string HelpCode) + { + return DDisease.GetDataTable(HelpCode); + } + + public static DataTable GetDataTable() + { + return DDisease.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BDosageKind.cs b/AIMSEntity/BLL/Extension/BDosageKind.cs index 6dc7c5b..591670b 100644 --- a/AIMSEntity/BLL/Extension/BDosageKind.cs +++ b/AIMSEntity/BLL/Extension/BDosageKind.cs @@ -4,9 +4,50 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BDosageKind { + public static void Add(DosageKind DosageKindObj) + { + try + { + DDosageKind.Add(DosageKindObj); + MessageBox.Show("增加成功!"); + + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + //public static void Update(DosageKind DosageKindObj) + //{ + // try + // { + // new DDosageKind.Update(DosageKindObj); + // MessageBox.Show("修改成功!"); + + // } + // catch (Exception ex) + // { + // MessageBox.Show("修改失败!" + ex.Message); + // } + //} + + public static DosageKind GetModel(int Id) + { + return DDosageKind.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DDosageKind.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BDosageUnit.cs b/AIMSEntity/BLL/Extension/BDosageUnit.cs index 1dceac0..9edfaac 100644 --- a/AIMSEntity/BLL/Extension/BDosageUnit.cs +++ b/AIMSEntity/BLL/Extension/BDosageUnit.cs @@ -4,9 +4,39 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BDosageUnit { + public static void Add(DosageUnit DosageUnitObj) + { + try + { + DDosageUnit.Add(DosageUnitObj); + MessageBox.Show("增加成功!"); + + } + catch (Exception ex) + { + MessageBox.Show("增加失败!"+ex.Message); + } + } + + public static DosageUnit GetModel(int Id) + { + return DDosageUnit.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DDosageUnit.GetDataTable(); + } + public static DataTable GetDataTable(int UnitType) + { + return DDosageUnit.GetDataTable(UnitType); + } } } diff --git a/AIMSEntity/BLL/Extension/BDrugKind.cs b/AIMSEntity/BLL/Extension/BDrugKind.cs index b080d88..3e216fa 100644 --- a/AIMSEntity/BLL/Extension/BDrugKind.cs +++ b/AIMSEntity/BLL/Extension/BDrugKind.cs @@ -4,9 +4,57 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BDrugKind { + public static void Add(DrugKind DrugKindObj) + { + try + { + DDrugKind.Add(DrugKindObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + //public static void Update(DrugKind DrugKindObj) + //{ + // try + // { + // new DDrugKind.Update(DrugKindObj); + // MessageBox.Show("修改成功!"); + + // } + // catch (Exception ex) + // { + // MessageBox.Show("修改失败!" + ex.Message); + // } + //} + + public static DrugKind GetModel(int Id) + { + return DDrugKind.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DDrugKind.GetDataTable(); + } + public static List GetModelList() + { + return DDrugKind.GetModelList(); + } + + public static DataTable GetDataTable(string MedicalItemKindId) + { + return DDrugKind.GetDataTable(MedicalItemKindId); + } } } diff --git a/AIMSEntity/BLL/Extension/BDrugManufacturer.cs b/AIMSEntity/BLL/Extension/BDrugManufacturer.cs index cc5858b..f0ecc4a 100644 --- a/AIMSEntity/BLL/Extension/BDrugManufacturer.cs +++ b/AIMSEntity/BLL/Extension/BDrugManufacturer.cs @@ -4,9 +4,52 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BDrugManufacturer { + public static void Add(DrugManufacturer DrugManufacturerObj) + { + try + { + DDrugManufacturer.Add(DrugManufacturerObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + //public static void Update(DrugManufacturer DrugManufacturerObj) + //{ + // try + // { + // new DDrugManufacturer.Update(DrugManufacturerObj); + // MessageBox.Show("修改成功!"); + // } + // catch (Exception ex) + // { + // MessageBox.Show(ex.Message + "修改失败!"); + // } + //} + + public static DrugManufacturer GetModel(int Id) + { + return DDrugManufacturer.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DDrugManufacturer.GetDataTable(); + } + public static DataTable GetDataTable(string HelpCode) + { + return DDrugManufacturer.GetDataTable(HelpCode); + } } } diff --git a/AIMSEntity/BLL/Extension/BDrugs.cs b/AIMSEntity/BLL/Extension/BDrugs.cs index 10be2e0..2e2d432 100644 --- a/AIMSEntity/BLL/Extension/BDrugs.cs +++ b/AIMSEntity/BLL/Extension/BDrugs.cs @@ -6,6 +6,7 @@ using System.Collections; using System.Collections.Generic; using System.Data; using HelperDB; +using System.Windows.Forms; namespace AIMSBLL { @@ -43,6 +44,42 @@ namespace AIMSBLL return DBHelper.GetDataTable(sql); } } + public static void Add(Drugs DrugsObj) + { + try + { + DDrugs.Add(DrugsObj); + MessageBox.Show("药品增加成功!"); + } + catch + { + MessageBox.Show("药品增加失败!"); + } + } + + public static Drugs GetModel(int Id) + { + return DDrugs.GetModel(Id); + } + + public static DataTable GetDataTable(string DrugKind) + { + return DDrugs.GetDataTable(DrugKind); + } + public static DataTable GetDosageUnitDataTable(int UnitType) + { + return DDrugs.GetDosageUnitDataTable(UnitType); + } + + public static DataTable GetDataTableByHelpCode(string HelpCode) + { + return DDrugs.GetDataTableByHelpCode(HelpCode); + } + + public static DataTable GetDrugsDataTable() + { + return DDrugs.GetDrugsDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BEvents.cs b/AIMSEntity/BLL/Extension/BEvents.cs index 8f59f0b..eb9c3a8 100644 --- a/AIMSEntity/BLL/Extension/BEvents.cs +++ b/AIMSEntity/BLL/Extension/BEvents.cs @@ -44,6 +44,47 @@ namespace AIMSBLL throw ex; } } + public static bool IsExit(string Name) + { + return DEvents.IsExit(Name); + } + public static void Add(Events EventsObj) + { + DEvents.Add(EventsObj); + } + + public static void UpdateUseRate(int Id) + { + DEvents.UpdateUseRate(Id); + } + + public static void Delete(int Id) + { + DEvents.Delete(Id); + } + + public static Events GetModel(int Id) + { + return DEvents.GetModel(Id); + } + public static Events GetModelByName(string Name) + { + return DEvents.GetModelByName(Name); + } + public static DataTable GetDataTable(string HelpCode) + { + return DEvents.GetDataTable(HelpCode); + } + + public static DataTable GetEventDataTable() + { + return DEvents.GetEventDataTable(); + } + + public static DataTable GetDataTable() + { + return DEvents.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BFactAnaesthesiaMethod.cs b/AIMSEntity/BLL/Extension/BFactAnaesthesiaMethod.cs index 8e6dce6..a6d5a01 100644 --- a/AIMSEntity/BLL/Extension/BFactAnaesthesiaMethod.cs +++ b/AIMSEntity/BLL/Extension/BFactAnaesthesiaMethod.cs @@ -4,9 +4,41 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BFactAnaesthesiaMethod { + public static void Add(FactAnaesthesiaMethod FactAnaesthesiaMethodObj) + { + DFactAnaesthesiaMethod.Add(FactAnaesthesiaMethodObj); + } + + //public static void Update(FactAnaesthesiaMethod FactAnaesthesiaMethodObj) + //{ + // DFactAnaesthesiaMethod.Update(FactAnaesthesiaMethodObj); + //} + + + public static void Delete(int PatientId) + { + DFactAnaesthesiaMethod.Delete(PatientId); + } + + public static FactAnaesthesiaMethod GetModel(int Id) + { + return DFactAnaesthesiaMethod.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DFactAnaesthesiaMethod.GetDataTable(strWhere); + } + + public static List GetFactAnaesthesiaMethodIdList(int PatientId) + { + return DFactAnaesthesiaMethod.GetFactAnaesthesiaMethodIdList(PatientId); + } } } diff --git a/AIMSEntity/BLL/Extension/BFactDiagnoseInfo.cs b/AIMSEntity/BLL/Extension/BFactDiagnoseInfo.cs index d78ddb0..86905fd 100644 --- a/AIMSEntity/BLL/Extension/BFactDiagnoseInfo.cs +++ b/AIMSEntity/BLL/Extension/BFactDiagnoseInfo.cs @@ -4,9 +4,36 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BFactDiagnoseInfo { + public static void Add(FactDiagnoseInfo FactDiagnoseInfoObj) + { + DFactDiagnoseInfo.Add(FactDiagnoseInfoObj); + } + + public static void Delete(int PatientId) + { + DFactDiagnoseInfo.Delete(PatientId); + } + + public static FactDiagnoseInfo GetModel(int Id) + { + return DFactDiagnoseInfo.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DFactDiagnoseInfo.GetDataTable(strWhere); + } + + public static List GetFactDiagnoseInfoIdList(int PatientId) + { + return DFactDiagnoseInfo.GetFactDiagnoseInfoIdList(PatientId); + } + } } diff --git a/AIMSEntity/BLL/Extension/BFactOperationBodyPosition.cs b/AIMSEntity/BLL/Extension/BFactOperationBodyPosition.cs index c37e829..37a2a0c 100644 --- a/AIMSEntity/BLL/Extension/BFactOperationBodyPosition.cs +++ b/AIMSEntity/BLL/Extension/BFactOperationBodyPosition.cs @@ -4,9 +4,34 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BFactOperationBodyPosition { + public static void Add(FactOperationBodyPosition FactOperationBodyPositionObj) + { + DFactOperationBodyPosition.Add(FactOperationBodyPositionObj); + } + + public static void Delete(int PatientId) + { + DFactOperationBodyPosition.Delete(PatientId); + } + + public static FactOperationBodyPosition GetModel(int Id) + { + return DFactOperationBodyPosition.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DFactOperationBodyPosition.GetDataTable(strWhere); + } + public static List GetFactOperationBodyPositionIdList(int PatientId) + { + return DFactOperationBodyPosition.GetFactOperationBodyPositionIdList(PatientId); + } } } diff --git a/AIMSEntity/BLL/Extension/BFactOperationCutType.cs b/AIMSEntity/BLL/Extension/BFactOperationCutType.cs index 01318bf..74d8c68 100644 --- a/AIMSEntity/BLL/Extension/BFactOperationCutType.cs +++ b/AIMSEntity/BLL/Extension/BFactOperationCutType.cs @@ -4,9 +4,31 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BFactOperationCutType { + public static void Add(FactOperationCutType FactOperationCutTypeObj) + { + DFactOperationCutType.Add(FactOperationCutTypeObj); + } + public static void Delete(int PatientId) + { + DFactOperationCutType.Delete(PatientId); + } + public static FactOperationCutType GetModel(int Id) + { + return DFactOperationCutType.GetModel(Id); + } + public static DataTable GetDataTable(string strWhere) + { + return DFactOperationCutType.GetDataTable(strWhere); + } + public static List GetFactOperationCutTypeIdList(int PatientId) + { + return DFactOperationCutType.GetFactOperationCutTypeIdList(PatientId); + } } } diff --git a/AIMSEntity/BLL/Extension/BFactOperationInfo.cs b/AIMSEntity/BLL/Extension/BFactOperationInfo.cs index 306ffe7..047d5c7 100644 --- a/AIMSEntity/BLL/Extension/BFactOperationInfo.cs +++ b/AIMSEntity/BLL/Extension/BFactOperationInfo.cs @@ -4,9 +4,36 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BFactOperationInfo { + public static void Add(FactOperationInfo FactOperationInfoObj) + { + DFactOperationInfo.Add(FactOperationInfoObj); + } + + public static void Delete(int PatientId) + { + DFactOperationInfo.Delete(PatientId); + } + + public static FactOperationInfo GetModel(int Id) + { + return DFactOperationInfo.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DFactOperationInfo.GetDataTable(strWhere); + } + public static List GetFactOperationInfoIdList(int PatientId) + { + return DFactOperationInfo.GetFactOperationInfoIdList(PatientId); + } } } diff --git a/AIMSEntity/BLL/Extension/BFactOperationPosition.cs b/AIMSEntity/BLL/Extension/BFactOperationPosition.cs index 5e44778..5a0f317 100644 --- a/AIMSEntity/BLL/Extension/BFactOperationPosition.cs +++ b/AIMSEntity/BLL/Extension/BFactOperationPosition.cs @@ -4,9 +4,31 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BFactOperationPosition { + public static void Add(FactOperationPosition FactOperationPositionObj) + { + DFactOperationPosition.Add(FactOperationPositionObj); + } + public static void Delete(int PatientId) + { + DFactOperationPosition.Delete(PatientId); + } + public static FactOperationPosition GetModel(int Id) + { + return DFactOperationPosition.GetModel(Id); + } + public static DataTable GetDataTable(string strWhere) + { + return DFactOperationPosition.GetDataTable(strWhere); + } + public static List GetFactOperationPositionIdList(int PatientId) + { + return DFactOperationPosition.GetFactOperationPositionIdList(PatientId); + } } } diff --git a/AIMSEntity/BLL/Extension/BFactPersonDuty.cs b/AIMSEntity/BLL/Extension/BFactPersonDuty.cs index 4dc596f..5c300dd 100644 --- a/AIMSEntity/BLL/Extension/BFactPersonDuty.cs +++ b/AIMSEntity/BLL/Extension/BFactPersonDuty.cs @@ -4,9 +4,34 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BFactPersonDuty { + public static void Add(FactPersonDuty FactPersonDutyObj) + { + DFactPersonDuty.Add(FactPersonDutyObj); + } + + public static void Delete(int PatientId, int PersonDutyId) + { + DFactPersonDuty.Delete(PatientId, PersonDutyId); + } + + public static FactPersonDuty GetModel(int Id) + { + return DFactPersonDuty.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DFactPersonDuty.GetDataTable(strWhere); + } + public static List GetPersonIdList(int PatientId, int PersonDutyId) + { + return DFactPersonDuty.GetPersonIdList(PatientId, PersonDutyId); + } } } diff --git a/AIMSEntity/BLL/Extension/BMedicalDict.cs b/AIMSEntity/BLL/Extension/BMedicalDict.cs index 7f24cd1..84e696f 100644 --- a/AIMSEntity/BLL/Extension/BMedicalDict.cs +++ b/AIMSEntity/BLL/Extension/BMedicalDict.cs @@ -4,9 +4,44 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BMedicalDict { + public static void Add(MedicalDict MedicalDictObj) + { + try + { + DMedicalDict.Add(MedicalDictObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!"+ex.Message); + } + } + + + public static MedicalDict GetModel(int Id) + { + return DMedicalDict.GetModel(Id); + } + + public static DataTable GetDataTable(int DrugKindId) + { + return DMedicalDict.GetDataTable(DrugKindId); + } + public static DataTable GetDataTableByName(string Name) + { + return DMedicalDict.GetDataTableByName(Name); + } + + public static bool Exists(string No) + { + return DMedicalDict.Exists(No); + } } } diff --git a/AIMSEntity/BLL/Extension/BMedicalItem.cs b/AIMSEntity/BLL/Extension/BMedicalItem.cs index ff10ed8..8092e84 100644 --- a/AIMSEntity/BLL/Extension/BMedicalItem.cs +++ b/AIMSEntity/BLL/Extension/BMedicalItem.cs @@ -4,9 +4,52 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BMedicalItem { + public static bool Exists(string No) + { + return DMedicalItem.Exists(No); + } + + public static void Add(MedicalItem MedicalItemObj) + { + try + { + DMedicalItem.Add(MedicalItemObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!"+ex.Message); + } + } + + public static MedicalItem GetModel(int Id) + { + return DMedicalItem.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DMedicalItem.GetDataTable(); + } + public static DataTable GetMedicalItemDrugDataTable(string HelpCode, int IsValid) + { + return DMedicalItem.GetMedicalItemDrugDataTable(HelpCode, IsValid); + } + public static DataTable GetMedicalItemByDrugKindId(int DrugKindId) + { + return DMedicalItem.GetMedicalItemByDrugKindId(DrugKindId); + } + public static int GetMedicalItemByDictNo(string MedicalDictNo) + { + return DMedicalItem.GetMedicalItemByDictNo(MedicalDictNo); + } + } } diff --git a/AIMSEntity/BLL/Extension/BMedicalItemKind.cs b/AIMSEntity/BLL/Extension/BMedicalItemKind.cs index 6fd78ad..eb9e460 100644 --- a/AIMSEntity/BLL/Extension/BMedicalItemKind.cs +++ b/AIMSEntity/BLL/Extension/BMedicalItemKind.cs @@ -4,9 +4,39 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BMedicalItemKind { + public static void Add(MedicalItemKind MedicalItemKindObj) + { + try + { + DMedicalItemKind.Add(MedicalItemKindObj); + } + catch (Exception ex) + { + MessageBox.Show("增加成功!" + ex.Message); + } + } + + + public static MedicalItemKind GetModel(int Id) + { + return DMedicalItemKind.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DMedicalItemKind.GetDataTable(); + } + public static DataTable GetTreeViewDataTable() + { + return DMedicalItemKind.GetTreeViewDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BMedicamentPrice.cs b/AIMSEntity/BLL/Extension/BMedicamentPrice.cs index 0ce100d..ffebb0d 100644 --- a/AIMSEntity/BLL/Extension/BMedicamentPrice.cs +++ b/AIMSEntity/BLL/Extension/BMedicamentPrice.cs @@ -4,9 +4,41 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BMedicamentPrice { + public static bool Exists(int Id) + { + return DMedicamentPrice.Exists(Id); + } + + public static void Add(MedicamentPrice MedicamentPriceObj) + { + try + { + DMedicamentPrice.Add(MedicamentPriceObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("修改失败!" + ex.Message); + } + } + + public static MedicamentPrice GetModel(int Id) + { + return DMedicamentPrice.GetModel(Id); + } + + + public static DataTable GetDataTable(int MedicalItemId) + { + return DMedicamentPrice.GetDataTable(MedicalItemId); + } } } diff --git a/AIMSEntity/BLL/Extension/BMenu.cs b/AIMSEntity/BLL/Extension/BMenu.cs index 3f1199f..2f716dd 100644 --- a/AIMSEntity/BLL/Extension/BMenu.cs +++ b/AIMSEntity/BLL/Extension/BMenu.cs @@ -4,9 +4,100 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BMenu { + public static void Add(AIMSModel.Menu MenuObj) + { + try + { + DMenu.Add(MenuObj); + MessageBox.Show("增加成功!"); + + } + catch (Exception ex) + { + MessageBox.Show("增加失败!"+ex.Message); + } + + } + public static void Delete(int Id) + { + try + { + DMenu.Delete(Id); + MessageBox.Show("删除成功!"); + + } + catch (Exception ex) + { + MessageBox.Show("删除失败!"+ex.Message); + } + } + public static AIMSModel.Menu GetModel(int Id) + { + return DMenu.GetModel(Id); + } + public static DataTable GetDateTable(string strWhere) + { + return DMenu.GetDateTable(strWhere); + } + + public static List GetModelList() + { + return DMenu.GetModelList(); + } + public static List GetModelList_FSB(int RoleId) + { + return DMenu.GetModelList_FSB(RoleId); + } + + public static List GetMenuRootList(int ParentId) + { + + return DMenu.GetMenuRootList(ParentId); + } + public static List GetMenuRootList(int RoleId, int ParentId) + { + return DMenu.GetMenuRootList(RoleId,ParentId); + } + public static List GetMenuRootListManage(int RoleId, string ParentId) + { + return DMenu.GetMenuRootListManage(RoleId,ParentId); + } + public static List GetMenuRootListManage(int RoleId) + { + return DMenu.GetMenuRootListManage(RoleId); + } + public static AIMSModel.Menu GetMenuById(int Id, int RoleId, int IsAll) + { + + return DMenu.GetMenuById(Id, RoleId,IsAll); + } + public static AIMSModel.Menu GetMenuByName(string name) + { + + return DMenu.GetMenuByName(name); + } + + public List GetChildren(AIMSModel.Menu Menu, int RoleId,int IsAll) + { + + return DMenu.GetChildren( Menu, RoleId, IsAll); + } + + public static AIMSModel.Menu GetPathByName(string Name) + { + return DMenu.GetPathByName(Name); + } + + public static DataTable GetMenuDataTable(int ParentId, int RoleId) + { + return DMenu.GetMenuDataTable(ParentId, RoleId); + } } } diff --git a/AIMSEntity/BLL/Extension/BNotice.cs b/AIMSEntity/BLL/Extension/BNotice.cs index 67801da..0e5528f 100644 --- a/AIMSEntity/BLL/Extension/BNotice.cs +++ b/AIMSEntity/BLL/Extension/BNotice.cs @@ -4,9 +4,38 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BNotice { + public static DataTable GetOperationList() + { + return DNotice.GetOperationList(); + } + public static DataTable GetOperation() + { + return DNotice.GetOperation(); + } + public static void Add(Notice NoticeObj) + { + DNotice.Add(NoticeObj); + } + public static void Delete(int Id) + { + DNotice.Delete(Id); + } + public static void sendout(Notice NoticeObj) + { + DNotice.sendout(NoticeObj); + } + + public static List HistoryNoticeData() + { + return DNotice.HistoryNoticeData(); + } } } diff --git a/AIMSEntity/BLL/Extension/BNoticeTemplate.cs b/AIMSEntity/BLL/Extension/BNoticeTemplate.cs index 27b7870..3fb9d5e 100644 --- a/AIMSEntity/BLL/Extension/BNoticeTemplate.cs +++ b/AIMSEntity/BLL/Extension/BNoticeTemplate.cs @@ -4,9 +4,20 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BNoticeTemplate { + /// + /// 查询NoticeTemplate所有的内容 + /// + /// + public static DataTable GetNoticeTemplate() + { + return DNoticeTemplate.GetNoticeTemplate(); + } + } } diff --git a/AIMSEntity/BLL/Extension/BOperation.cs b/AIMSEntity/BLL/Extension/BOperation.cs index 7dfe770..2675dca 100644 --- a/AIMSEntity/BLL/Extension/BOperation.cs +++ b/AIMSEntity/BLL/Extension/BOperation.cs @@ -4,9 +4,43 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BOperation { + public static bool IsExit(string Name) + { + return DOperation.IsExit(Name); + } + public static void Add(Operation OperationObj) + { + try + { + DOperation.Add(OperationObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + public static Operation GetModel(int Id) + { + return DOperation.GetModel(Id); + } + + public static DataTable GetDataTable(string HelpCode) + { + return DOperation.GetDataTable(HelpCode); + } + + public static DataTable GetDataTable() + { + return DOperation.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BOperationApply.cs b/AIMSEntity/BLL/Extension/BOperationApply.cs index e87a242..2faf39d 100644 --- a/AIMSEntity/BLL/Extension/BOperationApply.cs +++ b/AIMSEntity/BLL/Extension/BOperationApply.cs @@ -4,10 +4,117 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BOperationApply { + public static void Add(OperationApply OperationApplyObj) + { + DOperationApply.Add(OperationApplyObj); + } + + //public static void Update(OperationApply OperationApplyObj) + //{ + // DOperationApply.Update(OperationApplyObj); + //} + public static void UpdatePlanOrder(int ApplyId, int PlanOrder) + { + DOperationApply.UpdatePlanOrder(ApplyId, PlanOrder); + } + public static void UpdateOperationRoom(int ApplyId, int OperationRoomId, int MaxPlanOrder) + { + DOperationApply.UpdateOperationRoom(ApplyId, OperationRoomId, MaxPlanOrder); + } + public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel, int IsFasting) + { + DOperationApply.UpdateASA(ApplyId, ASA, HeartFunctionLevel, IsFasting); + } + public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel) + { + DOperationApply.UpdateASA(ApplyId, ASA, HeartFunctionLevel); + } + public static int GetMaxPlanOrder(DateTime PlanOperationTime, int OperationRoomId) + { + return DOperationApply.GetMaxPlanOrder(PlanOperationTime, OperationRoomId); + } + + public static OperationApply GetModel(int Id) + { + return DOperationApply.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DOperationApply.GetDataTable(strWhere); + } + public static int GetOperationApplyMaxId() + { + return DOperationApply.GetOperationApplyMaxId(); + } + public static DataTable GetOperationFrontDataTableByPatientId(int PatientId) + { + return DOperationApply.GetOperationFrontDataTableByPatientId(PatientId); + } + public static DataTable GetOperationFrontDataTable(string BegInData, string EndData) + { + return DOperationApply.GetOperationFrontDataTable(BegInData, EndData); + } + public static DataTable GetOperationFrontDataTableByPlanOperationTime(string BegInData, string EndData) + { + return DOperationApply.GetOperationFrontDataTableByPlanOperationTime(BegInData, EndData); + } + public static void UpdateVerifyTime(int ApplyId, string VerifyTime, string VerifyOperatorNo) + { + DOperationApply.UpdateVerifyTime(ApplyId, VerifyTime, VerifyOperatorNo); + } + public static void UpdateApplyState(int ApplyId, int State) + { + DOperationApply.UpdateApplyState(ApplyId, State); + } + public static void UpdateApplyRoom(int ApplyId, int room) + { + DOperationApply.UpdateApplyRoom(ApplyId, room); + } + public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State) + { + DOperationApply.UpdatePlanOperationTime(ApplyId, PlanOperationTime, OperationRoomId, State); + } + public static void UpdateStopOperation(int ApplyId, string Content) + { + DOperationApply.UpdateStopOperation(ApplyId, Content); + } + public static DataTable GetOperationFrontByApplyId(List ApplyIdList) + { + return DOperationApply.GetOperationFrontByApplyId(ApplyIdList); + } + /// + /// 排程手术小卡片数据集 + /// + /// + /// + /// + public static DataTable GetOperationRoomDataTable(DateTime PlanOperationTime, int OperationRoomId) + { + return DOperationApply.GetOperationRoomDataTable(PlanOperationTime, OperationRoomId); + } + public static DataTable GetPlanOperationDataTable(DateTime PlanOperationTime, int OperationRoomId) + { + return DOperationApply.GetPlanOperationDataTable(PlanOperationTime, OperationRoomId); + } + + public static void UpdateOperationRoom(int ApplyId, int OperationRoomId) + { + DOperationApply.UpdateOperationRoom(ApplyId, OperationRoomId); + } + + public static DataTable SelectPlanedOpeByRoom(string whereSql) + { + return DOperationApply.SelectPlanedOpeByRoom(whereSql); + } public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom) { return DOperationApply.SaveDoctorByRommTime(DoctorNuresName, SearchTime, CurrentRoom); diff --git a/AIMSEntity/BLL/Extension/BOperationBodyPosition.cs b/AIMSEntity/BLL/Extension/BOperationBodyPosition.cs index 4db9398..d91aad2 100644 --- a/AIMSEntity/BLL/Extension/BOperationBodyPosition.cs +++ b/AIMSEntity/BLL/Extension/BOperationBodyPosition.cs @@ -4,9 +4,26 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BOperationBodyPosition { + public static void Add(OperationBodyPosition OperationBodyPosition) + { + DOperationBodyPosition.Add(OperationBodyPosition); + + } + + public static OperationBodyPosition GetModel(int Id) + { + return DOperationBodyPosition.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DOperationBodyPosition.GetDataTable(strWhere); + } } } diff --git a/AIMSEntity/BLL/Extension/BOperationCutType.cs b/AIMSEntity/BLL/Extension/BOperationCutType.cs index 950dd94..59e57ff 100644 --- a/AIMSEntity/BLL/Extension/BOperationCutType.cs +++ b/AIMSEntity/BLL/Extension/BOperationCutType.cs @@ -4,9 +4,35 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BOperationCutType { + public static void Add(OperationCutType OperationCutTypeObj) + { + try + { + DOperationCutType.Add(OperationCutTypeObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!"+ex.Message); + } + } + + + public static OperationCutType GetModel(int Id) + { + return DOperationCutType.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DOperationCutType.GetDataTable(strWhere); + } } } diff --git a/AIMSEntity/BLL/Extension/BOperationLevel.cs b/AIMSEntity/BLL/Extension/BOperationLevel.cs index 002ca0d..71d2785 100644 --- a/AIMSEntity/BLL/Extension/BOperationLevel.cs +++ b/AIMSEntity/BLL/Extension/BOperationLevel.cs @@ -4,9 +4,34 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BOperationLevel { + public static void Add(OperationLevel OperationLevelObj) + { + try + { + DOperationLevel.Add(OperationLevelObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加成功!"+ex.Message); + } + } + + public static OperationLevel GetModel(int Id) + { + return DOperationLevel.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DOperationLevel.GetDataTable(strWhere); + } } } diff --git a/AIMSEntity/BLL/Extension/BOperationPosition.cs b/AIMSEntity/BLL/Extension/BOperationPosition.cs index 992d705..37945ec 100644 --- a/AIMSEntity/BLL/Extension/BOperationPosition.cs +++ b/AIMSEntity/BLL/Extension/BOperationPosition.cs @@ -4,9 +4,34 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BOperationPosition { + public static void Add(OperationPosition OperationPositionObj) + { + try + { + DOperationPosition.Add(OperationPositionObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + public static OperationPosition GetModel(int Id) + { + return DOperationPosition.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DOperationPosition.GetDataTable(strWhere); + } } } diff --git a/AIMSEntity/BLL/Extension/BOperationRecord.cs b/AIMSEntity/BLL/Extension/BOperationRecord.cs index 6aa9403..2668dc0 100644 --- a/AIMSEntity/BLL/Extension/BOperationRecord.cs +++ b/AIMSEntity/BLL/Extension/BOperationRecord.cs @@ -8,11 +8,89 @@ using System.Data; using HelperDB; using AIMSExtension; using System.Data.SqlClient; +using System.Reflection; +using System.Windows.Forms; namespace AIMSBLL { public partial class BOperationRecord { + public static int AddTitleTime(int PatientId, int ApplyId, int RecoverId, string TableColumnName, DateTime Time, int RoomId) + { + return DOperationRecord.AddTitleTime(PatientId, ApplyId, RecoverId, TableColumnName, Time, RoomId); + } + + public static TitleTime GetTitleTime(int PatientId, int RecoverId) + { + return DOperationRecord.GetTitleTime(PatientId, RecoverId); + } + public static void UpdateState(int PatientId, int TypeId, int State) + { + DOperationRecord.UpdateState(PatientId, TypeId, State); + } + public static void DeleteOperationRecordData(int RecorId, int PatientId, int TypeId) + { + DOperationRecord.DeleteOperationRecordData(RecorId, PatientId, TypeId); + } + public static void DeleteOperationRecorvreData(int PatientId, int TypeId) + { + DOperationRecord.DeleteOperationRecorvreData(PatientId, TypeId); + } + public static void DeleteEvent(int PatientId, int eventId) + { + DOperationRecord.DeleteEvent(PatientId, eventId); + } + public static DataTable GetOperationDoingDataTableByPatientId(int PatientId, int TypeId) + { + return DOperationRecord.GetOperationDoingMainInfo(PatientId, TypeId); + } + public static bool ValidInput(int PatientId, int TypeId) + { + + bool result = false; + DataTable dt = DOperationRecord.GetOperationDoingMainInfo(PatientId, TypeId); + if (dt.Rows[0]["InRoomTime"].ToString().Length < 1) + { + MessageBox.Show("入室不能为空!"); + } + else if (dt.Rows[0]["OutRoomTime"].ToString().Length < 1) + { + MessageBox.Show("出室不能为空!"); + } + else if (dt.Rows[0]["OperationBeginTime"].ToString().Length < 1) + { + MessageBox.Show("手术开始时间不能为空!"); + } + else if (dt.Rows[0]["OperationEndTime"].ToString().Length < 1) + { + MessageBox.Show("手术结束时间不能为空!"); + } + else if (dt.Rows[0]["DiagnoseInfoName"].ToString().Length < 1) + { + MessageBox.Show("术后诊断不能为空!"); + } + else if (dt.Rows[0]["OperationInfoName"].ToString().Length < 1) + { + MessageBox.Show("实施手术不能为空!"); + } + else if (dt.Rows[0]["AnaesthesiaMethodName"].ToString().Length < 1) + { + MessageBox.Show("麻醉方式不能为空!"); + } + else if (dt.Rows[0]["OperationDoctor"].ToString().Length < 1) + { + MessageBox.Show("手术医生不能为空!"); + } + else if (dt.Rows[0]["AnesthesiaDoctor"].ToString().Length < 1) + { + MessageBox.Show("麻醉医生不能为空!"); + } + else + { + result = true; + } + return result; + } /// /// 得到手术的最大时间点 @@ -61,7 +139,7 @@ namespace AIMSBLL } } } - } + } return dt; } @@ -88,5 +166,25 @@ namespace AIMSBLL } } } + + + public static DateTime GetMaxTime(int PatientId, int Type) + { + return DOperationRecord.GetMaxTime(PatientId, Type); + } + public static int GetDataCount(int RecorId, int PatientId, int Type) + { + return DOperationRecord.GetDataCount(RecorId, PatientId, Type); + } + + public static DataTable FillDrugData(int PatientId, int DrugTypeId) + { + return DOperationRecord.FillDrugData(PatientId, DrugTypeId); + } + + public static DataTable FillOutFluid(int PatientId, int DrugTypeId) + { + return DOperationRecord.FillOutFluid(PatientId, DrugTypeId); + } } } diff --git a/AIMSEntity/BLL/Extension/BOperationRoom.cs b/AIMSEntity/BLL/Extension/BOperationRoom.cs index dcc7003..1093229 100644 --- a/AIMSEntity/BLL/Extension/BOperationRoom.cs +++ b/AIMSEntity/BLL/Extension/BOperationRoom.cs @@ -4,9 +4,34 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BOperationRoom { + public static void Add(OperationRoom OperationRoomObj) + { + DOperationRoom.Add(OperationRoomObj); + } + + + public static OperationRoom GetModel(int Id) + { + return DOperationRoom.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DOperationRoom.GetDataTable(strWhere); + } + public static List GetOperationRooms(string strWhere) + { + return DOperationRoom.GetOperationRooms(strWhere); + } + public static int GetOperationRoomIdByName(string Name) + { + return DOperationRoom.GetOperationRoomIdByName(Name); + } } } diff --git a/AIMSEntity/BLL/Extension/BOperationTemplate.cs b/AIMSEntity/BLL/Extension/BOperationTemplate.cs index e9582c7..f0fb4df 100644 --- a/AIMSEntity/BLL/Extension/BOperationTemplate.cs +++ b/AIMSEntity/BLL/Extension/BOperationTemplate.cs @@ -4,9 +4,269 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using DrawGraph; + namespace AIMSBLL { public partial class BOperationTemplate { + public static bool Exists(string TemplateName, int TypeId) + { + return DOperationTemplate.Exists(TemplateName, TypeId); + } + public static void Add(DateTime InRoomTime, string TemplateName, int PatientId, int TypeId, int IsPublic) + { + //药品 + DataTable Drugdt = BFactDrug.GetDataTable(PatientId, TypeId); + for (int i = 0; i < Drugdt.Rows.Count; i++) + { + OperationTemplate OperationTemplateDrugObj = new OperationTemplate(); + int DrugId = int.Parse(Drugdt.Rows[i]["DrugId"].ToString()); + if (BFactDrug.IsValid(DrugId)) + { + OperationTemplateDrugObj.TemplateName = TemplateName; + OperationTemplateDrugObj.TypeId = TypeId; + OperationTemplateDrugObj.ItemKindName = "药品"; + OperationTemplateDrugObj.InRoomTime = InRoomTime; + OperationTemplateDrugObj.ItemId = DrugId; + OperationTemplateDrugObj.Value = decimal.Parse(Drugdt.Rows[i]["Dosage"].ToString()); + OperationTemplateDrugObj.BeginTime = DateTime.Parse(Drugdt.Rows[i]["DrugBeginTime"].ToString()); + OperationTemplateDrugObj.EndTime = DateTime.Parse(Drugdt.Rows[i]["DrugEndTime"].ToString()); + OperationTemplateDrugObj.DosageUnit = Drugdt.Rows[i]["DosageUnit"].ToString(); + OperationTemplateDrugObj.DrugChannel = Drugdt.Rows[i]["DrugChannel"].ToString(); + OperationTemplateDrugObj.GiveDrugType = Drugdt.Rows[i]["GiveDrugType"].ToString(); + OperationTemplateDrugObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + OperationTemplateDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + OperationTemplateDrugObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + OperationTemplateDrugObj.IsPublic = IsPublic; + OperationTemplateDrugObj.Spare1 = Drugdt.Rows[i]["Density"].ToString(); + OperationTemplateDrugObj.Spare2 = Drugdt.Rows[i]["DensityUnit"].ToString(); + OperationTemplateDrugObj.Spare3 = Drugdt.Rows[i]["Velocity"].ToString(); + OperationTemplateDrugObj.Spare4 = Drugdt.Rows[i]["VelocityUnit"].ToString(); + Add(OperationTemplateDrugObj); + } + + } + //事件 + + DataTable Eventdt = BFactEvents.GetDataTable(PatientId, TypeId); + for (int i = 0; i < Eventdt.Rows.Count; i++) + { + OperationTemplate OperationTemplateEventObj = new OperationTemplate(); + int EventId = int.Parse(Eventdt.Rows[i]["EventId"].ToString()); + if (BFactEvents.IsValid(EventId)) + { + OperationTemplateEventObj.TemplateName = TemplateName; + OperationTemplateEventObj.TypeId = TypeId; + OperationTemplateEventObj.ItemKindName = "事件"; + OperationTemplateEventObj.InRoomTime = InRoomTime; + OperationTemplateEventObj.ItemId = EventId; + OperationTemplateEventObj.BeginTime = DateTime.Parse(Eventdt.Rows[i]["EventBeginTime"].ToString()); + OperationTemplateEventObj.EndTime = DateTime.Parse(Eventdt.Rows[i]["EventEndTime"].ToString()); + OperationTemplateEventObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + OperationTemplateEventObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + OperationTemplateEventObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + OperationTemplateEventObj.IsPublic = IsPublic; + Add(OperationTemplateEventObj); + } + } + //出量 + DataTable OutputLiquidsdt = BFactOutputLiquids.GetDataTable(PatientId, TypeId); + for (int i = 0; i < OutputLiquidsdt.Rows.Count; i++) + { + OperationTemplate OperationTemplateOutputLiquidsObj = new OperationTemplate(); + int OutputLiquidsId = int.Parse(OutputLiquidsdt.Rows[i]["OutputLiquidsId"].ToString()); + if (BFactOutputLiquids.IsValid(OutputLiquidsId)) + { + OperationTemplateOutputLiquidsObj.TemplateName = TemplateName; + OperationTemplateOutputLiquidsObj.TypeId = TypeId; + OperationTemplateOutputLiquidsObj.ItemKindName = "出量"; + OperationTemplateOutputLiquidsObj.InRoomTime = InRoomTime; + OperationTemplateOutputLiquidsObj.ItemId = OutputLiquidsId; + OperationTemplateOutputLiquidsObj.BeginTime = DateTime.Parse(OutputLiquidsdt.Rows[i]["BeginTime"].ToString()); + OperationTemplateOutputLiquidsObj.EndTime = DateTime.Parse(OutputLiquidsdt.Rows[i]["EndTime"].ToString()); + OperationTemplateOutputLiquidsObj.Value = decimal.Parse(OutputLiquidsdt.Rows[i]["Dosage"].ToString()); + OperationTemplateOutputLiquidsObj.DosageUnit = OutputLiquidsdt.Rows[i]["DosageUnit"].ToString(); + OperationTemplateOutputLiquidsObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + OperationTemplateOutputLiquidsObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + OperationTemplateOutputLiquidsObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + OperationTemplateOutputLiquidsObj.IsPublic = IsPublic; + Add(OperationTemplateOutputLiquidsObj); + } + } + } + + public static void Add(OperationTemplate OperationTemplateObj) + { + DOperationTemplate.Add(OperationTemplateObj); + } + + public static void Delete(string TemplateName, int TypeId) + { + DOperationTemplate.Delete(TemplateName, TypeId); + } + + public static OperationTemplate GetModel(int Id) + { + return DOperationTemplate.GetModel(Id); + } + + public static DataTable GetDataTable(int TypeId) + { + return DOperationTemplate.GetDataTable(TypeId, AIMSExtension.PublicMethod.OperatorNo); + } + + public static void ClearData(int PatientId, int TypeId) + { + DOperationTemplate.ClearData(PatientId, TypeId); + } + public static void InputData(string TemplateName, int PatientId, DateTime InRoomTime, int TypeId) + { + DateTime NewInRoomTime = AIMSExtension.PublicMethod.SystemDate(); + DataTable dt = DOperationTemplate.GetDataTable(TemplateName, TypeId); + DataRow[] drugdr = dt.Select("ItemKindName='药品'"); + foreach (DataRow dr in drugdr) + { + int DrugId = int.Parse(dr["ItemId"].ToString()); + if (BFactDrug.IsValid(DrugId)) + { + FactDrug FactDrugObj = new FactDrug(); + FactDrugObj.PatientId = PatientId; + FactDrugObj.DrugId = DrugId; + TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + + //FactDrugObj.DrugBeginTime = NewInRoomTime.AddSeconds(BeginTimets.TotalSeconds); + //FactDrugObj.DrugEndTime = NewInRoomTime.AddSeconds(EndTimets.TotalSeconds); + + FactDrugObj.DrugBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); + FactDrugObj.DrugEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); + + if (dr["BeginTime"].ToString() == dr["EndTime"].ToString()) + { + FactDrugObj.IsContinue = 0; + } + else + { + FactDrugObj.IsContinue = 1; + } + FactDrugObj.DrugTypeId = TypeId; + if (dr["Value"].ToString() != "") + { + FactDrugObj.Dosage = decimal.Parse(dr["Value"].ToString()); + } + FactDrugObj.DosageUnit = dr["DosageUnit"].ToString(); + if (dr["Spare1"].ToString() != "" && dr["Spare1"].ToString() != "0" && dr["Spare1"].ToString() != "0.00") + { + FactDrugObj.Density = decimal.Parse(dr["Spare1"].ToString()); + FactDrugObj.DensityUnit = dr["Spare2"].ToString(); + } + if (dr["Spare3"].ToString() != "" && dr["Spare3"].ToString() != "0" && dr["Spare3"].ToString() != "0.00") + { + FactDrugObj.Velocity = decimal.Parse(dr["Spare3"].ToString()); + FactDrugObj.VelocityUnit = dr["Spare4"].ToString(); + } + + FactDrugObj.DrugChannel = dr["DrugChannel"].ToString(); + FactDrugObj.GiveDrugType = dr["GiveDrugType"].ToString(); + FactDrugObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactDrugObj.OperateDate = NewInRoomTime; + BFactDrug.Add(FactDrugObj); + + } + + } + + DataRow[] Eventdr = dt.Select("ItemKindName='事件'"); + foreach (DataRow dr in Eventdr) + { + int EventId = int.Parse(dr["ItemId"].ToString()); + if (BFactEvents.IsValid(EventId)) + { + FactEvents FactEventObj = new FactEvents(); + FactEventObj.PatientId = PatientId; + FactEventObj.EventId = EventId; + TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + + FactEventObj.EventBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); + FactEventObj.EventEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); + if (dr["BeginTime"].ToString() == dr["EndTime"].ToString()) + { + FactEventObj.IsContinue = 0; + } + else + { + FactEventObj.IsContinue = 1; + } + FactEventObj.EventTypeId = TypeId; + + FactEventObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactEventObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactEventObj.OperateDate = NewInRoomTime; + BFactEvents.Add(FactEventObj); + } + } + + DataRow[] OutputLiquidsdr = dt.Select("ItemKindName='出量'"); + foreach (DataRow dr in OutputLiquidsdr) + { + int OutputLiquidsId = int.Parse(dr["ItemId"].ToString()); + if (BFactOutputLiquids.IsValid(OutputLiquidsId)) + { + FactOutputLiquids FactOutputLiquidsObj = new FactOutputLiquids(); + FactOutputLiquidsObj.PatientId = PatientId; + FactOutputLiquidsObj.OutputLiquidsId = OutputLiquidsId; + TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + + FactOutputLiquidsObj.BeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); + FactOutputLiquidsObj.EndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); + if (dr["BeginTime"].ToString() == dr["EndTime"].ToString()) + { + FactOutputLiquidsObj.IsContinue = 0; + } + else + { + FactOutputLiquidsObj.IsContinue = 1; + } + FactOutputLiquidsObj.OutputLiquidsTypeId = TypeId; + if (dr["Value"].ToString() != "") + { + FactOutputLiquidsObj.Dosage = decimal.Parse(dr["Value"].ToString()); + } + FactOutputLiquidsObj.DosageUnit = dr["DosageUnit"].ToString(); + + FactOutputLiquidsObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactOutputLiquidsObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactOutputLiquidsObj.OperateDate = NewInRoomTime; + BFactOutputLiquids.Add(FactOutputLiquidsObj); + } + } + //DataRow[] PhysioParamdr = dt.Select("ItemKindName='生命体征'"); + //foreach (DataRow dr in PhysioParamdr) + //{ + // int PhysioParamId = int.Parse(dr["ItemId"].ToString()); + // TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); + + // OperationDoing.AnasRecordBill.Model.PhysioData PhysioDataObj = new OperationDoing.AnasRecordBill.Model.PhysioData(); + // PhysioDataObj.PatientId = PatientId; + // PhysioDataObj.PhysioDataType = TypeId; + // PhysioDataObj.RecordTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); + // PhysioDataObj.PhysioParamID = PhysioParamId; + + // if (dr["Value"].ToString() != "") + // { + // PhysioDataObj.Value = double.Parse(dr["Value"].ToString()); + // } + // else + // { + // PhysioDataObj.Value = 0; + // } + + //} + } } } diff --git a/AIMSEntity/BLL/Extension/BOrisPatient.cs b/AIMSEntity/BLL/Extension/BOrisPatient.cs index 284d913..7bf673f 100644 --- a/AIMSEntity/BLL/Extension/BOrisPatient.cs +++ b/AIMSEntity/BLL/Extension/BOrisPatient.cs @@ -4,9 +4,36 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BOrisPatient { + public static void Add(OrisPatient Oris_PatientObj) + { + DOrisPatient.Add(Oris_PatientObj); + } + + //public static void Update(OrisPatient Oris_PatientObj) + //{ + // DOrisPatient.Update(Oris_PatientObj); + //} + + public static OrisPatient GetModel(int Id) + { + return DOrisPatient.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DOrisPatient.GetDataTable(strWhere); + } + public static int GetOris_PatientMaxId() + { + return DOrisPatient.GetOris_PatientMaxId(); + } } } diff --git a/AIMSEntity/BLL/Extension/BOutputLiquids.cs b/AIMSEntity/BLL/Extension/BOutputLiquids.cs index 1827b28..ff57257 100644 --- a/AIMSEntity/BLL/Extension/BOutputLiquids.cs +++ b/AIMSEntity/BLL/Extension/BOutputLiquids.cs @@ -4,9 +4,47 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BOutputLiquids { + public static bool IsExit(string Name) + { + return DOutputLiquids.IsExit(Name); + } + public static void Add(OutputLiquids OutputLiquidsObj) + { + DOutputLiquids.Add(OutputLiquidsObj); + } + + public static void Delete(int Id) + { + DOutputLiquids.Delete(Id); + } + + public static OutputLiquids GetModel(int Id) + { + return DOutputLiquids.GetModel(Id); + } + public static OutputLiquids GetModelByName(string Name) + { + return DOutputLiquids.GetModelByName(Name); + } + public static DataTable GetDataTable(string HelpCode) + { + return DOutputLiquids.GetDataTable(HelpCode); + } + + public static DataTable GetEventDataTable() + { + return DOutputLiquids.GetEventDataTable(); + } + + public static DataTable GetDataTable() + { + return DOutputLiquids.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BPatientKind.cs b/AIMSEntity/BLL/Extension/BPatientKind.cs index 7c0194c..7c5d14b 100644 --- a/AIMSEntity/BLL/Extension/BPatientKind.cs +++ b/AIMSEntity/BLL/Extension/BPatientKind.cs @@ -4,9 +4,49 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BPatientKind { + public static void Add(PatientKind PatientKindObj) + { + try + { + DPatientKind.Add(PatientKindObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + public static PatientKind GetModel(int Id) + { + return DPatientKind.GetModel(Id); + } + + public static DataTable GetDataTable(string strWhere) + { + return DPatientKind.GetDataTable(strWhere); + } + + public static DataTable GetDataTable() + { + return DPatientKind.GetDataTable(); + } + + public static bool NameExit(string Name) + { + return DPatientKind.NameExit(Name); + } + + public static bool IsExit(string No) + { + return DPatientKind.IsExit(No); + } } } diff --git a/AIMSEntity/BLL/Extension/BPerson.cs b/AIMSEntity/BLL/Extension/BPerson.cs index 5bf5103..cbb30f7 100644 --- a/AIMSEntity/BLL/Extension/BPerson.cs +++ b/AIMSEntity/BLL/Extension/BPerson.cs @@ -4,10 +4,67 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BPerson { + public static void Add(Person PersonObj) + { + try + { + DPerson.Add(PersonObj); + MessageBox.Show("增加成功!"); + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + + public static Person GetModel(int Id) + { + return DPerson.GetModel(Id); ; + } + + public static DataTable GetPersonDataTable() + { + return DPerson.GetPersonDataTable(); + } + public static DataTable GetPersonDataTable(string name, string DeptName) + { + return DPerson.GetPersonDataTable(name, DeptName); + } + public static bool Login(string No, string PassWord) + { + return DPerson.Login(No, PassWord); + } + public static Person GetModelByNo(string No) + { + return DPerson.GetModelByNo(No); + } + + + public static DataTable GetPersonDataTableByDepId(int DepId, string HelpCode, string PersonType) + { + return DPerson.GetPersonDataTableByDepId(DepId, HelpCode, PersonType); + } + + /// + /// 查询排班信息 + /// + /// 查询时间 + /// 工种 + /// 部门Id + /// 关键字 + /// + public static DataTable GetSchedulingForSelect(DateTime time, string workerType)//int depId, + { + return DPerson.GetSchedulingForSelect(time, workerType); + } public static List GetruleAnesthesiaDoctor(string Id) { diff --git a/AIMSEntity/BLL/Extension/BPersonDuty.cs b/AIMSEntity/BLL/Extension/BPersonDuty.cs index 9503124..953ad03 100644 --- a/AIMSEntity/BLL/Extension/BPersonDuty.cs +++ b/AIMSEntity/BLL/Extension/BPersonDuty.cs @@ -4,9 +4,15 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; + namespace AIMSBLL { public partial class BPersonDuty { + public static DataTable GetDataTablePersonDuty() + { + return DPersonDuty.GetDataTablePersonDuty(); + } } } diff --git a/AIMSEntity/BLL/Extension/BPharmaCology.cs b/AIMSEntity/BLL/Extension/BPharmaCology.cs index 428dde0..bc3c3a0 100644 --- a/AIMSEntity/BLL/Extension/BPharmaCology.cs +++ b/AIMSEntity/BLL/Extension/BPharmaCology.cs @@ -4,9 +4,49 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Windows.Forms; +using System.Data; + namespace AIMSBLL { public partial class BPharmaCology { + public static void Add(PharmaCology PharmaCologyObj) + { + try + { + DPharmaCology.Add(PharmaCologyObj); + MessageBox.Show("增加成功!"); + + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + public static void Update(PharmaCology PharmaCologyObj) + { + try + { + DPharmaCology.Update(PharmaCologyObj); + MessageBox.Show("修改成功!"); + + } + catch (Exception ex) + { + MessageBox.Show("修改失败!" + ex.Message); + } + } + + public static PharmaCology GetModel(int Id) + { + return DPharmaCology.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DPharmaCology.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BPhysioData.cs b/AIMSEntity/BLL/Extension/BPhysioData.cs deleted file mode 100644 index f40cb37..0000000 --- a/AIMSEntity/BLL/Extension/BPhysioData.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections; -using System.Collections.Generic; -namespace AIMSBLL -{ - public partial class BPhysioData - { - } -} diff --git a/AIMSEntity/BLL/Extension/BPhysioDataConfig.cs b/AIMSEntity/BLL/Extension/BPhysioDataConfig.cs deleted file mode 100644 index f6d4c9d..0000000 --- a/AIMSEntity/BLL/Extension/BPhysioDataConfig.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections; -using System.Collections.Generic; -namespace AIMSBLL -{ - public partial class BPhysioDataConfig - { - } -} diff --git a/AIMSEntity/BLL/Extension/BPrintTemplate.cs b/AIMSEntity/BLL/Extension/BPrintTemplate.cs deleted file mode 100644 index fea20f7..0000000 --- a/AIMSEntity/BLL/Extension/BPrintTemplate.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections; -using System.Collections.Generic; -namespace AIMSBLL -{ - public partial class BPrintTemplate - { - } -} diff --git a/AIMSEntity/BLL/Extension/BRole.cs b/AIMSEntity/BLL/Extension/BRole.cs index 76002cb..61905c2 100644 --- a/AIMSEntity/BLL/Extension/BRole.cs +++ b/AIMSEntity/BLL/Extension/BRole.cs @@ -4,9 +4,37 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BRole { + public static void Add(Role RoleObj) + { + try + { + DRole.Add(RoleObj); + MessageBox.Show("增加成功!"); + + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + + public static Role GetModel(int Id) + { + return DRole.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DRole.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BSysConfig.cs b/AIMSEntity/BLL/Extension/BSysConfig.cs index 522f2d5..02cb9a0 100644 --- a/AIMSEntity/BLL/Extension/BSysConfig.cs +++ b/AIMSEntity/BLL/Extension/BSysConfig.cs @@ -4,9 +4,37 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BSysConfig { + public static bool IsExit(string Name) + { + return DSysConfig.IsExit(Name); + } + public static void Add(SysConfig DrugsObj) + { + try + { + DSysConfig.Add(DrugsObj); + MessageBox.Show("参数增加成功!"); + } + catch + { + MessageBox.Show("参数增加失败!"); + } + } + public static SysConfig GetModel(int Id) + { + return DSysConfig.GetModel(Id); + } + + public static object GetDataTable() + { + return DSysConfig.GetDataTable(); + } } } diff --git a/AIMSEntity/BLL/Extension/BUserPurview.cs b/AIMSEntity/BLL/Extension/BUserPurview.cs index d76d4e6..15f396d 100644 --- a/AIMSEntity/BLL/Extension/BUserPurview.cs +++ b/AIMSEntity/BLL/Extension/BUserPurview.cs @@ -4,9 +4,46 @@ using AIMSModel; using AIMSObjectQuery; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Reflection; +using System.Windows.Forms; + namespace AIMSBLL { public partial class BUserPurview { + public static void Add(UserPurview UserPurview) + { + try + { + DUserPurview.Add(UserPurview); + + } + catch (Exception ex) + { + MessageBox.Show("增加失败!" + ex.Message); + } + } + + public static void Delete(int RoleId) + { + DUserPurview.Delete(RoleId); + } + + public static UserPurview GetModel(int Id) + { + return DUserPurview.GetModel(Id); + } + + public static DataTable GetDataTable() + { + return DUserPurview.GetDataTable(); + + } + + public static List GetPurviewListByRoleId(int RoleId) + { + return DUserPurview.GetPurviewListByRoleId(RoleId); + } } } diff --git a/AIMSEntity/BLL/Extension/BUserTempPurview.cs b/AIMSEntity/BLL/Extension/BUserTempPurview.cs deleted file mode 100644 index 23cf78c..0000000 --- a/AIMSEntity/BLL/Extension/BUserTempPurview.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using AIMSDAL; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections; -using System.Collections.Generic; -namespace AIMSBLL -{ - public partial class BUserTempPurview - { - } -} diff --git a/AIMSEntity/DAL/AutoGenerate/DFactOperationInfo.cs b/AIMSEntity/DAL/AutoGenerate/DFactOperationInfo.cs index a3aedc9..9ef889a 100644 --- a/AIMSEntity/DAL/AutoGenerate/DFactOperationInfo.cs +++ b/AIMSEntity/DAL/AutoGenerate/DFactOperationInfo.cs @@ -20,7 +20,7 @@ namespace AIMSDAL internal static int Insert(SqlCommand cmd, FactOperationInfo factOperationInfo) { cmd.Parameters.Clear(); - cmd.CommandText = "insert into FactOperationInfo (PatientId,ApplyId,OperationId,OperatorNo,OperatorName,OperateDate) values (@PatientId,@ApplyId,@OperationId,@OperatorNo,@OperatorName,@OperateDate);select @@identity"; + cmd.CommandText = "insert into FactOperationInfo (PatientId,ApplyId,OperationId,OperatorNo,OperatorName,OperateDate,OperationName,LeftRemark,RightRemark) values (@PatientId,@ApplyId,@OperationId,@OperatorNo,@OperatorName,@OperateDate,@OperationName,@LeftRemark,@RightRemark);select @@identity"; //从实体中取出值放入Command的参数列表 cmd.Parameters.Add(new SqlParameter("@PatientId",factOperationInfo.PatientId.HasValue?(object)factOperationInfo.PatientId.Value:(object)DBNull.Value)); cmd.Parameters.Add(new SqlParameter("@ApplyId",factOperationInfo.ApplyId.HasValue?(object)factOperationInfo.ApplyId.Value:(object)DBNull.Value)); @@ -28,6 +28,9 @@ namespace AIMSDAL cmd.Parameters.Add(new SqlParameter("@OperatorNo",factOperationInfo.OperatorNo==null?(object)DBNull.Value:(object)factOperationInfo.OperatorNo)); cmd.Parameters.Add(new SqlParameter("@OperatorName",factOperationInfo.OperatorName==null?(object)DBNull.Value:(object)factOperationInfo.OperatorName)); cmd.Parameters.Add(new SqlParameter("@OperateDate",factOperationInfo.OperateDate.HasValue?(object)factOperationInfo.OperateDate.Value:(object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@OperationName",factOperationInfo.OperationName==null?(object)DBNull.Value:(object)factOperationInfo.OperationName)); + cmd.Parameters.Add(new SqlParameter("@LeftRemark",factOperationInfo.LeftRemark==null?(object)DBNull.Value:(object)factOperationInfo.LeftRemark)); + cmd.Parameters.Add(new SqlParameter("@RightRemark",factOperationInfo.RightRemark==null?(object)DBNull.Value:(object)factOperationInfo.RightRemark)); return Convert.ToInt32(cmd.ExecuteScalar()); } /// @@ -172,7 +175,7 @@ namespace AIMSDAL /// 影响的记录行数 internal static int ExcuteUpdateCommand(SqlCommand cmd, FactOperationInfo factOperationInfo) { - cmd.CommandText = "update FactOperationInfo set PatientId=@PatientId,ApplyId=@ApplyId,OperationId=@OperationId,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate where Id=@Id"; + cmd.CommandText = "update FactOperationInfo set PatientId=@PatientId,ApplyId=@ApplyId,OperationId=@OperationId,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,OperationName=@OperationName,LeftRemark=@LeftRemark,RightRemark=@RightRemark where Id=@Id"; //从实体中取出值放入Command的参数列表 cmd.Parameters.Add(new SqlParameter("@PatientId",factOperationInfo.PatientId.HasValue?(object)factOperationInfo.PatientId.Value:(object)DBNull.Value)); cmd.Parameters.Add(new SqlParameter("@ApplyId",factOperationInfo.ApplyId.HasValue?(object)factOperationInfo.ApplyId.Value:(object)DBNull.Value)); @@ -180,6 +183,9 @@ namespace AIMSDAL cmd.Parameters.Add(new SqlParameter("@OperatorNo",factOperationInfo.OperatorNo==null?(object)DBNull.Value:(object)factOperationInfo.OperatorNo)); cmd.Parameters.Add(new SqlParameter("@OperatorName",factOperationInfo.OperatorName==null?(object)DBNull.Value:(object)factOperationInfo.OperatorName)); cmd.Parameters.Add(new SqlParameter("@OperateDate",factOperationInfo.OperateDate.HasValue?(object)factOperationInfo.OperateDate.Value:(object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@OperationName",factOperationInfo.OperationName==null?(object)DBNull.Value:(object)factOperationInfo.OperationName)); + cmd.Parameters.Add(new SqlParameter("@LeftRemark",factOperationInfo.LeftRemark==null?(object)DBNull.Value:(object)factOperationInfo.LeftRemark)); + cmd.Parameters.Add(new SqlParameter("@RightRemark",factOperationInfo.RightRemark==null?(object)DBNull.Value:(object)factOperationInfo.RightRemark)); cmd.Parameters.Add(new SqlParameter("@Id", factOperationInfo.Id)); return cmd.ExecuteNonQuery(); } @@ -608,6 +614,18 @@ namespace AIMSDAL { entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]); } + if(dr["OperationName"]!=System.DBNull.Value) + { + entity.OperationName=dr["OperationName"].ToString(); + } + if(dr["LeftRemark"]!=System.DBNull.Value) + { + entity.LeftRemark=dr["LeftRemark"].ToString(); + } + if(dr["RightRemark"]!=System.DBNull.Value) + { + entity.RightRemark=dr["RightRemark"].ToString(); + } return entity; } } diff --git a/AIMSEntity/OldEntity/DAL/DInstrumentRegistration.cs b/AIMSEntity/DAL/AutoGenerate/DInstrumentRegistration.cs similarity index 100% rename from AIMSEntity/OldEntity/DAL/DInstrumentRegistration.cs rename to AIMSEntity/DAL/AutoGenerate/DInstrumentRegistration.cs diff --git a/AIMSEntity/OldEntity/DAL/DNoticeContent.cs b/AIMSEntity/DAL/AutoGenerate/DNoticeContent.cs similarity index 100% rename from AIMSEntity/OldEntity/DAL/DNoticeContent.cs rename to AIMSEntity/DAL/AutoGenerate/DNoticeContent.cs diff --git a/AIMSEntity/OldEntity/DAL/DNoticeTemplate.cs b/AIMSEntity/DAL/AutoGenerate/DNoticeTemplate.cs similarity index 100% rename from AIMSEntity/OldEntity/DAL/DNoticeTemplate.cs rename to AIMSEntity/DAL/AutoGenerate/DNoticeTemplate.cs diff --git a/AIMSEntity/DAL/AutoGenerate/DOperationTemplate.cs b/AIMSEntity/DAL/AutoGenerate/DOperationTemplate.cs index d3f84d5..b156966 100644 --- a/AIMSEntity/DAL/AutoGenerate/DOperationTemplate.cs +++ b/AIMSEntity/DAL/AutoGenerate/DOperationTemplate.cs @@ -20,7 +20,7 @@ namespace AIMSDAL internal static int Insert(SqlCommand cmd, OperationTemplate operationTemplate) { cmd.Parameters.Clear(); - cmd.CommandText = "insert into OperationTemplate (TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate) values (@TemplateName,@TypeId,@ItemKindName,@InRoomTime,@ItemId,@BeginTime,@EndTime,@Value,@DosageUnit,@DrugChannel,@GiveDrugType,@OperatorNo,@OperatorName,@OperateDate);select @@identity"; + cmd.CommandText = "insert into OperationTemplate (TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate,IsPublic,Spare1,Spare2,Spare3,Spare4,Spare5) values (@TemplateName,@TypeId,@ItemKindName,@InRoomTime,@ItemId,@BeginTime,@EndTime,@Value,@DosageUnit,@DrugChannel,@GiveDrugType,@OperatorNo,@OperatorName,@OperateDate,@IsPublic,@Spare1,@Spare2,@Spare3,@Spare4,@Spare5);select @@identity"; //从实体中取出值放入Command的参数列表 cmd.Parameters.Add(new SqlParameter("@TemplateName",operationTemplate.TemplateName==null?(object)DBNull.Value:(object)operationTemplate.TemplateName)); cmd.Parameters.Add(new SqlParameter("@TypeId",operationTemplate.TypeId.HasValue?(object)operationTemplate.TypeId.Value:(object)DBNull.Value)); @@ -36,6 +36,12 @@ namespace AIMSDAL cmd.Parameters.Add(new SqlParameter("@OperatorNo",operationTemplate.OperatorNo==null?(object)DBNull.Value:(object)operationTemplate.OperatorNo)); cmd.Parameters.Add(new SqlParameter("@OperatorName",operationTemplate.OperatorName==null?(object)DBNull.Value:(object)operationTemplate.OperatorName)); cmd.Parameters.Add(new SqlParameter("@OperateDate",operationTemplate.OperateDate.HasValue?(object)operationTemplate.OperateDate.Value:(object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@IsPublic",operationTemplate.IsPublic.HasValue?(object)operationTemplate.IsPublic.Value:(object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Spare1",operationTemplate.Spare1==null?(object)DBNull.Value:(object)operationTemplate.Spare1)); + cmd.Parameters.Add(new SqlParameter("@Spare2",operationTemplate.Spare2==null?(object)DBNull.Value:(object)operationTemplate.Spare2)); + cmd.Parameters.Add(new SqlParameter("@Spare3",operationTemplate.Spare3==null?(object)DBNull.Value:(object)operationTemplate.Spare3)); + cmd.Parameters.Add(new SqlParameter("@Spare4",operationTemplate.Spare4==null?(object)DBNull.Value:(object)operationTemplate.Spare4)); + cmd.Parameters.Add(new SqlParameter("@Spare5",operationTemplate.Spare5==null?(object)DBNull.Value:(object)operationTemplate.Spare5)); return Convert.ToInt32(cmd.ExecuteScalar()); } /// @@ -180,7 +186,7 @@ namespace AIMSDAL /// 影响的记录行数 internal static int ExcuteUpdateCommand(SqlCommand cmd, OperationTemplate operationTemplate) { - cmd.CommandText = "update OperationTemplate set TemplateName=@TemplateName,TypeId=@TypeId,ItemKindName=@ItemKindName,InRoomTime=@InRoomTime,ItemId=@ItemId,BeginTime=@BeginTime,EndTime=@EndTime,Value=@Value,DosageUnit=@DosageUnit,DrugChannel=@DrugChannel,GiveDrugType=@GiveDrugType,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate where Id=@Id"; + cmd.CommandText = "update OperationTemplate set TemplateName=@TemplateName,TypeId=@TypeId,ItemKindName=@ItemKindName,InRoomTime=@InRoomTime,ItemId=@ItemId,BeginTime=@BeginTime,EndTime=@EndTime,Value=@Value,DosageUnit=@DosageUnit,DrugChannel=@DrugChannel,GiveDrugType=@GiveDrugType,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate,IsPublic=@IsPublic,Spare1=@Spare1,Spare2=@Spare2,Spare3=@Spare3,Spare4=@Spare4,Spare5=@Spare5 where Id=@Id"; //从实体中取出值放入Command的参数列表 cmd.Parameters.Add(new SqlParameter("@TemplateName",operationTemplate.TemplateName==null?(object)DBNull.Value:(object)operationTemplate.TemplateName)); cmd.Parameters.Add(new SqlParameter("@TypeId",operationTemplate.TypeId.HasValue?(object)operationTemplate.TypeId.Value:(object)DBNull.Value)); @@ -196,6 +202,12 @@ namespace AIMSDAL cmd.Parameters.Add(new SqlParameter("@OperatorNo",operationTemplate.OperatorNo==null?(object)DBNull.Value:(object)operationTemplate.OperatorNo)); cmd.Parameters.Add(new SqlParameter("@OperatorName",operationTemplate.OperatorName==null?(object)DBNull.Value:(object)operationTemplate.OperatorName)); cmd.Parameters.Add(new SqlParameter("@OperateDate",operationTemplate.OperateDate.HasValue?(object)operationTemplate.OperateDate.Value:(object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@IsPublic",operationTemplate.IsPublic.HasValue?(object)operationTemplate.IsPublic.Value:(object)DBNull.Value)); + cmd.Parameters.Add(new SqlParameter("@Spare1",operationTemplate.Spare1==null?(object)DBNull.Value:(object)operationTemplate.Spare1)); + cmd.Parameters.Add(new SqlParameter("@Spare2",operationTemplate.Spare2==null?(object)DBNull.Value:(object)operationTemplate.Spare2)); + cmd.Parameters.Add(new SqlParameter("@Spare3",operationTemplate.Spare3==null?(object)DBNull.Value:(object)operationTemplate.Spare3)); + cmd.Parameters.Add(new SqlParameter("@Spare4",operationTemplate.Spare4==null?(object)DBNull.Value:(object)operationTemplate.Spare4)); + cmd.Parameters.Add(new SqlParameter("@Spare5",operationTemplate.Spare5==null?(object)DBNull.Value:(object)operationTemplate.Spare5)); cmd.Parameters.Add(new SqlParameter("@Id", operationTemplate.Id)); return cmd.ExecuteNonQuery(); } @@ -656,6 +668,30 @@ namespace AIMSDAL { entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]); } + if(dr["IsPublic"]!=System.DBNull.Value) + { + entity.IsPublic=Convert.ToInt32(dr["IsPublic"]); + } + if(dr["Spare1"]!=System.DBNull.Value) + { + entity.Spare1=dr["Spare1"].ToString(); + } + if(dr["Spare2"]!=System.DBNull.Value) + { + entity.Spare2=dr["Spare2"].ToString(); + } + if(dr["Spare3"]!=System.DBNull.Value) + { + entity.Spare3=dr["Spare3"].ToString(); + } + if(dr["Spare4"]!=System.DBNull.Value) + { + entity.Spare4=dr["Spare4"].ToString(); + } + if(dr["Spare5"]!=System.DBNull.Value) + { + entity.Spare5=dr["Spare5"].ToString(); + } return entity; } } diff --git a/AIMSEntity/DAL/AutoGenerate/DPhysioData.cs b/AIMSEntity/DAL/AutoGenerate/DPhysioData.cs deleted file mode 100644 index d8ace87..0000000 --- a/AIMSEntity/DAL/AutoGenerate/DPhysioData.cs +++ /dev/null @@ -1,633 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections.Generic; - -namespace AIMSDAL -{ - internal partial class DPhysioData - { - #region 插入实体操作部份 - /// - /// 插入 - /// - /// Command对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(SqlCommand cmd, PhysioData physioData) - { - cmd.Parameters.Clear(); - cmd.CommandText = "insert into PhysioData (PatientId,PhysioDataType,PhysioDataConfigId,RecordTime,Value,IsValid,OperatorNo,OperatorName,OperateDate) values (@PatientId,@PhysioDataType,@PhysioDataConfigId,@RecordTime,@Value,@IsValid,@OperatorNo,@OperatorName,@OperateDate);select @@identity"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@PatientId",physioData.PatientId.HasValue?(object)physioData.PatientId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@PhysioDataType",physioData.PhysioDataType.HasValue?(object)physioData.PhysioDataType.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@PhysioDataConfigId",physioData.PhysioDataConfigId.HasValue?(object)physioData.PhysioDataConfigId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@RecordTime",physioData.RecordTime.HasValue?(object)physioData.RecordTime.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Value",physioData.Value.HasValue?(object)physioData.Value.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IsValid",physioData.IsValid.HasValue?(object)physioData.IsValid.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",physioData.OperatorNo==null?(object)DBNull.Value:(object)physioData.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",physioData.OperatorName==null?(object)DBNull.Value:(object)physioData.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",physioData.OperateDate.HasValue?(object)physioData.OperateDate.Value:(object)DBNull.Value)); - return Convert.ToInt32(cmd.ExecuteScalar()); - } - /// - /// 不使用事务的插入方法 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(PhysioData physioData) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return Insert(cmd, physioData); - } - } - } - - /// - /// 使用事务的插入方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(Connection connection,PhysioData physioData) - { - return Insert(connection.Command, physioData); - } - #endregion - - #region 删除实体操作 - - /// - /// 删除 - /// - /// Command对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, PhysioData physioData) - { - cmd.Parameters.Clear(); - cmd.CommandText = "delete from PhysioData where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Id", physioData.Id)); - return cmd.ExecuteNonQuery(); - } - /// - /// 不使用事务的删除方法 - /// - /// 实体类对象 - /// 影响的记录行数 - internal static int Delete(PhysioData physioData) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteDeleteCommand(cmd, physioData); - } - } - } - /// - /// 使用事务的删除方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int Delete(Connection connection,PhysioData physioData) - { - return ExcuteDeleteCommand(connection.Command, physioData); - } - - /// - /// 执行删除命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataMap()); - if (filterString != string.Empty) - { - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "delete from PhysioData " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的删除方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteDeleteCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的删除方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(Connection connection, string oql, ParameterList parameters) - { - return ExcuteDeleteCommand(connection.Command, oql, parameters); - } - - #endregion - - #region 更新实体操作 - - /// - /// 更新 - /// - /// Command对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, PhysioData physioData) - { - cmd.CommandText = "update PhysioData set PatientId=@PatientId,PhysioDataType=@PhysioDataType,PhysioDataConfigId=@PhysioDataConfigId,RecordTime=@RecordTime,Value=@Value,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@PatientId",physioData.PatientId.HasValue?(object)physioData.PatientId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@PhysioDataType",physioData.PhysioDataType.HasValue?(object)physioData.PhysioDataType.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@PhysioDataConfigId",physioData.PhysioDataConfigId.HasValue?(object)physioData.PhysioDataConfigId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@RecordTime",physioData.RecordTime.HasValue?(object)physioData.RecordTime.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Value",physioData.Value.HasValue?(object)physioData.Value.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IsValid",physioData.IsValid.HasValue?(object)physioData.IsValid.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",physioData.OperatorNo==null?(object)DBNull.Value:(object)physioData.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",physioData.OperatorName==null?(object)DBNull.Value:(object)physioData.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",physioData.OperateDate.HasValue?(object)physioData.OperateDate.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Id", physioData.Id)); - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的更新方法 - /// - /// 实体类对象 - /// 影响的记录行数 - internal static int Update(PhysioData physioData) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteUpdateCommand(cmd, physioData); - } - } - } - /// - /// 使用事务的更新方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int Update(Connection connection,PhysioData physioData) - { - return ExcuteUpdateCommand(connection.Command, physioData); - } - /// - /// 执行更新命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string updateString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataMap()); - cmd.CommandText = "update PhysioData set " + updateString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的更新方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteUpdateCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的更新方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(Connection connection, string oql, ParameterList parameters) - { - return ExcuteUpdateCommand(connection.Command, oql, parameters); - } - #endregion - - #region 查询实体集合 - /// - /// 执行Command获取对象列表 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体类对象列表 - internal static List ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - List physioDataList = new List(); - using (SqlDataReader dr = cmd.ExecuteReader()) - { - while (dr.Read()) - { - PhysioData physioData = DataReaderToEntity(dr); - physioDataList.Add(physioData); - } - } - return physioDataList; - } - /// - /// 执行查询命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataMap()); - if (filterString != string.Empty) - { - if(filterString.Trim().ToLower().IndexOf("order ")!=0) - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "select * from PhysioData " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 实体类对象集合 - internal static List Select() - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from PhysioData"; - return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1); - } - } - } - /// - /// 根据对象查询语句查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from PhysioData"; - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合(启用事务) - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - - /// - /// 递归查询单个实体 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioData ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - PhysioData physioData=null; - using (SqlDataReader dr = cmd.ExecuteReader()) - { - if(dr.Read()) - physioData = DataReaderToEntity(dr); - } - if(physioData==null) - return physioData; - return physioData; - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioData ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataMap()); - if(filterString!=string.Empty) - { - filterString=" where "+filterString; - } - cmd.CommandText = "select * from PhysioData " + filterString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioData SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 更据对象查询语句查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static PhysioData SelectSingle(string oql, ParameterList parameters) - { - return SelectSingle(oql,parameters,RecursiveType.Parent,1); - } - - /// - /// 更据对象查询语句并启用事务查询单个实体 - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static PhysioData SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); - } - - /// - /// 更据主键值递归查询单个实体 - /// - /// Command对象 - /// 主键值 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioData SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth) - { - cmd.Parameters.Clear(); - if(id.HasValue) - { - cmd.CommandText = "select * from PhysioData where Id=@pk"; - cmd.Parameters.Add(new SqlParameter("@pk",id.Value)); - } - else - { - cmd.CommandText = "select * from PhysioData where Id is null"; - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 实体类对象 - internal static PhysioData SelectSingle(int? id) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return SelectSingle(cmd,id,RecursiveType.Parent,1); - } - } - } - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 递归类型 - /// 递归深度 - /// 实体类对象 - internal static PhysioData SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return SelectSingle(cmd,id, recursiveType, recursiveDepth); - } - } - } - - /// - /// 使用事务并按主键字段查询特定实体 - /// - /// 连接对象 - /// 主键值 - /// 实体类对象 - internal static PhysioData SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth) - { - return SelectSingle(connection.Command, id, recursiveType, recursiveDepth); - } - #endregion - - - /// - /// 从DataReader中取出值生成实体对象 - /// - /// 查询对象 - /// 过滤条件字符串 - private static PhysioData DataReaderToEntity(SqlDataReader dr) - { - PhysioData entity = new PhysioData (); - if(dr["Id"]!=System.DBNull.Value) - { - entity.Id=Convert.ToInt32(dr["Id"]); - } - if(dr["PatientId"]!=System.DBNull.Value) - { - entity.PatientId=Convert.ToInt32(dr["PatientId"]); - } - if(dr["PhysioDataType"]!=System.DBNull.Value) - { - entity.PhysioDataType=Convert.ToInt32(dr["PhysioDataType"]); - } - if(dr["PhysioDataConfigId"]!=System.DBNull.Value) - { - entity.PhysioDataConfigId=Convert.ToInt32(dr["PhysioDataConfigId"]); - } - if(dr["RecordTime"]!=System.DBNull.Value) - { - entity.RecordTime=Convert.ToDateTime(dr["RecordTime"]); - } - if(dr["Value"]!=System.DBNull.Value) - { - entity.Value=Convert.ToDecimal(dr["Value"]); - } - if(dr["IsValid"]!=System.DBNull.Value) - { - entity.IsValid=Convert.ToInt32(dr["IsValid"]); - } - if(dr["OperatorNo"]!=System.DBNull.Value) - { - entity.OperatorNo=dr["OperatorNo"].ToString(); - } - if(dr["OperatorName"]!=System.DBNull.Value) - { - entity.OperatorName=dr["OperatorName"].ToString(); - } - if(dr["OperateDate"]!=System.DBNull.Value) - { - entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]); - } - return entity; - } - } -} - diff --git a/AIMSEntity/DAL/AutoGenerate/DPhysioDataConfig.cs b/AIMSEntity/DAL/AutoGenerate/DPhysioDataConfig.cs deleted file mode 100644 index a54ea0b..0000000 --- a/AIMSEntity/DAL/AutoGenerate/DPhysioDataConfig.cs +++ /dev/null @@ -1,639 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections.Generic; - -namespace AIMSDAL -{ - internal partial class DPhysioDataConfig - { - #region 插入实体操作部份 - /// - /// 插入 - /// - /// Command对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(SqlCommand cmd, PhysioDataConfig physioDataConfig) - { - cmd.Parameters.Clear(); - cmd.CommandText = "insert into PhysioDataConfig (Name,Enname,Color,imgPath,decHighLimit,decLowLimit,IsValid,OperatorNo,OperatorName,OperateDate) values (@Name,@Enname,@Color,@imgPath,@decHighLimit,@decLowLimit,@IsValid,@OperatorNo,@OperatorName,@OperateDate);select @@identity"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Name",physioDataConfig.Name==null?(object)DBNull.Value:(object)physioDataConfig.Name)); - cmd.Parameters.Add(new SqlParameter("@Enname",physioDataConfig.Enname==null?(object)DBNull.Value:(object)physioDataConfig.Enname)); - cmd.Parameters.Add(new SqlParameter("@Color",physioDataConfig.Color==null?(object)DBNull.Value:(object)physioDataConfig.Color)); - cmd.Parameters.Add(new SqlParameter("@imgPath",physioDataConfig.ImgPath==null?(object)DBNull.Value:(object)physioDataConfig.ImgPath)); - cmd.Parameters.Add(new SqlParameter("@decHighLimit",physioDataConfig.DecHighLimit.HasValue?(object)physioDataConfig.DecHighLimit.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@decLowLimit",physioDataConfig.DecLowLimit.HasValue?(object)physioDataConfig.DecLowLimit.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IsValid",physioDataConfig.IsValid.HasValue?(object)physioDataConfig.IsValid.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",physioDataConfig.OperatorNo==null?(object)DBNull.Value:(object)physioDataConfig.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",physioDataConfig.OperatorName==null?(object)DBNull.Value:(object)physioDataConfig.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",physioDataConfig.OperateDate.HasValue?(object)physioDataConfig.OperateDate.Value:(object)DBNull.Value)); - return Convert.ToInt32(cmd.ExecuteScalar()); - } - /// - /// 不使用事务的插入方法 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(PhysioDataConfig physioDataConfig) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return Insert(cmd, physioDataConfig); - } - } - } - - /// - /// 使用事务的插入方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(Connection connection,PhysioDataConfig physioDataConfig) - { - return Insert(connection.Command, physioDataConfig); - } - #endregion - - #region 删除实体操作 - - /// - /// 删除 - /// - /// Command对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, PhysioDataConfig physioDataConfig) - { - cmd.Parameters.Clear(); - cmd.CommandText = "delete from PhysioDataConfig where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Id", physioDataConfig.Id)); - return cmd.ExecuteNonQuery(); - } - /// - /// 不使用事务的删除方法 - /// - /// 实体类对象 - /// 影响的记录行数 - internal static int Delete(PhysioDataConfig physioDataConfig) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteDeleteCommand(cmd, physioDataConfig); - } - } - } - /// - /// 使用事务的删除方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int Delete(Connection connection,PhysioDataConfig physioDataConfig) - { - return ExcuteDeleteCommand(connection.Command, physioDataConfig); - } - - /// - /// 执行删除命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataConfigMap()); - if (filterString != string.Empty) - { - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "delete from PhysioDataConfig " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的删除方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteDeleteCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的删除方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(Connection connection, string oql, ParameterList parameters) - { - return ExcuteDeleteCommand(connection.Command, oql, parameters); - } - - #endregion - - #region 更新实体操作 - - /// - /// 更新 - /// - /// Command对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, PhysioDataConfig physioDataConfig) - { - cmd.CommandText = "update PhysioDataConfig set Name=@Name,Enname=@Enname,Color=@Color,imgPath=@imgPath,decHighLimit=@decHighLimit,decLowLimit=@decLowLimit,IsValid=@IsValid,OperatorNo=@OperatorNo,OperatorName=@OperatorName,OperateDate=@OperateDate where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Name",physioDataConfig.Name==null?(object)DBNull.Value:(object)physioDataConfig.Name)); - cmd.Parameters.Add(new SqlParameter("@Enname",physioDataConfig.Enname==null?(object)DBNull.Value:(object)physioDataConfig.Enname)); - cmd.Parameters.Add(new SqlParameter("@Color",physioDataConfig.Color==null?(object)DBNull.Value:(object)physioDataConfig.Color)); - cmd.Parameters.Add(new SqlParameter("@imgPath",physioDataConfig.ImgPath==null?(object)DBNull.Value:(object)physioDataConfig.ImgPath)); - cmd.Parameters.Add(new SqlParameter("@decHighLimit",physioDataConfig.DecHighLimit.HasValue?(object)physioDataConfig.DecHighLimit.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@decLowLimit",physioDataConfig.DecLowLimit.HasValue?(object)physioDataConfig.DecLowLimit.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IsValid",physioDataConfig.IsValid.HasValue?(object)physioDataConfig.IsValid.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",physioDataConfig.OperatorNo==null?(object)DBNull.Value:(object)physioDataConfig.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorName",physioDataConfig.OperatorName==null?(object)DBNull.Value:(object)physioDataConfig.OperatorName)); - cmd.Parameters.Add(new SqlParameter("@OperateDate",physioDataConfig.OperateDate.HasValue?(object)physioDataConfig.OperateDate.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Id", physioDataConfig.Id)); - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的更新方法 - /// - /// 实体类对象 - /// 影响的记录行数 - internal static int Update(PhysioDataConfig physioDataConfig) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteUpdateCommand(cmd, physioDataConfig); - } - } - } - /// - /// 使用事务的更新方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int Update(Connection connection,PhysioDataConfig physioDataConfig) - { - return ExcuteUpdateCommand(connection.Command, physioDataConfig); - } - /// - /// 执行更新命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string updateString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataConfigMap()); - cmd.CommandText = "update PhysioDataConfig set " + updateString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的更新方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteUpdateCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的更新方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(Connection connection, string oql, ParameterList parameters) - { - return ExcuteUpdateCommand(connection.Command, oql, parameters); - } - #endregion - - #region 查询实体集合 - /// - /// 执行Command获取对象列表 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体类对象列表 - internal static List ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - List physioDataConfigList = new List(); - using (SqlDataReader dr = cmd.ExecuteReader()) - { - while (dr.Read()) - { - PhysioDataConfig physioDataConfig = DataReaderToEntity(dr); - physioDataConfigList.Add(physioDataConfig); - } - } - return physioDataConfigList; - } - /// - /// 执行查询命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataConfigMap()); - if (filterString != string.Empty) - { - if(filterString.Trim().ToLower().IndexOf("order ")!=0) - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "select * from PhysioDataConfig " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 实体类对象集合 - internal static List Select() - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from PhysioDataConfig"; - return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1); - } - } - } - /// - /// 根据对象查询语句查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from PhysioDataConfig"; - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合(启用事务) - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - - /// - /// 递归查询单个实体 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioDataConfig ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - PhysioDataConfig physioDataConfig=null; - using (SqlDataReader dr = cmd.ExecuteReader()) - { - if(dr.Read()) - physioDataConfig = DataReaderToEntity(dr); - } - if(physioDataConfig==null) - return physioDataConfig; - return physioDataConfig; - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioDataConfig ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PhysioDataConfigMap()); - if(filterString!=string.Empty) - { - filterString=" where "+filterString; - } - cmd.CommandText = "select * from PhysioDataConfig " + filterString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioDataConfig SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 更据对象查询语句查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static PhysioDataConfig SelectSingle(string oql, ParameterList parameters) - { - return SelectSingle(oql,parameters,RecursiveType.Parent,1); - } - - /// - /// 更据对象查询语句并启用事务查询单个实体 - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static PhysioDataConfig SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); - } - - /// - /// 更据主键值递归查询单个实体 - /// - /// Command对象 - /// 主键值 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PhysioDataConfig SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth) - { - cmd.Parameters.Clear(); - if(id.HasValue) - { - cmd.CommandText = "select * from PhysioDataConfig where Id=@pk"; - cmd.Parameters.Add(new SqlParameter("@pk",id.Value)); - } - else - { - cmd.CommandText = "select * from PhysioDataConfig where Id is null"; - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 实体类对象 - internal static PhysioDataConfig SelectSingle(int? id) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return SelectSingle(cmd,id,RecursiveType.Parent,1); - } - } - } - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 递归类型 - /// 递归深度 - /// 实体类对象 - internal static PhysioDataConfig SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return SelectSingle(cmd,id, recursiveType, recursiveDepth); - } - } - } - - /// - /// 使用事务并按主键字段查询特定实体 - /// - /// 连接对象 - /// 主键值 - /// 实体类对象 - internal static PhysioDataConfig SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth) - { - return SelectSingle(connection.Command, id, recursiveType, recursiveDepth); - } - #endregion - - - /// - /// 从DataReader中取出值生成实体对象 - /// - /// 查询对象 - /// 过滤条件字符串 - private static PhysioDataConfig DataReaderToEntity(SqlDataReader dr) - { - PhysioDataConfig entity = new PhysioDataConfig (); - if(dr["Id"]!=System.DBNull.Value) - { - entity.Id=Convert.ToInt32(dr["Id"]); - } - if(dr["Name"]!=System.DBNull.Value) - { - entity.Name=dr["Name"].ToString(); - } - if(dr["Enname"]!=System.DBNull.Value) - { - entity.Enname=dr["Enname"].ToString(); - } - if(dr["Color"]!=System.DBNull.Value) - { - entity.Color=dr["Color"].ToString(); - } - if(dr["imgPath"]!=System.DBNull.Value) - { - entity.ImgPath=dr["imgPath"].ToString(); - } - if(dr["decHighLimit"]!=System.DBNull.Value) - { - entity.DecHighLimit=Convert.ToDecimal(dr["decHighLimit"]); - } - if(dr["decLowLimit"]!=System.DBNull.Value) - { - entity.DecLowLimit=Convert.ToDecimal(dr["decLowLimit"]); - } - if(dr["IsValid"]!=System.DBNull.Value) - { - entity.IsValid=Convert.ToInt32(dr["IsValid"]); - } - if(dr["OperatorNo"]!=System.DBNull.Value) - { - entity.OperatorNo=dr["OperatorNo"].ToString(); - } - if(dr["OperatorName"]!=System.DBNull.Value) - { - entity.OperatorName=dr["OperatorName"].ToString(); - } - if(dr["OperateDate"]!=System.DBNull.Value) - { - entity.OperateDate=Convert.ToDateTime(dr["OperateDate"]); - } - return entity; - } - } -} - diff --git a/AIMSEntity/DAL/AutoGenerate/DPrintTemplate.cs b/AIMSEntity/DAL/AutoGenerate/DPrintTemplate.cs deleted file mode 100644 index d9e4e9d..0000000 --- a/AIMSEntity/DAL/AutoGenerate/DPrintTemplate.cs +++ /dev/null @@ -1,471 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections.Generic; - -namespace AIMSDAL -{ - internal partial class DPrintTemplate - { - #region 插入实体操作部份 - /// - /// 插入 - /// - /// Command对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(SqlCommand cmd, PrintTemplate printTemplate) - { - cmd.Parameters.Clear(); - cmd.CommandText = "insert into PrintTemplate (ParentId,XmlFileName,XmlFile,XmlStatic,TemplateOrder,IsValid,OperatorNo,OperatorDate) values (@ParentId,@XmlFileName,@XmlFile,@XmlStatic,@TemplateOrder,@IsValid,@OperatorNo,@OperatorDate);select @@identity"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@ParentId",printTemplate.ParentId.HasValue?(object)printTemplate.ParentId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@XmlFileName",printTemplate.XmlFileName==null?(object)DBNull.Value:(object)printTemplate.XmlFileName)); - cmd.Parameters.Add(new SqlParameter("@XmlFile",printTemplate.XmlFile==null?(object)DBNull.Value:(object)printTemplate.XmlFile)); - cmd.Parameters.Add(new SqlParameter("@XmlStatic",printTemplate.XmlStatic==null?(object)DBNull.Value:(object)printTemplate.XmlStatic)); - cmd.Parameters.Add(new SqlParameter("@TemplateOrder",printTemplate.TemplateOrder.HasValue?(object)printTemplate.TemplateOrder.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@IsValid",printTemplate.IsValid.HasValue?(object)printTemplate.IsValid.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@OperatorNo",printTemplate.OperatorNo==null?(object)DBNull.Value:(object)printTemplate.OperatorNo)); - cmd.Parameters.Add(new SqlParameter("@OperatorDate",printTemplate.OperatorDate.HasValue?(object)printTemplate.OperatorDate.Value:(object)DBNull.Value)); - return Convert.ToInt32(cmd.ExecuteScalar()); - } - /// - /// 不使用事务的插入方法 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(PrintTemplate printTemplate) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return Insert(cmd, printTemplate); - } - } - } - - /// - /// 使用事务的插入方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(Connection connection,PrintTemplate printTemplate) - { - return Insert(connection.Command, printTemplate); - } - #endregion - - #region 删除实体操作 - - - /// - /// 执行删除命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PrintTemplateMap()); - if (filterString != string.Empty) - { - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "delete from PrintTemplate " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的删除方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteDeleteCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的删除方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(Connection connection, string oql, ParameterList parameters) - { - return ExcuteDeleteCommand(connection.Command, oql, parameters); - } - - #endregion - - #region 更新实体操作 - - /// - /// 执行更新命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string updateString = SyntaxAnalyzer.ParseSql(oql, new PrintTemplateMap()); - cmd.CommandText = "update PrintTemplate set " + updateString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的更新方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteUpdateCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的更新方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(Connection connection, string oql, ParameterList parameters) - { - return ExcuteUpdateCommand(connection.Command, oql, parameters); - } - #endregion - - #region 查询实体集合 - /// - /// 执行Command获取对象列表 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体类对象列表 - internal static List ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - List printTemplateList = new List(); - using (SqlDataReader dr = cmd.ExecuteReader()) - { - while (dr.Read()) - { - PrintTemplate printTemplate = DataReaderToEntity(dr); - printTemplateList.Add(printTemplate); - } - } - return printTemplateList; - } - /// - /// 执行查询命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PrintTemplateMap()); - if (filterString != string.Empty) - { - if(filterString.Trim().ToLower().IndexOf("order ")!=0) - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "select * from PrintTemplate " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 实体类对象集合 - internal static List Select() - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from PrintTemplate"; - return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1); - } - } - } - /// - /// 根据对象查询语句查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from PrintTemplate"; - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合(启用事务) - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - - /// - /// 递归查询单个实体 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PrintTemplate ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - PrintTemplate printTemplate=null; - using (SqlDataReader dr = cmd.ExecuteReader()) - { - if(dr.Read()) - printTemplate = DataReaderToEntity(dr); - } - if(printTemplate==null) - return printTemplate; - return printTemplate; - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PrintTemplate ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new PrintTemplateMap()); - if(filterString!=string.Empty) - { - filterString=" where "+filterString; - } - cmd.CommandText = "select * from PrintTemplate " + filterString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static PrintTemplate SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 更据对象查询语句查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static PrintTemplate SelectSingle(string oql, ParameterList parameters) - { - return SelectSingle(oql,parameters,RecursiveType.Parent,1); - } - - /// - /// 更据对象查询语句并启用事务查询单个实体 - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static PrintTemplate SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); - } - - #endregion - - - /// - /// 从DataReader中取出值生成实体对象 - /// - /// 查询对象 - /// 过滤条件字符串 - private static PrintTemplate DataReaderToEntity(SqlDataReader dr) - { - PrintTemplate entity = new PrintTemplate (); - if(dr["Id"]!=System.DBNull.Value) - { - entity.Id=Convert.ToInt32(dr["Id"]); - } - if(dr["ParentId"]!=System.DBNull.Value) - { - entity.ParentId=Convert.ToInt32(dr["ParentId"]); - } - if(dr["XmlFileName"]!=System.DBNull.Value) - { - entity.XmlFileName=dr["XmlFileName"].ToString(); - } - if(dr["XmlFile"]!=System.DBNull.Value) - { - entity.XmlFile=dr["XmlFile"].ToString(); - } - if(dr["XmlStatic"]!=System.DBNull.Value) - { - entity.XmlStatic=dr["XmlStatic"].ToString(); - } - if(dr["TemplateOrder"]!=System.DBNull.Value) - { - entity.TemplateOrder=Convert.ToInt32(dr["TemplateOrder"]); - } - if(dr["IsValid"]!=System.DBNull.Value) - { - entity.IsValid=Convert.ToInt32(dr["IsValid"]); - } - if(dr["OperatorNo"]!=System.DBNull.Value) - { - entity.OperatorNo=dr["OperatorNo"].ToString(); - } - if(dr["OperatorDate"]!=System.DBNull.Value) - { - entity.OperatorDate=Convert.ToDateTime(dr["OperatorDate"]); - } - return entity; - } - } -} - diff --git a/AIMSEntity/OldEntity/DAL/DUseDrugsReport.cs b/AIMSEntity/DAL/AutoGenerate/DUseDrugsReport.cs similarity index 100% rename from AIMSEntity/OldEntity/DAL/DUseDrugsReport.cs rename to AIMSEntity/DAL/AutoGenerate/DUseDrugsReport.cs diff --git a/AIMSEntity/DAL/AutoGenerate/DUserTempPurview.cs b/AIMSEntity/DAL/AutoGenerate/DUserTempPurview.cs deleted file mode 100644 index d8db6bb..0000000 --- a/AIMSEntity/DAL/AutoGenerate/DUserTempPurview.cs +++ /dev/null @@ -1,591 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using AIMSModel; -using AIMSObjectQuery; -using System.Collections.Generic; - -namespace AIMSDAL -{ - internal partial class DUserTempPurview - { - #region 插入实体操作部份 - /// - /// 插入 - /// - /// Command对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(SqlCommand cmd, UserTempPurview userTempPurview) - { - cmd.Parameters.Clear(); - cmd.CommandText = "insert into UserTempPurview (TemplateId,RoleId) values (@TemplateId,@RoleId);select @@identity"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@TemplateId",userTempPurview.TemplateId.HasValue?(object)userTempPurview.TemplateId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@RoleId",userTempPurview.RoleId.HasValue?(object)userTempPurview.RoleId.Value:(object)DBNull.Value)); - return Convert.ToInt32(cmd.ExecuteScalar()); - } - /// - /// 不使用事务的插入方法 - /// - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(UserTempPurview userTempPurview) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return Insert(cmd, userTempPurview); - } - } - } - - /// - /// 使用事务的插入方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 标识列值或影响的记录行数 - internal static int Insert(Connection connection,UserTempPurview userTempPurview) - { - return Insert(connection.Command, userTempPurview); - } - #endregion - - #region 删除实体操作 - - /// - /// 删除 - /// - /// Command对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, UserTempPurview userTempPurview) - { - cmd.Parameters.Clear(); - cmd.CommandText = "delete from UserTempPurview where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@Id", userTempPurview.Id)); - return cmd.ExecuteNonQuery(); - } - /// - /// 不使用事务的删除方法 - /// - /// 实体类对象 - /// 影响的记录行数 - internal static int Delete(UserTempPurview userTempPurview) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteDeleteCommand(cmd, userTempPurview); - } - } - } - /// - /// 使用事务的删除方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int Delete(Connection connection,UserTempPurview userTempPurview) - { - return ExcuteDeleteCommand(connection.Command, userTempPurview); - } - - /// - /// 执行删除命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteDeleteCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new UserTempPurviewMap()); - if (filterString != string.Empty) - { - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "delete from UserTempPurview " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的删除方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteDeleteCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的删除方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Delete(Connection connection, string oql, ParameterList parameters) - { - return ExcuteDeleteCommand(connection.Command, oql, parameters); - } - - #endregion - - #region 更新实体操作 - - /// - /// 更新 - /// - /// Command对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, UserTempPurview userTempPurview) - { - cmd.CommandText = "update UserTempPurview set TemplateId=@TemplateId,RoleId=@RoleId where Id=@Id"; - //从实体中取出值放入Command的参数列表 - cmd.Parameters.Add(new SqlParameter("@TemplateId",userTempPurview.TemplateId.HasValue?(object)userTempPurview.TemplateId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@RoleId",userTempPurview.RoleId.HasValue?(object)userTempPurview.RoleId.Value:(object)DBNull.Value)); - cmd.Parameters.Add(new SqlParameter("@Id", userTempPurview.Id)); - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的更新方法 - /// - /// 实体类对象 - /// 影响的记录行数 - internal static int Update(UserTempPurview userTempPurview) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteUpdateCommand(cmd, userTempPurview); - } - } - } - /// - /// 使用事务的更新方法 - /// - /// 实现共享Connection的对象 - /// 实体类对象 - /// 影响的记录行数 - internal static int Update(Connection connection,UserTempPurview userTempPurview) - { - return ExcuteUpdateCommand(connection.Command, userTempPurview); - } - /// - /// 执行更新命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int ExcuteUpdateCommand(SqlCommand cmd, string oql, ParameterList parameters) - { - //解析过滤部份Sql语句 - string updateString = SyntaxAnalyzer.ParseSql(oql, new UserTempPurviewMap()); - cmd.CommandText = "update UserTempPurview set " + updateString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return cmd.ExecuteNonQuery(); - } - - /// - /// 不使用事务的更新方法 - /// - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(string oql, ParameterList parameters) - { - using (SqlConnection conn = new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteUpdateCommand(cmd, oql, parameters); - } - } - } - - /// - /// 使用事务的更新方法 - /// - /// 实现共享Connection的对象 - /// 对象查询语句 - /// 参数列表 - /// 影响的记录行数 - internal static int Update(Connection connection, string oql, ParameterList parameters) - { - return ExcuteUpdateCommand(connection.Command, oql, parameters); - } - #endregion - - #region 查询实体集合 - /// - /// 执行Command获取对象列表 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体类对象列表 - internal static List ExcuteSelectCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - List userTempPurviewList = new List(); - using (SqlDataReader dr = cmd.ExecuteReader()) - { - while (dr.Read()) - { - UserTempPurview userTempPurview = DataReaderToEntity(dr); - userTempPurviewList.Add(userTempPurview); - } - } - return userTempPurviewList; - } - /// - /// 执行查询命令 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List ExcuteSelectCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new UserTempPurviewMap()); - if (filterString != string.Empty) - { - if(filterString.Trim().ToLower().IndexOf("order ")!=0) - filterString = " where " + filterString; - } - cmd.Parameters.Clear(); - cmd.CommandText = "select * from UserTempPurview " + filterString; - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 实体类对象集合 - internal static List Select() - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from UserTempPurview"; - return ExcuteSelectCommand(cmd, RecursiveType.Parent, 1); - } - } - } - /// - /// 根据对象查询语句查询实体集合 - /// - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - cmd.CommandText = "select * from UserTempPurview"; - return ExcuteSelectCommand(cmd, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, RecursiveType.Parent, 1); - } - } - } - - /// - /// 根据对象查询语句查询实体集合 - /// - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(string oql, ParameterList parameters,RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 根据对象查询语句查询实体集合(启用事务) - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体类对象集合 - internal static List Select(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectCommand(connection.Command, oql, parameters,recursiveType, recursiveDepth); - } - #endregion - - #region 查询单个实体 - - /// - /// 递归查询单个实体 - /// - /// Command对象 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static UserTempPurview ExcuteSelectSingleCommand(SqlCommand cmd,RecursiveType recursiveType,int recursiveDepth) - { - UserTempPurview userTempPurview=null; - using (SqlDataReader dr = cmd.ExecuteReader()) - { - if(dr.Read()) - userTempPurview = DataReaderToEntity(dr); - } - if(userTempPurview==null) - return userTempPurview; - return userTempPurview; - } - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static UserTempPurview ExcuteSelectSingleCommand(SqlCommand cmd, string oql, ParameterList parameters,RecursiveType recursiveType,int recursiveDepth) - { - //解析过滤部份Sql语句 - string filterString = SyntaxAnalyzer.ParseSql(oql, new UserTempPurviewMap()); - if(filterString!=string.Empty) - { - filterString=" where "+filterString; - } - cmd.CommandText = "select * from UserTempPurview " + filterString; - cmd.Parameters.Clear(); - //添加参数 - if (parameters != null) - { - foreach (string key in parameters.Keys) - { - cmd.Parameters.Add(new SqlParameter(key, parameters[key])); - } - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 更据对象查询语句递归查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static UserTempPurview SelectSingle(string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return ExcuteSelectSingleCommand(cmd, oql, parameters, recursiveType, recursiveDepth); - } - } - } - - /// - /// 更据对象查询语句查询单个实体 - /// - /// Command对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static UserTempPurview SelectSingle(string oql, ParameterList parameters) - { - return SelectSingle(oql,parameters,RecursiveType.Parent,1); - } - - /// - /// 更据对象查询语句并启用事务查询单个实体 - /// - /// 连接对象 - /// 对象查询语句 - /// 参数列表 - /// 实体对象 - internal static UserTempPurview SelectSingle(Connection connection, string oql, ParameterList parameters, RecursiveType recursiveType, int recursiveDepth) - { - return ExcuteSelectSingleCommand(connection.Command, oql, parameters, recursiveType, recursiveDepth); - } - - /// - /// 更据主键值递归查询单个实体 - /// - /// Command对象 - /// 主键值 - /// 递归类型 - /// 递归深度 - /// 实体对象 - internal static UserTempPurview SelectSingle(SqlCommand cmd, int? id,RecursiveType recursiveType,int recursiveDepth) - { - cmd.Parameters.Clear(); - if(id.HasValue) - { - cmd.CommandText = "select * from UserTempPurview where Id=@pk"; - cmd.Parameters.Add(new SqlParameter("@pk",id.Value)); - } - else - { - cmd.CommandText = "select * from UserTempPurview where Id is null"; - } - return ExcuteSelectSingleCommand(cmd, recursiveType, recursiveDepth); - } - - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 实体类对象 - internal static UserTempPurview SelectSingle(int? id) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return SelectSingle(cmd,id,RecursiveType.Parent,1); - } - } - } - /// - /// 按主键字段查询特定实体 - /// - /// 主键值 - /// 递归类型 - /// 递归深度 - /// 实体类对象 - internal static UserTempPurview SelectSingle(int? id, RecursiveType recursiveType, int recursiveDepth) - { - using(SqlConnection conn=new SqlConnection(Connection.ConnectionString)) - { - conn.Open(); - using (SqlCommand cmd = conn.CreateCommand()) - { - return SelectSingle(cmd,id, recursiveType, recursiveDepth); - } - } - } - - /// - /// 使用事务并按主键字段查询特定实体 - /// - /// 连接对象 - /// 主键值 - /// 实体类对象 - internal static UserTempPurview SelectSingle(Connection connection,int? id, RecursiveType recursiveType, int recursiveDepth) - { - return SelectSingle(connection.Command, id, recursiveType, recursiveDepth); - } - #endregion - - - /// - /// 从DataReader中取出值生成实体对象 - /// - /// 查询对象 - /// 过滤条件字符串 - private static UserTempPurview DataReaderToEntity(SqlDataReader dr) - { - UserTempPurview entity = new UserTempPurview (); - if(dr["Id"]!=System.DBNull.Value) - { - entity.Id=Convert.ToInt32(dr["Id"]); - } - if(dr["TemplateId"]!=System.DBNull.Value) - { - entity.TemplateId=Convert.ToInt32(dr["TemplateId"]); - } - if(dr["RoleId"]!=System.DBNull.Value) - { - entity.RoleId=Convert.ToInt32(dr["RoleId"]); - } - return entity; - } - } -} - diff --git a/AIMSEntity/DAL/Extension/DAnaesthesiaMethod.cs b/AIMSEntity/DAL/Extension/DAnaesthesiaMethod.cs index 96ca578..f538eed 100644 --- a/AIMSEntity/DAL/Extension/DAnaesthesiaMethod.cs +++ b/AIMSEntity/DAL/Extension/DAnaesthesiaMethod.cs @@ -5,9 +5,63 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DAnaesthesiaMethod - { + { + public static AnaesthesiaMethod GetModel(int Id) + { + AnaesthesiaMethod AnaesthesiaMethodObj = new AnaesthesiaMethod(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,ParentId,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from AnaesthesiaMethod "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + AnaesthesiaMethodObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + AnaesthesiaMethodObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + AnaesthesiaMethodObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["ParentId"].ToString() != "") + { + AnaesthesiaMethodObj.ParentId = int.Parse(ds.Tables[0].Rows[0]["ParentId"].ToString()); + } + if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") + { + AnaesthesiaMethodObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + AnaesthesiaMethodObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + AnaesthesiaMethodObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + AnaesthesiaMethodObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + AnaesthesiaMethodObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return AnaesthesiaMethodObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[ParentId],[UseRate],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM AnaesthesiaMethod "); + if (strWhere.Trim() != "") + { + + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs b/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs index eb43a83..282f997 100644 --- a/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs +++ b/AIMSEntity/DAL/Extension/DApplyAnaesthesiaMethod.cs @@ -5,9 +5,49 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DApplyAnaesthesiaMethod { + public static void Add(ApplyAnaesthesiaMethod ApplyAnaesthesiaMethodObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [ApplyAnaesthesiaMethod]("); + strSql.Append("OperationApplyId,AnaesthesiaMethodId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("" + ApplyAnaesthesiaMethodObj.OperationApplyId + ","); + strSql.Append("" + ApplyAnaesthesiaMethodObj.AnaesthesiaMethodId + ","); + strSql.Append("'" + ApplyAnaesthesiaMethodObj.OperatorNo + "',"); + strSql.Append("'" + ApplyAnaesthesiaMethodObj.OperatorName + "',"); + strSql.Append("'" + ApplyAnaesthesiaMethodObj.OperateDate + "'"); + strSql.Append(")"); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int OperationApplyId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete ApplyAnaesthesiaMethod "); + strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static List GetApplyAnaesthesiaMethodList(int OperationApplyId) + { + List ApplyAnaesthesiaMethodIdList = new List(); + string strSql = "SELECT AnaesthesiaMethodId FROM ApplyAnaesthesiaMethod WHERE OperationApplyId='" + OperationApplyId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + ApplyAnaesthesiaMethodIdList.Add(int.Parse(dt.Rows[i]["AnaesthesiaMethodId"].ToString())); + + } + return ApplyAnaesthesiaMethodIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DApplyDiagnoseInfo.cs b/AIMSEntity/DAL/Extension/DApplyDiagnoseInfo.cs index 012036b..919320a 100644 --- a/AIMSEntity/DAL/Extension/DApplyDiagnoseInfo.cs +++ b/AIMSEntity/DAL/Extension/DApplyDiagnoseInfo.cs @@ -5,9 +5,47 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DApplyDiagnoseInfo { + public static void Add(ApplyDiagnoseInfo ApplyDiagnoseInfoObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [ApplyDiagnoseInfo]("); + strSql.Append("OperationApplyId,DiagnoseId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("" + ApplyDiagnoseInfoObj.OperationApplyId + ","); + strSql.Append("" + ApplyDiagnoseInfoObj.DiagnoseId + ","); + strSql.Append("'" + ApplyDiagnoseInfoObj.OperatorNo + "',"); + strSql.Append("'" + ApplyDiagnoseInfoObj.OperatorName + "',"); + strSql.Append("'" + ApplyDiagnoseInfoObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int OperationApplyId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete ApplyDiagnoseInfo "); + strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static List GetApplyDiagnoseIdList(int OperationApplyId) + { + List DiagnoseIdList = new List(); + string strSql = "SELECT DiagnoseId FROM ApplyDiagnoseInfo WHERE OperationApplyId='" + OperationApplyId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + DiagnoseIdList.Add(int.Parse(dt.Rows[i]["DiagnoseId"].ToString())); + + } + return DiagnoseIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DApplyOperationCutType.cs b/AIMSEntity/DAL/Extension/DApplyOperationCutType.cs index b20fb6b..0cf7fb8 100644 --- a/AIMSEntity/DAL/Extension/DApplyOperationCutType.cs +++ b/AIMSEntity/DAL/Extension/DApplyOperationCutType.cs @@ -5,9 +5,49 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DApplyOperationCutType { + public static void Add(ApplyOperationCutType ApplyOperationCutTypeObj ) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [ApplyOperationCutType]("); + strSql.Append("OperationApplyId,OperationCutTypeId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+ApplyOperationCutTypeObj.OperationApplyId+","); + strSql.Append(""+ApplyOperationCutTypeObj.OperationCutTypeId+","); + strSql.Append("'"+ApplyOperationCutTypeObj.OperatorNo+"',"); + strSql.Append("'"+ApplyOperationCutTypeObj.OperatorName+"',"); + strSql.Append("'"+ApplyOperationCutTypeObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + + } + + public static void Delete(int OperationApplyId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete ApplyOperationCutType "); + strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static List GetApplyOperationCutTypeIdList(int OperationApplyId) + { + List ApplyOperationCutTypeIdList = new List(); + string strSql = "SELECT OperationCutTypeId FROM ApplyOperationCutType WHERE OperationApplyId='" + OperationApplyId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + for (int i = 0; i < dt.Rows.Count; i++) + { + ApplyOperationCutTypeIdList.Add(int.Parse(dt.Rows[i]["OperationCutTypeId"].ToString())); + } + return ApplyOperationCutTypeIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DApplyOperationInfo.cs b/AIMSEntity/DAL/Extension/DApplyOperationInfo.cs index c1a0ad5..c152e75 100644 --- a/AIMSEntity/DAL/Extension/DApplyOperationInfo.cs +++ b/AIMSEntity/DAL/Extension/DApplyOperationInfo.cs @@ -5,9 +5,55 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DApplyOperationInfo { + public static void Add(ApplyOperationInfo ApplyOperationInfoObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [ApplyOperationInfo]("); + strSql.Append("OperationApplyId,OperationId,OperatorNo,OperatorName,OperateDate,OperationName,LeftRemark,RightRemark"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+ApplyOperationInfoObj.OperationApplyId+","); + strSql.Append(""+ApplyOperationInfoObj.OperationId+","); + strSql.Append("'"+ApplyOperationInfoObj.OperatorNo+"',"); + strSql.Append("'"+ApplyOperationInfoObj.OperatorName+"',"); + strSql.Append("'"+ApplyOperationInfoObj.OperateDate+"',"); + strSql.Append("'"+ApplyOperationInfoObj.OperationName+"',"); + strSql.Append("'"+ApplyOperationInfoObj.LeftRemark+"',"); + strSql.Append("'"+ApplyOperationInfoObj.RightRemark+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int OperationApplyId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete ApplyOperationInfo "); + strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static List GetApplyOperationIdList(int OperationApplyId) + { + List OperationIdList = new List(); + string strSql = "SELECT * FROM ApplyOperationInfo WHERE OperationApplyId='" + OperationApplyId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + ApplyOperationInfo info = new ApplyOperationInfo(); + info.OperationId = int.Parse(dt.Rows[i]["OperationId"].ToString()); + info.OperationName = dt.Rows[i]["OperationName"].ToString(); + info.LeftRemark = dt.Rows[i]["LeftRemark"].ToString(); + info.RightRemark = dt.Rows[i]["RightRemark"].ToString(); + OperationIdList.Add(info); + } + return OperationIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DApplyOperationPosition.cs b/AIMSEntity/DAL/Extension/DApplyOperationPosition.cs index e28a7c9..5292210 100644 --- a/AIMSEntity/DAL/Extension/DApplyOperationPosition.cs +++ b/AIMSEntity/DAL/Extension/DApplyOperationPosition.cs @@ -5,9 +5,48 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DApplyOperationPosition { + public static void Add(ApplyOperationPosition ApplyOperationPositionObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [ApplyOperationPosition]("); + strSql.Append("OperationApplyId,OperationPositionId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+ApplyOperationPositionObj.OperationApplyId+","); + strSql.Append(""+ApplyOperationPositionObj.OperationPositionId+","); + strSql.Append("'"+ApplyOperationPositionObj.OperatorNo+"',"); + strSql.Append("'"+ApplyOperationPositionObj.OperatorName+"',"); + strSql.Append("'"+ApplyOperationPositionObj.OperateDate+"'"); + strSql.Append(")"); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int OperationApplyId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete ApplyOperationPosition "); + strSql.Append(" where OperationApplyId=" + OperationApplyId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static List GetApplyOperationPositionIdList(int OperationApplyId) + { + List ApplyOperationPositionIdList = new List(); + string strSql = "SELECT OperationPositionId FROM ApplyOperationPosition WHERE OperationApplyId='" + OperationApplyId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + for (int i = 0; i < dt.Rows.Count; i++) + { + ApplyOperationPositionIdList.Add(int.Parse(dt.Rows[i]["OperationPositionId"].ToString())); + } + return ApplyOperationPositionIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs b/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs index 12131aa..f26a57e 100644 --- a/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs +++ b/AIMSEntity/DAL/Extension/DApplyPersonDuty.cs @@ -5,9 +5,53 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DApplyPersonDuty { + public static int Add(ApplyPersonDuty ApplyPersonDutyObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [ApplyPersonDuty]("); + strSql.Append("OperationApplyId,PersonDutyId,PersonId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+ApplyPersonDutyObj.OperationApplyId+","); + strSql.Append(""+ApplyPersonDutyObj.PersonDutyId+","); + strSql.Append(""+ApplyPersonDutyObj.PersonId+","); + strSql.Append("'"+ApplyPersonDutyObj.OperatorNo+"',"); + strSql.Append("'"+ApplyPersonDutyObj.OperatorName+"',"); + strSql.Append("'"+ApplyPersonDutyObj.OperateDate+"'"); + strSql.Append(")"); + return HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int OperationApplyId, int PersonDutyId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete ApplyPersonDuty "); + strSql.Append(" where PersonDutyId ="+PersonDutyId+" and OperationApplyId=" + OperationApplyId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static List GetPersonIdList(int OperationApplyId,int PersonDutyId) + { + List PersonIdList = new List(); + string strSql = "SELECT PersonId FROM ApplyPersonDuty WHERE OperationApplyId=" + OperationApplyId + " AND PersonDutyId =" + PersonDutyId + ""; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + for (int i = 0; i < dt.Rows.Count; i++) + { + PersonIdList.Add(int.Parse(dt.Rows[i]["PersonId"].ToString())); + } + + return PersonIdList; + } + public static DataTable GetPersonDataTable(int OperationApplyId) + { + List PersonIdList = new List(); + string strSql = "SELECT PersonDutyId,PersonId FROM ApplyPersonDuty WHERE OperationApplyId=" + OperationApplyId + ""; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } } } diff --git a/AIMSEntity/DAL/Extension/DBasicDictionary.cs b/AIMSEntity/DAL/Extension/DBasicDictionary.cs index 605e9b8..8787047 100644 --- a/AIMSEntity/DAL/Extension/DBasicDictionary.cs +++ b/AIMSEntity/DAL/Extension/DBasicDictionary.cs @@ -6,6 +6,8 @@ using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; using HelperDB; +using System.Reflection; +using System.Text; namespace AIMSDAL { @@ -16,5 +18,249 @@ namespace AIMSDAL string sql = "select * from BasicDictionary" + (where == "" ? "" : " where " + where); return DBHelper.GetDataTable(sql); } + + public static void Add(BasicDictionary BasicDictionaryObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [BasicDictionary]("); + strSql.Append("Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + BasicDictionaryObj.Name + "',"); + strSql.Append("" + BasicDictionaryObj.ParentId + ","); + strSql.Append("'" + BasicDictionaryObj.HelpCode + "',"); + strSql.Append("" + BasicDictionaryObj.Order + ","); + strSql.Append("" + BasicDictionaryObj.IsValid + ","); + strSql.Append("'" + BasicDictionaryObj.OperatorNo + "',"); + strSql.Append("'" + BasicDictionaryObj.OperatorName + "',"); + strSql.Append("'" + BasicDictionaryObj.OperateDate + "',"); + strSql.Append("'" + BasicDictionaryObj.Remark + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static BasicDictionary GetModel(int Id) + { + BasicDictionary BasicDictionaryObj = new BasicDictionary(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); + strSql.Append(" from BasicDictionary "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + BasicDictionaryObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + BasicDictionaryObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + if (ds.Tables[0].Rows[0]["ParentId"].ToString() != "") + { + BasicDictionaryObj.ParentId = int.Parse(ds.Tables[0].Rows[0]["ParentId"].ToString()); + } + BasicDictionaryObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["Order"].ToString() != "") + { + BasicDictionaryObj.Order = int.Parse(ds.Tables[0].Rows[0]["Order"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + BasicDictionaryObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + BasicDictionaryObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + BasicDictionaryObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + BasicDictionaryObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + BasicDictionaryObj.Remark = ds.Tables[0].Rows[0]["Remark"].ToString(); + + BasicDictionaryObj.Children = GetChildren(BasicDictionaryObj); + } + return BasicDictionaryObj; + } + + + public static List GetChildren(BasicDictionary BasicDictionary) + { + List children = new List(); + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); + strSql.Append(" from BasicDictionary "); + strSql.Append(" where ParentId=" + BasicDictionary.Id + " order by [Order]"); + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + BasicDictionary BasicDictionaryObj = new BasicDictionary(); + + if (dt.Rows[i]["Id"].ToString() != "") + { + BasicDictionaryObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + } + BasicDictionaryObj.Name = dt.Rows[i]["Name"].ToString(); + if (dt.Rows[i]["ParentId"].ToString() != "") + { + BasicDictionaryObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); + } + BasicDictionaryObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); + if (dt.Rows[i]["Order"].ToString() != "") + { + BasicDictionaryObj.Order = int.Parse(dt.Rows[i]["Order"].ToString()); + } + if (dt.Rows[i]["IsValid"].ToString() != "") + { + BasicDictionaryObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); + } + BasicDictionaryObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); + BasicDictionaryObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); + if (dt.Rows[i]["OperateDate"].ToString() != "") + { + BasicDictionaryObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); + } + BasicDictionaryObj.Remark = dt.Rows[i]["Remark"].ToString(); + + children.Add(BasicDictionaryObj); + BasicDictionaryObj.Children = GetChildren(BasicDictionaryObj); + } + return children; + } + + + public static List GetModelList(int ParentId) + { + List BasicDictionaryListObj = new List(); + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); + strSql.Append(" from BasicDictionary "); + strSql.Append(" where ParentId=" + ParentId + " order by [Order]"); + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < dt.Rows.Count; i++) + { + BasicDictionary BasicDictionaryObj = new BasicDictionary(); + + if (dt.Rows[i]["Id"].ToString() != "") + { + BasicDictionaryObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + } + BasicDictionaryObj.Name = dt.Rows[i]["Name"].ToString(); + if (dt.Rows[i]["ParentId"].ToString() != "") + { + BasicDictionaryObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); + } + BasicDictionaryObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); + if (dt.Rows[i]["Order"].ToString() != "") + { + BasicDictionaryObj.Order = int.Parse(dt.Rows[i]["Order"].ToString()); + } + if (dt.Rows[i]["IsValid"].ToString() != "") + { + BasicDictionaryObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); + } + BasicDictionaryObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); + BasicDictionaryObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); + if (dt.Rows[i]["OperateDate"].ToString() != "") + { + BasicDictionaryObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); + } + BasicDictionaryObj.Remark = dt.Rows[i]["Remark"].ToString(); + BasicDictionaryListObj.Add(BasicDictionaryObj); + } + return BasicDictionaryListObj; + } + + public static List GetModelParentList() + { + List BasicDictionaryListObj = new List(); + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); + strSql.Append(" from BasicDictionary where ParentId=0"); + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < dt.Rows.Count; i++) + { + BasicDictionary BasicDictionaryObj = new BasicDictionary(); + + if (dt.Rows[i]["Id"].ToString() != "") + { + BasicDictionaryObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + } + BasicDictionaryObj.Name = dt.Rows[i]["Name"].ToString(); + if (dt.Rows[i]["ParentId"].ToString() != "") + { + BasicDictionaryObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); + } + BasicDictionaryObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); + if (dt.Rows[i]["Order"].ToString() != "") + { + BasicDictionaryObj.Order = int.Parse(dt.Rows[i]["Order"].ToString()); + } + if (dt.Rows[i]["IsValid"].ToString() != "") + { + BasicDictionaryObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); + } + BasicDictionaryObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); + BasicDictionaryObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); + if (dt.Rows[i]["OperateDate"].ToString() != "") + { + BasicDictionaryObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); + } + BasicDictionaryObj.Remark = dt.Rows[i]["Remark"].ToString(); + BasicDictionaryListObj.Add(BasicDictionaryObj); + } + return BasicDictionaryListObj; + } + + public static DataTable GetDataDictionaryDataTable(int ParentId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[ParentId],[HelpCode],[Order],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,[Remark] "); + strSql.Append(" FROM BasicDictionary WHERE Id=" + ParentId + ""); + + strSql.Append("UNION ALL "); + + + strSql.Append("select [Id],[Name],[ParentId],[HelpCode],[Order],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,[Remark] "); + strSql.Append(" FROM BasicDictionary WHERE ParentId=" + ParentId + " order by [Order]"); + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetDataDictionaryDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[ParentId],[HelpCode],[Order],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,[Remark] "); + strSql.Append(" FROM BasicDictionary "); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetDataDictionaryDataTableByParentName(string ParentName, string HelpCode) + { + string strSql = "SELECT bd.Id, bd.Name FROM BasicDictionary bd WHERE bd.IsValid=1 and ParentId IN " + + "(SELECT Id FROM BasicDictionary WHERE NAME='" + ParentName + "') AND (bd.Name LIKE '%" + HelpCode + "%' OR bd.HelpCode LIKE '%" + HelpCode + "%') ORDER BY bd.[Order]"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetDataDictionaryNameAndRemark(string ParentName, string HelpCode) + { + string strSql = "SELECT bd.Id, CASE bd.Remark WHEN '' THEN bd.NAME ELSE bd.NAME+ '-' + bd.Remark END AS NAME FROM BasicDictionary bd WHERE bd.IsValid=1 and ParentId IN " + + "(SELECT Id FROM BasicDictionary WHERE NAME='" + ParentName + "') AND (bd.Name LIKE '%" + HelpCode + "%' OR bd.HelpCode LIKE '%" + HelpCode + "%') ORDER BY bd.[Order]"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + } } diff --git a/AIMSEntity/DAL/Extension/DDepartment.cs b/AIMSEntity/DAL/Extension/DDepartment.cs index 67d7101..ec8213e 100644 --- a/AIMSEntity/DAL/Extension/DDepartment.cs +++ b/AIMSEntity/DAL/Extension/DDepartment.cs @@ -5,9 +5,259 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DDepartment { + + public static void Add(Department DepartmentObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Department]("); + strSql.Append("Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + DepartmentObj.Name + "',"); + strSql.Append("'" + DepartmentObj.HelpCode + "',"); + strSql.Append("'" + DepartmentObj.Kind + "',"); + strSql.Append("" + DepartmentObj.Clinic + ","); + strSql.Append("" + DepartmentObj.Hospital + ","); + strSql.Append("" + DepartmentObj.DepOrder + ","); + strSql.Append("'" + DepartmentObj.DepAddress + "',"); + strSql.Append("" + DepartmentObj.IsValid + ","); + strSql.Append("'" + DepartmentObj.OperatorNo + "',"); + strSql.Append("'" + DepartmentObj.OperatorName + "',"); + strSql.Append("'" + DepartmentObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + //public static void Update(Department DepartmentObj) + //{ + // StringBuilder strSql = new StringBuilder(); + // strSql.Append("update Department set "); + // strSql.Append("Name='" + DepartmentObj.Name + "',"); + // strSql.Append("HelpCode='" + DepartmentObj.HelpCode + "',"); + // strSql.Append("Kind='" + DepartmentObj.Kind + "',"); + // strSql.Append("Clinic=" + DepartmentObj.Clinic + ","); + // strSql.Append("Hospital=" + DepartmentObj.Hospital + ","); + // strSql.Append("DepOrder=" + DepartmentObj.DepOrder + ","); + // strSql.Append("DepAddress='" + DepartmentObj.DepAddress + "',"); + // strSql.Append("IsValid=" + DepartmentObj.IsValid + ","); + // strSql.Append("OperatorNo='" + DepartmentObj.OperatorNo + "',"); + // strSql.Append("OperatorName='" + DepartmentObj.OperatorName + "',"); + // strSql.Append("OperateDate='" + DepartmentObj.OperateDate + "'"); + // strSql.Append(" where Id=" + DepartmentObj.Id + " "); + // HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + //} + + public static Department GetModel(int Id) + { + Department DepartmentObj = new Department(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Department "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + DepartmentObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DepartmentObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + DepartmentObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + DepartmentObj.Kind = ds.Tables[0].Rows[0]["Kind"].ToString(); + if (ds.Tables[0].Rows[0]["Clinic"].ToString() != "") + { + DepartmentObj.Clinic = int.Parse(ds.Tables[0].Rows[0]["Clinic"].ToString()); + } + if (ds.Tables[0].Rows[0]["Hospital"].ToString() != "") + { + DepartmentObj.Hospital = int.Parse(ds.Tables[0].Rows[0]["Hospital"].ToString()); + } + if (ds.Tables[0].Rows[0]["DepOrder"].ToString() != "") + { + DepartmentObj.DepOrder = int.Parse(ds.Tables[0].Rows[0]["DepOrder"].ToString()); + } + DepartmentObj.DepAddress = ds.Tables[0].Rows[0]["DepAddress"].ToString(); + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + DepartmentObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DepartmentObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DepartmentObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + DepartmentObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DepartmentObj; + } + + public static Department GetModelName(string Name) + { + Department DepartmentObj = new Department(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Department "); + strSql.Append(" where Name=" + Name + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + DepartmentObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DepartmentObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + DepartmentObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + DepartmentObj.Kind = ds.Tables[0].Rows[0]["Kind"].ToString(); + if (ds.Tables[0].Rows[0]["Clinic"].ToString() != "") + { + DepartmentObj.Clinic = int.Parse(ds.Tables[0].Rows[0]["Clinic"].ToString()); + } + if (ds.Tables[0].Rows[0]["Hospital"].ToString() != "") + { + DepartmentObj.Hospital = int.Parse(ds.Tables[0].Rows[0]["Hospital"].ToString()); + } + if (ds.Tables[0].Rows[0]["DepOrder"].ToString() != "") + { + DepartmentObj.DepOrder = int.Parse(ds.Tables[0].Rows[0]["DepOrder"].ToString()); + } + DepartmentObj.DepAddress = ds.Tables[0].Rows[0]["DepAddress"].ToString(); + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + DepartmentObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DepartmentObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DepartmentObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + DepartmentObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DepartmentObj; + } + public static DataTable GetDepartmentDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[Kind]," + + "CASE Clinic WHEN 1 THEN '是' WHEN 0 THEN '否' END AS Clinic ," + + "CASE Hospital WHEN 1 THEN '是' WHEN 0 THEN '否' END AS Hospital ," + + "[DepOrder],[DepAddress],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM Department "); + if (strWhere.Trim() != "") + { + + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetDepartmentAllList(string Kind) + { + List DepartmentListObj = new List(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Department "); + strSql.Append(" where IsValid=1 and Kind='" + Kind + "'"); + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + Department DepartmentObj = new Department(); + if (dt.Rows.Count > 0) + { + if (dt.Rows[i]["Id"].ToString() != "") + { + DepartmentObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + } + DepartmentObj.Name = dt.Rows[i]["Name"].ToString(); + DepartmentObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); + DepartmentObj.Kind = dt.Rows[i]["Kind"].ToString(); + if (dt.Rows[i]["Clinic"].ToString() != "") + { + DepartmentObj.Clinic = int.Parse(dt.Rows[i]["Clinic"].ToString()); + } + if (dt.Rows[i]["Hospital"].ToString() != "") + { + DepartmentObj.Hospital = int.Parse(dt.Rows[i]["Hospital"].ToString()); + } + if (dt.Rows[i]["DepOrder"].ToString() != "") + { + DepartmentObj.DepOrder = int.Parse(dt.Rows[i]["DepOrder"].ToString()); + } + DepartmentObj.DepAddress = dt.Rows[i]["DepAddress"].ToString(); + if (dt.Rows[i]["IsValid"].ToString() != "") + { + DepartmentObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); + } + DepartmentObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); + DepartmentObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); + if (dt.Rows[i]["OperateDate"].ToString() != "") + { + DepartmentObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); + } + } + DepartmentListObj.Add(DepartmentObj); + } + return DepartmentListObj; + } + public static List GetDepartmentAllListBYSql(string sql) + { + List DepartmentListObj = new List(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Department "); + strSql.Append(" where IsValid=1 " + sql + ""); + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + Department DepartmentObj = new Department(); + if (dt.Rows.Count > 0) + { + if (dt.Rows[i]["Id"].ToString() != "") + { + DepartmentObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + } + DepartmentObj.Name = dt.Rows[i]["Name"].ToString(); + DepartmentObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); + DepartmentObj.Kind = dt.Rows[i]["Kind"].ToString(); + if (dt.Rows[i]["Clinic"].ToString() != "") + { + DepartmentObj.Clinic = int.Parse(dt.Rows[i]["Clinic"].ToString()); + } + if (dt.Rows[i]["Hospital"].ToString() != "") + { + DepartmentObj.Hospital = int.Parse(dt.Rows[i]["Hospital"].ToString()); + } + if (dt.Rows[i]["DepOrder"].ToString() != "") + { + DepartmentObj.DepOrder = int.Parse(dt.Rows[i]["DepOrder"].ToString()); + } + DepartmentObj.DepAddress = dt.Rows[i]["DepAddress"].ToString(); + if (dt.Rows[i]["IsValid"].ToString() != "") + { + DepartmentObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); + } + DepartmentObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); + DepartmentObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); + if (dt.Rows[i]["OperateDate"].ToString() != "") + { + DepartmentObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); + } + } + DepartmentListObj.Add(DepartmentObj); + } + return DepartmentListObj; + } } } diff --git a/AIMSEntity/DAL/Extension/DDisease.cs b/AIMSEntity/DAL/Extension/DDisease.cs index 8e9c808..1ea357b 100644 --- a/AIMSEntity/DAL/Extension/DDisease.cs +++ b/AIMSEntity/DAL/Extension/DDisease.cs @@ -5,9 +5,120 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DDisease { + + public static bool IsExit(string Name) + { + + string strSql = "select * from Disease where name ='" + Name + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + return true; + } + else + { + return false; + } + } + + public static void Add(Disease DiseaseObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Disease]("); + strSql.Append("IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + DiseaseObj.IcdCode + "',"); + strSql.Append("'" + DiseaseObj.Name + "',"); + strSql.Append("'" + DiseaseObj.HelpCode + "',"); + strSql.Append("" + DiseaseObj.UseRate + ","); + strSql.Append("" + DiseaseObj.IsValid + ","); + strSql.Append("'" + DiseaseObj.OperatorNo + "',"); + strSql.Append("'" + DiseaseObj.OperatorName + "',"); + strSql.Append("'" + DiseaseObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + //public static void Update(Disease DiseaseObj) + //{ + // StringBuilder strSql = new StringBuilder(); + // strSql.Append("update Disease set "); + // strSql.Append("IcdCode='" + DiseaseObj.IcdCode + "',"); + // strSql.Append("Name='" + DiseaseObj.Name + "',"); + // strSql.Append("HelpCode='" + DiseaseObj.HelpCode + "',"); + // strSql.Append("IsValid=" + DiseaseObj.IsValid + ","); + // strSql.Append("OperatorNo='" + DiseaseObj.OperatorNo + "',"); + // strSql.Append("OperatorName='" + DiseaseObj.OperatorName + "',"); + // strSql.Append("OperateDate='" + DiseaseObj.OperateDate + "'"); + // strSql.Append(" where Id=" + DiseaseObj.Id + " "); + // HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + //} + + public static Disease GetModel(int Id) + { + Disease DiseaseObj = new Disease(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Disease "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + DiseaseObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DiseaseObj.IcdCode = ds.Tables[0].Rows[0]["IcdCode"].ToString(); + DiseaseObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + DiseaseObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") + { + DiseaseObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + DiseaseObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DiseaseObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DiseaseObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + DiseaseObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DiseaseObj; + } + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id], IcdCode,[Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM Disease "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetDataTable(string HelpCode) + { + + string strSql = ""; + if (HelpCode == "") + { + strSql = "SELECT TOP 75 d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 order by UseRate desc"; + } + else + { + strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc"; + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DDosageKind.cs b/AIMSEntity/DAL/Extension/DDosageKind.cs index b7b07e0..8581bab 100644 --- a/AIMSEntity/DAL/Extension/DDosageKind.cs +++ b/AIMSEntity/DAL/Extension/DDosageKind.cs @@ -5,9 +5,81 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DDosageKind { + public static void Add(DosageKind DosageKindObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [DosageKind]("); + strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+DosageKindObj.Name+"',"); + strSql.Append("'"+DosageKindObj.HelpCode+"',"); + strSql.Append(""+DosageKindObj.IsValid+","); + strSql.Append("'"+DosageKindObj.OperatorNo+"',"); + strSql.Append("'"+DosageKindObj.OperatorName+"',"); + strSql.Append("'"+DosageKindObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + //public static void Update(DosageKind DosageKindObj) + //{ + // StringBuilder strSql=new StringBuilder(); + // strSql.Append("update DosageKind set "); + // strSql.Append("Name='"+DosageKindObj.Name+"',"); + // strSql.Append("HelpCode='"+DosageKindObj.HelpCode+"',"); + // strSql.Append("IsValid="+DosageKindObj.IsValid+","); + // strSql.Append("OperatorNo='"+DosageKindObj.OperatorNo+"',"); + // strSql.Append("OperatorName='"+DosageKindObj.OperatorName+"',"); + // strSql.Append("OperateDate='"+DosageKindObj.OperateDate+"'"); + // strSql.Append(" where Id="+DosageKindObj.Id+" "); + // HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + //} + + public static DosageKind GetModel(int Id) + { + DosageKind DosageKindObj = new DosageKind(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from DosageKind "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + DosageKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DosageKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + DosageKindObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + DosageKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DosageKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DosageKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + DosageKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DosageKindObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM DosageKind "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + } } diff --git a/AIMSEntity/DAL/Extension/DDosageUnit.cs b/AIMSEntity/DAL/Extension/DDosageUnit.cs index 64300eb..25d63b4 100644 --- a/AIMSEntity/DAL/Extension/DDosageUnit.cs +++ b/AIMSEntity/DAL/Extension/DDosageUnit.cs @@ -5,9 +5,81 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DDosageUnit { + public static void Add(DosageUnit DosageUnitObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [DosageUnit]("); + strSql.Append("Name,HelpCode,UnitType,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+DosageUnitObj.Name+"',"); + strSql.Append("'"+DosageUnitObj.HelpCode+"',"); + strSql.Append("'"+ DosageUnitObj.UnitType + "',"); + strSql.Append(""+DosageUnitObj.IsValid+","); + strSql.Append("'"+DosageUnitObj.OperatorNo+"',"); + strSql.Append("'"+DosageUnitObj.OperatorName+"',"); + strSql.Append("'"+DosageUnitObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static DosageUnit GetModel(int Id) + { + DosageUnit DosageUnitObj = new DosageUnit(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,UnitType,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from DosageUnit "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + DosageUnitObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DosageUnitObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + DosageUnitObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + DosageUnitObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + + if (ds.Tables[0].Rows[0]["UnitType"].ToString() != "") + { + DosageUnitObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["UnitType"].ToString()); + } + + DosageUnitObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DosageUnitObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + DosageUnitObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DosageUnitObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM DosageUnit "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetDataTable(int UnitType) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM DosageUnit WHERE UnitType="+UnitType+" and IsValid=1"); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + } } diff --git a/AIMSEntity/DAL/Extension/DDrugKind.cs b/AIMSEntity/DAL/Extension/DDrugKind.cs index bbdf093..324ffed 100644 --- a/AIMSEntity/DAL/Extension/DDrugKind.cs +++ b/AIMSEntity/DAL/Extension/DDrugKind.cs @@ -5,9 +5,130 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DDrugKind { + + public static void Add(DrugKind DrugKindObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [DrugKind]("); + strSql.Append("Name,MedicalItemKindId,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + DrugKindObj.Name + "',"); + strSql.Append("" + DrugKindObj.MedicalItemKindId + ","); + strSql.Append("" + DrugKindObj.IsValid + ","); + strSql.Append("'" + DrugKindObj.OperatorNo + "',"); + strSql.Append("'" + DrugKindObj.OperatorName + "',"); + strSql.Append("'" + DrugKindObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + + } + public static DrugKind GetModel(int Id) + { + DrugKind DrugKindObj = new DrugKind(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,MedicalItemKindId,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from DrugKind "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + DrugKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DrugKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + + if(ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString()!="") + { + DrugKindObj.MedicalItemKindId = int.Parse(ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString()); + } + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + DrugKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DrugKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DrugKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + DrugKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DrugKindObj; + } + + public static List GetModelList() + { + DrugKind DrugKindObj = new DrugKind(); + List DrugKindListObj = new List(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,MedicalItemKindId,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from DrugKind "); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + + for (int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + DrugKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DrugKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + + if (ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString() != "") + { + DrugKindObj.MedicalItemKindId = int.Parse(ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + DrugKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DrugKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DrugKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + DrugKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + DrugKindListObj.Add(DrugKindObj); + } + return DrugKindListObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("SELECT dk.Id, dk.Name, mik.Name AS MedicalItemKindName,CASE dk.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid FROM DrugKind dk "); + strSql.Append(" LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId "); + + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetDataTable(string MedicalItemKindId) + { + string strSql = ""; + if (MedicalItemKindId != "") + { + strSql = "SELECT dk.Id, dk.Name, dk.MedicalItemKindId FROM DrugKind dk " + + "LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId WHERE dk.IsValid=1 and mik.Id ='" + MedicalItemKindId + "'"; + } + else + { + strSql = "SELECT dk.Id, dk.Name, dk.MedicalItemKindId FROM DrugKind dk " + + "LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId WHERE dk.IsValid=1 "; + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + } } diff --git a/AIMSEntity/DAL/Extension/DDrugManufacturer.cs b/AIMSEntity/DAL/Extension/DDrugManufacturer.cs index 17c19d4..02ea583 100644 --- a/AIMSEntity/DAL/Extension/DDrugManufacturer.cs +++ b/AIMSEntity/DAL/Extension/DDrugManufacturer.cs @@ -5,9 +5,90 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DDrugManufacturer { + public static void Add(DrugManufacturer DrugManufacturerObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [DrugManufacturer]("); + strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+DrugManufacturerObj.Name+"',"); + strSql.Append("'"+DrugManufacturerObj.HelpCode+"',"); + strSql.Append(""+DrugManufacturerObj.IsValid+","); + strSql.Append("'"+DrugManufacturerObj.OperatorNo+"',"); + strSql.Append("'"+DrugManufacturerObj.OperatorName+"',"); + strSql.Append("'"+DrugManufacturerObj.OperateDate+"'"); + strSql.Append(")"); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + //public static void Update(DrugManufacturer DrugManufacturerObj) + //{ + // StringBuilder strSql=new StringBuilder(); + // strSql.Append("update DrugManufacturer set "); + // strSql.Append("Name='"+DrugManufacturerObj.Name+"',"); + // strSql.Append("HelpCode='"+DrugManufacturerObj.HelpCode+"',"); + // strSql.Append("IsValid="+DrugManufacturerObj.IsValid+","); + // strSql.Append("OperatorNo='"+DrugManufacturerObj.OperatorNo+"',"); + // strSql.Append("OperatorName='"+DrugManufacturerObj.OperatorName+"',"); + // strSql.Append("OperateDate='"+DrugManufacturerObj.OperateDate+"'"); + // strSql.Append(" where Id="+DrugManufacturerObj.Id+" "); + // HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + //} + + public static DrugManufacturer GetModel(int Id) + { + DrugManufacturer DrugManufacturerObj = new DrugManufacturer(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from DrugManufacturer "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + DrugManufacturerObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DrugManufacturerObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + DrugManufacturerObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + DrugManufacturerObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DrugManufacturerObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DrugManufacturerObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + DrugManufacturerObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DrugManufacturerObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM DrugManufacturer "); + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetDataTable(string HelpCode) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("SELECT dm.Id, dm.Name FROM DrugManufacturer dm WHERE dm.Name LIKE '%" + HelpCode + "%' OR DM.HelpCode LIKE '%" + HelpCode + "%'"); + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + } } diff --git a/AIMSEntity/DAL/Extension/DDrugs.cs b/AIMSEntity/DAL/Extension/DDrugs.cs index 6007e5f..9c8d1ee 100644 --- a/AIMSEntity/DAL/Extension/DDrugs.cs +++ b/AIMSEntity/DAL/Extension/DDrugs.cs @@ -5,9 +5,101 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DDrugs { + public static void Add(Drugs DrugsObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Drugs]("); + strSql.Append("Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + DrugsObj.Name + "',"); + strSql.Append("'" + DrugsObj.HelpCode + "',"); + strSql.Append("'" + DrugsObj.DrugKind + "',"); + strSql.Append("'" + DrugsObj.Stand + "',"); + strSql.Append("'" + DrugsObj.DosageUnit + "',"); + strSql.Append("'" + DrugsObj.Unit + "',"); + strSql.Append("" + DrugsObj.UseRate + ","); + strSql.Append("" + DrugsObj.IsValid + ","); + strSql.Append("'" + DrugsObj.OperatorNo + "',"); + strSql.Append("'" + DrugsObj.OperatorName + "',"); + strSql.Append("'" + DrugsObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + + } + + public static Drugs GetModel(int Id) + { + Drugs DrugsObj = new Drugs(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Drugs "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + DrugsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + DrugsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + DrugsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + DrugsObj.DrugKind = ds.Tables[0].Rows[0]["DrugKind"].ToString(); + DrugsObj.Stand = ds.Tables[0].Rows[0]["Stand"].ToString(); + DrugsObj.DosageUnit = ds.Tables[0].Rows[0]["DosageUnit"].ToString(); + DrugsObj.Unit = ds.Tables[0].Rows[0]["Unit"].ToString(); + if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") + { + DrugsObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + DrugsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + DrugsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + DrugsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + DrugsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return DrugsObj; + } + + public static DataTable GetDataTable(string DrugKind) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM Drugs where DrugKind like '%" + DrugKind + "%'"); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + } + public static DataTable GetDosageUnitDataTable(int UnitType) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM DosageUnit WHERE UnitType=" + UnitType + " and IsValid=1"); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetDataTableByHelpCode(string HelpCode) + { + string strSql = "SELECT Id,Name,Stand,DosageUnit FROM dbo.Drugs WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetDrugsDataTable() + { + string strSql = "SELECT TOP 21 e.Id, e.Name FROM Drugs e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } + } } diff --git a/AIMSEntity/DAL/Extension/DEvents.cs b/AIMSEntity/DAL/Extension/DEvents.cs index 106e1d1..70d434b 100644 --- a/AIMSEntity/DAL/Extension/DEvents.cs +++ b/AIMSEntity/DAL/Extension/DEvents.cs @@ -6,17 +6,162 @@ using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; using HelperDB; +using System.Text; namespace AIMSDAL { internal partial class DEvents { - public static DataTable GetCommonlyEvents() + public static bool IsExit(string Name) + { + + string strSql ="select * from Events where name ='"+Name+"'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + return true; + } + else + { + return false; + } + + } + public static void Add(Events EventsObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [Events]("); + strSql.Append("EventKind,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+EventsObj.EventKind+"',"); + strSql.Append("'"+EventsObj.Name+"',"); + strSql.Append("'"+EventsObj.HelpCode+"',"); + strSql.Append("" + EventsObj.UseRate + ","); + strSql.Append("" + EventsObj.IsValid + ","); + strSql.Append("'" + EventsObj.OperatorNo + "',"); + strSql.Append("'"+EventsObj.OperatorName+"',"); + strSql.Append("'" + EventsObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + + } + + public static void UpdateUseRate(int Id) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("update Events set "); + strSql.Append("UseRate= UseRate + 1"); + strSql.Append(" where Id=" + Id + " "); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int Id) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete Events "); + strSql.Append(" where Id="+Id+"" ); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static Events GetModel(int Id) + { + Events EventsObj = new Events(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,EventKind,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Events "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + EventsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + EventsObj.EventKind = ds.Tables[0].Rows[0]["EventKind"].ToString(); + EventsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + EventsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["UseRate"].ToString()!="") + { + EventsObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); + } + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + EventsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + EventsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + EventsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + EventsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return EventsObj; + } + + public static Events GetModelByName(string Name) + { + Events EventsObj = new Events(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select top 1 "); + strSql.Append("Id,EventKind,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Events "); + strSql.Append(" where Name='" + Name + "'"); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + EventsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + EventsObj.EventKind = ds.Tables[0].Rows[0]["EventKind"].ToString(); + EventsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + EventsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") + { + EventsObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + EventsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + EventsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + EventsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + EventsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return EventsObj; + } + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id], EventKind,[Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM Events "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetDataTable(string HelpCode) + { + string strSql = "SELECT Id,Name FROM dbo.Events WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetEventDataTable() + { + string strSql = "SELECT TOP 17 e.Id, e.Name FROM Events e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } + public static DataTable GetCommonlyEvents() { string strSql = "select top 35 e.* from [Events] e where e.IsValid=1 and Name<>'入室' and Name<>'出室' and Name<>'手术开始' and Name<>'手术结束' and Name<>'麻醉开始' and Name<>'麻醉结束' Order By UseRate desc"; return DBHelper.GetDataTable(strSql); } - public static DataTable GetEventsByIds(string ids) + public static DataTable GetEventsByIds(string ids) { if (ids != null && ids.Length > 0) { @@ -29,7 +174,7 @@ namespace AIMSDAL return DBHelper.GetDataTable(sql); } } - public static DataTable SelectIdNameCode(string str) + public static DataTable SelectIdNameCode(string str) { string sql = string.Empty; if (str == "") diff --git a/AIMSEntity/DAL/Extension/DFactAnaesthesiaMethod.cs b/AIMSEntity/DAL/Extension/DFactAnaesthesiaMethod.cs index c426dfa..39bf375 100644 --- a/AIMSEntity/DAL/Extension/DFactAnaesthesiaMethod.cs +++ b/AIMSEntity/DAL/Extension/DFactAnaesthesiaMethod.cs @@ -5,9 +5,113 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DFactAnaesthesiaMethod { + public static void Add(FactAnaesthesiaMethod FactAnaesthesiaMethodObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [FactAnaesthesiaMethod]("); + strSql.Append("PatientId,ApplyId,AnaesthesiaMethodId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+FactAnaesthesiaMethodObj.PatientId+","); + strSql.Append(""+FactAnaesthesiaMethodObj.ApplyId+","); + strSql.Append(""+FactAnaesthesiaMethodObj.AnaesthesiaMethodId+","); + strSql.Append("'"+FactAnaesthesiaMethodObj.OperatorNo+"',"); + strSql.Append("'"+FactAnaesthesiaMethodObj.OperatorName+"',"); + strSql.Append("'"+FactAnaesthesiaMethodObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + //public static void Update(FactAnaesthesiaMethod FactAnaesthesiaMethodObj) + //{ + // StringBuilder strSql=new StringBuilder(); + // strSql.Append("update FactAnaesthesiaMethod set "); + // strSql.Append("PatientId="+FactAnaesthesiaMethodObj.PatientId+","); + // strSql.Append("ApplyId="+FactAnaesthesiaMethodObj.ApplyId+","); + // strSql.Append("AnaesthesiaMethodId="+FactAnaesthesiaMethodObj.AnaesthesiaMethodId+","); + // strSql.Append("OperatorNo='"+FactAnaesthesiaMethodObj.OperatorNo+"',"); + // strSql.Append("OperatorName='"+FactAnaesthesiaMethodObj.OperatorName+"',"); + // strSql.Append("OperateDate='"+FactAnaesthesiaMethodObj.OperateDate+"'"); + // strSql.Append(" where Id="+FactAnaesthesiaMethodObj.Id+" "); + // HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + //} + + public static void Delete(int PatientId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete FactAnaesthesiaMethod "); + strSql.Append(" where PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static FactAnaesthesiaMethod GetModel(int Id) + { + FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new FactAnaesthesiaMethod(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,PatientId,ApplyId,AnaesthesiaMethodId,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from FactAnaesthesiaMethod "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + FactAnaesthesiaMethodObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") + { + FactAnaesthesiaMethodObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); + } + if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") + { + FactAnaesthesiaMethodObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); + } + if(ds.Tables[0].Rows[0]["AnaesthesiaMethodId"].ToString()!="") + { + FactAnaesthesiaMethodObj.AnaesthesiaMethodId = int.Parse(ds.Tables[0].Rows[0]["AnaesthesiaMethodId"].ToString()); + } + FactAnaesthesiaMethodObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + FactAnaesthesiaMethodObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + FactAnaesthesiaMethodObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return FactAnaesthesiaMethodObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[PatientId],[ApplyId],[AnaesthesiaMethodId],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM FactAnaesthesiaMethod "); + if(strWhere.Trim()!="") + { + + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetFactAnaesthesiaMethodIdList(int PatientId) + { + List AnaesthesiaMethodIdList = new List(); + string strSql = "SELECT AnaesthesiaMethodId FROM FactAnaesthesiaMethod WHERE PatientId='" + PatientId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + AnaesthesiaMethodIdList.Add(int.Parse(dt.Rows[i]["AnaesthesiaMethodId"].ToString())); + + } + return AnaesthesiaMethodIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DFactDiagnoseInfo.cs b/AIMSEntity/DAL/Extension/DFactDiagnoseInfo.cs index 396e23b..436515a 100644 --- a/AIMSEntity/DAL/Extension/DFactDiagnoseInfo.cs +++ b/AIMSEntity/DAL/Extension/DFactDiagnoseInfo.cs @@ -5,9 +5,100 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DFactDiagnoseInfo { + public static void Add(FactDiagnoseInfo FactDiagnoseInfoObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [FactDiagnoseInfo]("); + strSql.Append("PatientId,ApplyId,DiagnoseId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+FactDiagnoseInfoObj.PatientId+","); + strSql.Append(""+FactDiagnoseInfoObj.ApplyId+","); + strSql.Append(""+FactDiagnoseInfoObj.DiagnoseId+","); + strSql.Append("'"+FactDiagnoseInfoObj.OperatorNo+"',"); + strSql.Append("'"+FactDiagnoseInfoObj.OperatorName+"',"); + strSql.Append("'"+FactDiagnoseInfoObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int PatientId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete FactDiagnoseInfo "); + strSql.Append(" where PatientId="+PatientId+"" ); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static FactDiagnoseInfo GetModel(int Id) + { + FactDiagnoseInfo FactDiagnoseInfoObj = new FactDiagnoseInfo(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,PatientId,ApplyId,DiagnoseId,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from FactDiagnoseInfo "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + FactDiagnoseInfoObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") + { + FactDiagnoseInfoObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); + } + if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") + { + FactDiagnoseInfoObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); + } + if(ds.Tables[0].Rows[0]["DiagnoseId"].ToString()!="") + { + FactDiagnoseInfoObj.DiagnoseId = int.Parse(ds.Tables[0].Rows[0]["DiagnoseId"].ToString()); + } + FactDiagnoseInfoObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + FactDiagnoseInfoObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + FactDiagnoseInfoObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return FactDiagnoseInfoObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[PatientId],[ApplyId],[DiagnoseId],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM FactDiagnoseInfo "); + if(strWhere.Trim()!="") + { + + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetFactDiagnoseInfoIdList(int PatientId) + { + List DiagnoseIdList = new List(); + string strSql = "SELECT DiagnoseId FROM FactDiagnoseInfo WHERE PatientId='" + PatientId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + DiagnoseIdList.Add(int.Parse(dt.Rows[i]["DiagnoseId"].ToString())); + + } + return DiagnoseIdList; + } + } } diff --git a/AIMSEntity/DAL/Extension/DFactOperationBodyPosition.cs b/AIMSEntity/DAL/Extension/DFactOperationBodyPosition.cs index d5ae4af..759129a 100644 --- a/AIMSEntity/DAL/Extension/DFactOperationBodyPosition.cs +++ b/AIMSEntity/DAL/Extension/DFactOperationBodyPosition.cs @@ -5,9 +5,99 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DFactOperationBodyPosition - { + { + public static void Add(FactOperationBodyPosition FactOperationBodyPositionObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [FactOperationBodyPosition]("); + strSql.Append("PatientId,ApplyId,OperationBodyPositionId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+FactOperationBodyPositionObj.PatientId+","); + strSql.Append(""+FactOperationBodyPositionObj.ApplyId+","); + strSql.Append(""+FactOperationBodyPositionObj.OperationBodyPositionId+","); + strSql.Append("'"+FactOperationBodyPositionObj.OperatorNo+"',"); + strSql.Append("'"+FactOperationBodyPositionObj.OperatorName+"',"); + strSql.Append("'"+FactOperationBodyPositionObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int PatientId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete FactOperationBodyPosition "); + strSql.Append(" where PatientId="+PatientId+"" ); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static FactOperationBodyPosition GetModel(int Id) + { + StringBuilder strSql=new StringBuilder(); + FactOperationBodyPosition FactOperationBodyPositionObj = new FactOperationBodyPosition(); + strSql.Append("select "); + strSql.Append("Id,PatientId,ApplyId,OperationBodyPositionId,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from FactOperationBodyPosition "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + FactOperationBodyPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") + { + FactOperationBodyPositionObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); + } + if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") + { + FactOperationBodyPositionObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); + } + if(ds.Tables[0].Rows[0]["OperationBodyPositionId"].ToString()!="") + { + FactOperationBodyPositionObj.OperationBodyPositionId = int.Parse(ds.Tables[0].Rows[0]["OperationBodyPositionId"].ToString()); + } + FactOperationBodyPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + FactOperationBodyPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + FactOperationBodyPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return FactOperationBodyPositionObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[PatientId],[ApplyId],[OperationBodyPositionId],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM FactOperationBodyPosition "); + if(strWhere.Trim()!="") + { + + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetFactOperationBodyPositionIdList(int PatientId) + { + List FactOperationBodyPositionIdList = new List(); + string strSql = "SELECT OperationBodyPositionId FROM FactOperationBodyPosition WHERE PatientId='" + PatientId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + FactOperationBodyPositionIdList.Add(int.Parse(dt.Rows[i]["OperationBodyPositionId"].ToString())); + + } + return FactOperationBodyPositionIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DFactOperationCutType.cs b/AIMSEntity/DAL/Extension/DFactOperationCutType.cs index edbd973..acf567a 100644 --- a/AIMSEntity/DAL/Extension/DFactOperationCutType.cs +++ b/AIMSEntity/DAL/Extension/DFactOperationCutType.cs @@ -5,9 +5,96 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DFactOperationCutType { + public static void Add(FactOperationCutType FactOperationCutTypeObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [FactOperationCutType]("); + strSql.Append("PatientId,ApplyId,OperationCutTypeId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+FactOperationCutTypeObj.PatientId+","); + strSql.Append(""+FactOperationCutTypeObj.ApplyId+","); + strSql.Append(""+FactOperationCutTypeObj.OperationCutTypeId+","); + strSql.Append("'"+FactOperationCutTypeObj.OperatorNo+"',"); + strSql.Append("'"+FactOperationCutTypeObj.OperatorName+"',"); + strSql.Append("'"+FactOperationCutTypeObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static void Delete(int PatientId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete FactOperationCutType "); + strSql.Append(" where PatientId="+PatientId+"" ); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static FactOperationCutType GetModel(int Id) + { + FactOperationCutType FactOperationCutTypeObj = new FactOperationCutType(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,PatientId,ApplyId,OperationCutTypeId,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from FactOperationCutType "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + FactOperationCutTypeObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") + { + FactOperationCutTypeObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); + } + if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") + { + FactOperationCutTypeObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); + } + if(ds.Tables[0].Rows[0]["OperationCutTypeId"].ToString()!="") + { + FactOperationCutTypeObj.OperationCutTypeId = int.Parse(ds.Tables[0].Rows[0]["OperationCutTypeId"].ToString()); + } + FactOperationCutTypeObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + FactOperationCutTypeObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + FactOperationCutTypeObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return FactOperationCutTypeObj; + } + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[PatientId],[ApplyId],[OperationCutTypeId],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM FactOperationCutType "); + if(strWhere.Trim()!="") + { + + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetFactOperationCutTypeIdList(int PatientId) + { + List FactOperationCutTypeIdList = new List(); + string strSql = "SELECT OperationCutTypeId FROM FactOperationCutType WHERE PatientId='" + PatientId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + FactOperationCutTypeIdList.Add(int.Parse(dt.Rows[i]["OperationCutTypeId"].ToString())); + + } + return FactOperationCutTypeIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DFactOperationInfo.cs b/AIMSEntity/DAL/Extension/DFactOperationInfo.cs index 7c93254..6f6085b 100644 --- a/AIMSEntity/DAL/Extension/DFactOperationInfo.cs +++ b/AIMSEntity/DAL/Extension/DFactOperationInfo.cs @@ -5,9 +5,103 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DFactOperationInfo { + public static void Add(FactOperationInfo FactOperationInfoObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [FactOperationInfo]("); + strSql.Append("PatientId,ApplyId,OperationId,OperatorNo,OperatorName,OperateDate,OperationName,LeftRemark,RightRemark"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("" + FactOperationInfoObj.PatientId + ","); + strSql.Append("" + FactOperationInfoObj.ApplyId + ","); + strSql.Append("" + FactOperationInfoObj.OperationId + ","); + strSql.Append("'" + FactOperationInfoObj.OperatorNo + "',"); + strSql.Append("'" + FactOperationInfoObj.OperatorName + "',"); + strSql.Append("'" + FactOperationInfoObj.OperateDate + "',"); + strSql.Append("'" + FactOperationInfoObj.OperationName + "',"); + strSql.Append("'" + FactOperationInfoObj.LeftRemark + "',"); + strSql.Append("'" + FactOperationInfoObj.RightRemark + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int PatientId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete FactOperationInfo "); + strSql.Append(" where PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static FactOperationInfo GetModel(int Id) + { + FactOperationInfo FactOperationInfoObj = new FactOperationInfo(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select * from FactOperationInfo "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + FactOperationInfoObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if (ds.Tables[0].Rows[0]["PatientId"].ToString() != "") + { + FactOperationInfoObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); + } + if (ds.Tables[0].Rows[0]["ApplyId"].ToString() != "") + { + FactOperationInfoObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); + } + if (ds.Tables[0].Rows[0]["OperationId"].ToString() != "") + { + FactOperationInfoObj.OperationId = int.Parse(ds.Tables[0].Rows[0]["OperationId"].ToString()); + } + FactOperationInfoObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + FactOperationInfoObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + //FactOperationInfoObj.OperationName = ds.Tables[0].Rows[0]["OperationName"].ToString(); + //FactOperationInfoObj.LeftRemark = ds.Tables[0].Rows[0]["LeftRemark"].ToString(); + //FactOperationInfoObj.RightRemark = ds.Tables[0].Rows[0]["RightRemark"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + FactOperationInfoObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return FactOperationInfoObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select * "); + strSql.Append(" FROM FactOperationInfo "); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetFactOperationInfoIdList(int PatientId) + { + List OperationIdList = new List(); + string strSql = "SELECT OperationId FROM FactOperationInfo WHERE PatientId='" + PatientId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + OperationIdList.Add(int.Parse(dt.Rows[i]["OperationId"].ToString())); + + } + return OperationIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DFactOperationPosition.cs b/AIMSEntity/DAL/Extension/DFactOperationPosition.cs index e67803e..82b8f7c 100644 --- a/AIMSEntity/DAL/Extension/DFactOperationPosition.cs +++ b/AIMSEntity/DAL/Extension/DFactOperationPosition.cs @@ -5,9 +5,96 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DFactOperationPosition { + public static void Add(FactOperationPosition FactOperationPositionObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [FactOperationPosition]("); + strSql.Append("PatientId,ApplyId,OperationPositionId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+FactOperationPositionObj.PatientId+","); + strSql.Append(""+FactOperationPositionObj.ApplyId+","); + strSql.Append(""+FactOperationPositionObj.OperationPositionId+","); + strSql.Append("'"+FactOperationPositionObj.OperatorNo+"',"); + strSql.Append("'"+FactOperationPositionObj.OperatorName+"',"); + strSql.Append("'"+FactOperationPositionObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static void Delete(int PatientId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete FactOperationPosition "); + strSql.Append(" where PatientId="+PatientId+"" ); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static FactOperationPosition GetModel(int Id) + { + FactOperationPosition FactOperationPositionObj = new FactOperationPosition(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,PatientId,ApplyId,OperationPositionId,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from FactOperationPosition "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + FactOperationPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") + { + FactOperationPositionObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); + } + if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") + { + FactOperationPositionObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); + } + if(ds.Tables[0].Rows[0]["OperationPositionId"].ToString()!="") + { + FactOperationPositionObj.OperationPositionId = int.Parse(ds.Tables[0].Rows[0]["OperationPositionId"].ToString()); + } + FactOperationPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + FactOperationPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + FactOperationPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return FactOperationPositionObj; + } + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[PatientId],[ApplyId],[OperationPositionId],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM FactOperationPosition "); + if(strWhere.Trim()!="") + { + + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetFactOperationPositionIdList(int PatientId) + { + List FactOperationPositionIdList = new List(); + string strSql = "SELECT OperationPositionId FROM FactOperationPosition WHERE PatientId='" + PatientId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + for (int i = 0; i < dt.Rows.Count; i++) + { + FactOperationPositionIdList.Add(int.Parse(dt.Rows[i]["OperationPositionId"].ToString())); + + } + return FactOperationPositionIdList; + } } } diff --git a/AIMSEntity/DAL/Extension/DFactPersonDuty.cs b/AIMSEntity/DAL/Extension/DFactPersonDuty.cs index b493bc3..acfcea0 100644 --- a/AIMSEntity/DAL/Extension/DFactPersonDuty.cs +++ b/AIMSEntity/DAL/Extension/DFactPersonDuty.cs @@ -5,9 +5,103 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DFactPersonDuty { + public static void Add(FactPersonDuty FactPersonDutyObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [FactPersonDuty]("); + strSql.Append("PatientId,ApplyId,PersonDutyId,PersonId,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+FactPersonDutyObj.PatientId+","); + strSql.Append(""+FactPersonDutyObj.ApplyId+","); + strSql.Append(""+FactPersonDutyObj.PersonDutyId+","); + strSql.Append(""+FactPersonDutyObj.PersonId+","); + strSql.Append("'"+FactPersonDutyObj.OperatorNo+"',"); + strSql.Append("'"+FactPersonDutyObj.OperatorName+"',"); + strSql.Append("'"+FactPersonDutyObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int PatientId, int PersonDutyId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("delete FactPersonDuty "); + strSql.Append(" where PatientId=" + PatientId + " and PersonDutyId=" + PersonDutyId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static FactPersonDuty GetModel(int Id) + { + FactPersonDuty FactPersonDutyObj = new FactPersonDuty(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,PatientId,ApplyId,PersonDutyId,PersonId,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from FactPersonDuty "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + FactPersonDutyObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if(ds.Tables[0].Rows[0]["PatientId"].ToString()!="") + { + FactPersonDutyObj.PatientId = int.Parse(ds.Tables[0].Rows[0]["PatientId"].ToString()); + } + if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") + { + FactPersonDutyObj.ApplyId = int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); + } + if(ds.Tables[0].Rows[0]["PersonDutyId"].ToString()!="") + { + FactPersonDutyObj.PersonDutyId = int.Parse(ds.Tables[0].Rows[0]["PersonDutyId"].ToString()); + } + if(ds.Tables[0].Rows[0]["PersonId"].ToString()!="") + { + FactPersonDutyObj.PersonId = int.Parse(ds.Tables[0].Rows[0]["PersonId"].ToString()); + } + FactPersonDutyObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + FactPersonDutyObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + FactPersonDutyObj.OperateDate=DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return FactPersonDutyObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[PatientId],[ApplyId],[PersonDutyId],[PersonId],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM FactPersonDuty "); + if(strWhere.Trim()!="") + { + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strWhere.ToString()); + } + + public static List GetPersonIdList(int PatientId, int PersonDutyId) + { + List PersonIdList = new List(); + string strSql = "SELECT PersonId FROM FactPersonDuty WHERE PatientId=" + PatientId + " AND PersonDutyId =" + PersonDutyId + ""; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + for (int i = 0; i < dt.Rows.Count; i++) + { + PersonIdList.Add(int.Parse(dt.Rows[i]["PersonId"].ToString())); + } + + return PersonIdList; + + } } } diff --git a/AIMSEntity/DAL/Extension/DMedicalDict.cs b/AIMSEntity/DAL/Extension/DMedicalDict.cs index fcfdf3f..c31e490 100644 --- a/AIMSEntity/DAL/Extension/DMedicalDict.cs +++ b/AIMSEntity/DAL/Extension/DMedicalDict.cs @@ -5,9 +5,108 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DMedicalDict { + public static void Add(MedicalDict MedicalDictObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [MedicalDict]("); + strSql.Append("No,Name,HelpCode,DrugKindId,DosageKindId,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+MedicalDictObj.No+"',"); + strSql.Append("'"+MedicalDictObj.Name+"',"); + strSql.Append("'"+MedicalDictObj.HelpCode+"',"); + strSql.Append(""+MedicalDictObj.DrugKindId+","); + strSql.Append(""+MedicalDictObj.DosageKindId+","); + strSql.Append("'" + MedicalDictObj.IsValid + "',"); + strSql.Append("'"+MedicalDictObj.OperatorNo+"',"); + strSql.Append("'"+MedicalDictObj.OperatorName+"',"); + strSql.Append("'"+MedicalDictObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + + public static MedicalDict GetModel(int Id) + { + MedicalDict MedicalDictObj = new MedicalDict(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,No,Name,HelpCode,DrugKindId,DosageKindId,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from MedicalDict "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + MedicalDictObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + MedicalDictObj.No = ds.Tables[0].Rows[0]["No"].ToString(); + MedicalDictObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + MedicalDictObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["DrugKindId"].ToString()!="") + { + MedicalDictObj.DrugKindId = int.Parse(ds.Tables[0].Rows[0]["DrugKindId"].ToString()); + } + if(ds.Tables[0].Rows[0]["DosageKindId"].ToString()!="") + { + MedicalDictObj.DosageKindId = int.Parse(ds.Tables[0].Rows[0]["DosageKindId"].ToString()); + } + MedicalDictObj.IsValid =int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + MedicalDictObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + MedicalDictObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + MedicalDictObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return MedicalDictObj; + } + + public static DataTable GetDataTable(int DrugKindId) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("SELECT md.Id,md.No, md.Name, md.HelpCode,dk.Name AS DrugKindName,dk2.Name AS DosageKindName ,"); + strSql.Append(" CASE md.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM MedicalDict md "); + strSql.Append(" LEFT JOIN DrugKind dk ON dk.Id= md.DrugKindId "); + strSql.Append(" LEFT JOIN DosageKind dk2 ON dk2.Id =md.DosageKindId "); + strSql.Append(" WHERE md.DrugKindId="+DrugKindId+""); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetDataTableByName(string Name) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("SELECT md.Id,md.No, md.Name, md.HelpCode, mik.Name AS MedicalItemKindName,dk.Name AS DrugKindName,dk2.Name AS DosageKindName ,"); + strSql.Append(" CASE md.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM MedicalDict md "); + strSql.Append(" LEFT JOIN DrugKind dk ON dk.Id= md.DrugKindId "); + strSql.Append(" LEFT JOIN DosageKind dk2 ON dk2.Id =md.DosageKindId "); + strSql.Append(" LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId "); + strSql.Append(" WHERE (md.Name like '%" + Name + "%') or (md.HelpCode like '%" + Name + "%')"); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + + public static bool Exists(string No) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select count(*) AS RowsCount from MedicalDict where No='" + No + "'"); + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + if (int.Parse(dt.Rows[0]["RowsCount"].ToString()) > 0) + { + return true; + } + else + { + return false; + } + } } } diff --git a/AIMSEntity/DAL/Extension/DMedicalItem.cs b/AIMSEntity/DAL/Extension/DMedicalItem.cs index c257d29..dbde39a 100644 --- a/AIMSEntity/DAL/Extension/DMedicalItem.cs +++ b/AIMSEntity/DAL/Extension/DMedicalItem.cs @@ -5,9 +5,173 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DMedicalItem { + public static bool Exists(string No) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select count(1) from MedicalItem where No="+No+""); + return HelperDB.DbHelperSQL.Exists(strSql.ToString()); + } + + public static void Add(MedicalItem MedicalItemObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [MedicalItem]("); + strSql.Append("No,Name,HelpCode,MedicalItemAlias,MedicalItemAliasHelpCode,RetailPrice,DosageKindId,Stand,BarCode,MedicalDictNo,DrugKindId,PharmaCologyId,InsuranceKind,InsuranceKindNH,Antibiotics,IsSkintest,Dosage,DosageUnit,PackingUnit,SplitUnit,Quotiety,IsValid,Remark,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+MedicalItemObj.No+"',"); + strSql.Append("'"+MedicalItemObj.Name+"',"); + strSql.Append("'"+MedicalItemObj.HelpCode+"',"); + strSql.Append("'"+MedicalItemObj.MedicalItemAlias+"',"); + strSql.Append("'"+MedicalItemObj.MedicalItemAliasHelpCode+"',"); + strSql.Append(""+MedicalItemObj.RetailPrice+","); + strSql.Append(""+MedicalItemObj.DosageKindId+","); + strSql.Append("'"+MedicalItemObj.Stand+"',"); + strSql.Append("'"+MedicalItemObj.BarCode+"',"); + strSql.Append("'"+MedicalItemObj.MedicalDictNo+"',"); + strSql.Append(""+MedicalItemObj.DrugKindId+","); + strSql.Append(""+MedicalItemObj.PharmaCologyId+","); + strSql.Append("'"+MedicalItemObj.InsuranceKind+"',"); + strSql.Append("'"+MedicalItemObj.InsuranceKindNH+"',"); + strSql.Append("'"+MedicalItemObj.Antibiotics+"',"); + strSql.Append(""+MedicalItemObj.IsSkintest+","); + strSql.Append(""+MedicalItemObj.Dosage+","); + strSql.Append("'"+MedicalItemObj.DosageUnit+"',"); + strSql.Append("'"+MedicalItemObj.PackingUnit+"',"); + strSql.Append("'"+MedicalItemObj.SplitUnit+"',"); + strSql.Append(""+MedicalItemObj.Quotiety+","); + strSql.Append(""+MedicalItemObj.IsValid+","); + strSql.Append("'"+MedicalItemObj.Remark+"',"); + strSql.Append("'"+MedicalItemObj.OperatorNo+"',"); + strSql.Append("'"+MedicalItemObj.OperatorName+"',"); + strSql.Append("'"+MedicalItemObj.OperateDate+"'"); + strSql.Append(")"); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static MedicalItem GetModel(int Id) + { + MedicalItem MedicalItemObj = new MedicalItem(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,No,Name,HelpCode,MedicalItemAlias,MedicalItemAliasHelpCode,RetailPrice,DosageKindId,Stand,BarCode,MedicalDictNo,DrugKindId,PharmaCologyId,InsuranceKind,InsuranceKindNH,Antibiotics,IsSkintest,Dosage,DosageUnit,PackingUnit,SplitUnit,Quotiety,IsValid,Remark,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from MedicalItem "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + MedicalItemObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + MedicalItemObj.No = ds.Tables[0].Rows[0]["No"].ToString(); + MedicalItemObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + MedicalItemObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + MedicalItemObj.MedicalItemAlias = ds.Tables[0].Rows[0]["MedicalItemAlias"].ToString(); + MedicalItemObj.MedicalItemAliasHelpCode = ds.Tables[0].Rows[0]["MedicalItemAliasHelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["RetailPrice"].ToString()!="") + { + MedicalItemObj.RetailPrice = decimal.Parse(ds.Tables[0].Rows[0]["RetailPrice"].ToString()); + } + if(ds.Tables[0].Rows[0]["DosageKindId"].ToString()!="") + { + MedicalItemObj.DosageKindId = int.Parse(ds.Tables[0].Rows[0]["DosageKindId"].ToString()); + } + MedicalItemObj.Stand = ds.Tables[0].Rows[0]["Stand"].ToString(); + MedicalItemObj.BarCode = ds.Tables[0].Rows[0]["BarCode"].ToString(); + MedicalItemObj.MedicalDictNo = ds.Tables[0].Rows[0]["MedicalDictNo"].ToString(); + if(ds.Tables[0].Rows[0]["DrugKindId"].ToString()!="") + { + MedicalItemObj.DrugKindId = int.Parse(ds.Tables[0].Rows[0]["DrugKindId"].ToString()); + } + if(ds.Tables[0].Rows[0]["PharmaCologyId"].ToString()!="") + { + MedicalItemObj.PharmaCologyId = int.Parse(ds.Tables[0].Rows[0]["PharmaCologyId"].ToString()); + } + MedicalItemObj.InsuranceKind = ds.Tables[0].Rows[0]["InsuranceKind"].ToString(); + MedicalItemObj.InsuranceKindNH = ds.Tables[0].Rows[0]["InsuranceKindNH"].ToString(); + MedicalItemObj.Antibiotics = ds.Tables[0].Rows[0]["Antibiotics"].ToString(); + if(ds.Tables[0].Rows[0]["IsSkintest"].ToString()!="") + { + MedicalItemObj.IsSkintest = int.Parse(ds.Tables[0].Rows[0]["IsSkintest"].ToString()); + } + if(ds.Tables[0].Rows[0]["Dosage"].ToString()!="") + { + MedicalItemObj.Dosage = decimal.Parse(ds.Tables[0].Rows[0]["Dosage"].ToString()); + } + MedicalItemObj.DosageUnit = ds.Tables[0].Rows[0]["DosageUnit"].ToString(); + MedicalItemObj.PackingUnit = ds.Tables[0].Rows[0]["PackingUnit"].ToString(); + MedicalItemObj.SplitUnit = ds.Tables[0].Rows[0]["SplitUnit"].ToString(); + if(ds.Tables[0].Rows[0]["Quotiety"].ToString()!="") + { + MedicalItemObj.Quotiety = int.Parse(ds.Tables[0].Rows[0]["Quotiety"].ToString()); + } + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + MedicalItemObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + MedicalItemObj.Remark = ds.Tables[0].Rows[0]["Remark"].ToString(); + MedicalItemObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + MedicalItemObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + MedicalItemObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return MedicalItemObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[No],[Name],[HelpCode],[MedicalItemAlias],[MedicalItemAliasHelpCode],[RetailPrice],[DosageKindId],[Stand],[BarCode],[MedicalDictNo],[DrugKindId],[PharmaCologyId],[InsuranceKind],[InsuranceKindNH],[Antibiotics],[IsSkintest],[Dosage],[DosageUnit],[PackingUnit],[SplitUnit],[Quotiety],[IsValid],[Remark],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM MedicalItem "); + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetMedicalItemDrugDataTable(string HelpCode, int IsValid) + { + string strSql = "SELECT mi.Id, mi.No, mi.Name,mi.MedicalItemAlias,mi.Stand,dk.Name AS DosageKindName,mi.BarCode,mi.MedicalDictNo, " + + "dk2.Name AS DrugKindName,pc.Name AS PharmaCologyName,mi.InsuranceKind,mi.InsuranceKindNH, " + + "mi.Antibiotics,CASE mi.IsSkintest WHEN 0 THEN '非皮试' WHEN 1 THEN '皮试' end as IsSkintest, " + + "mi.Dosage,mi.DosageUnit,mi.PackingUnit,mi.SplitUnit,mi.Quotiety,mi.Remark," + + "CASE mi.IsValid WHEN 0 THEN '无效' WHEN 1 THEN '有效' end as IsValid FROM MedicalItem mi " + + "LEFT JOIN DosageKind dk ON dk.Id =mi.DosageKindId " + + "LEFT JOIN DrugKind dk2 ON dk2.Id =mi.DrugKindId " + + "LEFT JOIN PharmaCology pc ON pc.Id =mi.PharmaCologyId " + + "WHERE mi.IsValid ='" + IsValid + "' and ((mi.Name LIKE '%" + HelpCode + "%') OR (mi.HelpCode LIKE '%" + HelpCode + "%') OR (mi.MedicalItemAlias LIKE '%" + HelpCode + "%') OR (mi.MedicalItemAliasHelpCode LIKE '%" + HelpCode + "%')) "; + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetMedicalItemByDrugKindId(int DrugKindId) + { + string strSql = "SELECT mi.Id, mi.No, mi.Name,mi.MedicalItemAlias,mi.Stand,dk.Name AS DosageKindName,mi.BarCode,mi.MedicalDictNo, " + + "dk2.Name AS DrugKindName,pc.Name AS PharmaCologyName,mi.InsuranceKind,mi.InsuranceKindNH, " + + "mi.Antibiotics,CASE mi.IsSkintest WHEN 0 THEN '非皮试' WHEN 1 THEN '皮试' end as IsSkintest, " + + "mi.Dosage,mi.DosageUnit,mi.PackingUnit,mi.SplitUnit,mi.Quotiety,mi.Remark," + + "CASE mi.IsValid WHEN 0 THEN '无效' WHEN 1 THEN '有效' end as IsValid FROM MedicalItem mi " + + "LEFT JOIN DosageKind dk ON dk.Id =mi.DosageKindId " + + "LEFT JOIN DrugKind dk2 ON dk2.Id =mi.DrugKindId " + + "LEFT JOIN PharmaCology pc ON pc.Id =mi.PharmaCologyId " + + "WHERE mi.DrugKindId ='" + DrugKindId + "'"; + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + + public static int GetMedicalItemByDictNo(string MedicalDictNo) + { + string strSql = "SELECT COUNT(*) RowsCount FROM MedicalItem mi WHERE mi.MedicalDictNo='" + MedicalDictNo + "'"; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + return int.Parse(dt.Rows[0]["RowsCount"].ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DMedicalItemKind.cs b/AIMSEntity/DAL/Extension/DMedicalItemKind.cs index 84068cc..4aa2216 100644 --- a/AIMSEntity/DAL/Extension/DMedicalItemKind.cs +++ b/AIMSEntity/DAL/Extension/DMedicalItemKind.cs @@ -5,9 +5,75 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DMedicalItemKind { + public static void Add(MedicalItemKind MedicalItemKindObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [MedicalItemKind]("); + strSql.Append("Name,IsMed,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+MedicalItemKindObj.Name+"',"); + strSql.Append("'"+MedicalItemKindObj.IsMed+"',"); + strSql.Append(""+MedicalItemKindObj.IsValid+","); + strSql.Append("'"+MedicalItemKindObj.OperatorNo+"',"); + strSql.Append("'"+MedicalItemKindObj.OperatorName+"',"); + strSql.Append("'"+MedicalItemKindObj.OperateDate+"'"); + strSql.Append(")"); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static MedicalItemKind GetModel(int Id) + { + MedicalItemKind MedicalItemKindObj = new MedicalItemKind(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,IsMed,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from MedicalItemKind "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + MedicalItemKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + MedicalItemKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + MedicalItemKindObj.IsMed = ds.Tables[0].Rows[0]["IsMed"].ToString(); + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + MedicalItemKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + MedicalItemKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + MedicalItemKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + MedicalItemKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return MedicalItemKindObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],CASE IsMed WHEN 1 THEN '药品' WHEN 0 THEN '非药品' END AS IsMed,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM MedicalItemKind "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetTreeViewDataTable() + { + string strSql = "SELECT dk.Id, dk.Name,mik.Name AS MedicalItemKindName FROM DrugKind dk " + + "LEFT JOIN MedicalItemKind mik ON mik.Id =dk.MedicalItemKindId " + + "WHERE mik.IsMed=1 AND dk.IsValid=1 "; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DMedicamentPrice.cs b/AIMSEntity/DAL/Extension/DMedicamentPrice.cs index af25c69..7260636 100644 --- a/AIMSEntity/DAL/Extension/DMedicamentPrice.cs +++ b/AIMSEntity/DAL/Extension/DMedicamentPrice.cs @@ -5,9 +5,97 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DMedicamentPrice { + public static bool Exists(int Id) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select count(1) from MedicamentPrice where Id="+Id+"" ); + return HelperDB.DbHelperSQL.Exists(strSql.ToString()); + } + + public static void Add(MedicamentPrice MedicamentPriceObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [MedicamentPrice]("); + strSql.Append("DrugManufacturerId,MedicalItemId,PurchasePrice,TradePrice,RetailPrice,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append(""+MedicamentPriceObj.DrugManufacturerId+","); + strSql.Append(""+MedicamentPriceObj.MedicalItemId+","); + strSql.Append(""+MedicamentPriceObj.PurchasePrice+","); + strSql.Append(""+MedicamentPriceObj.TradePrice+","); + strSql.Append(""+MedicamentPriceObj.RetailPrice+","); + strSql.Append(""+MedicamentPriceObj.IsValid+","); + strSql.Append("'"+MedicamentPriceObj.OperatorNo+"',"); + strSql.Append("'"+MedicamentPriceObj.OperatorName+"',"); + strSql.Append("'"+MedicamentPriceObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static MedicamentPrice GetModel(int Id) + { + MedicamentPrice MedicamentPriceObj = new MedicamentPrice(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,DrugManufacturerId,MedicalItemId,PurchasePrice,TradePrice,RetailPrice,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from MedicamentPrice "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + MedicamentPriceObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if(ds.Tables[0].Rows[0]["DrugManufacturerId"].ToString()!="") + { + MedicamentPriceObj.DrugManufacturerId = int.Parse(ds.Tables[0].Rows[0]["DrugManufacturerId"].ToString()); + } + if(ds.Tables[0].Rows[0]["MedicalItemId"].ToString()!="") + { + MedicamentPriceObj.MedicalItemId = int.Parse(ds.Tables[0].Rows[0]["MedicalItemId"].ToString()); + } + if(ds.Tables[0].Rows[0]["PurchasePrice"].ToString()!="") + { + MedicamentPriceObj.PurchasePrice = decimal.Parse(ds.Tables[0].Rows[0]["PurchasePrice"].ToString()); + } + if(ds.Tables[0].Rows[0]["TradePrice"].ToString()!="") + { + MedicamentPriceObj.TradePrice = decimal.Parse(ds.Tables[0].Rows[0]["TradePrice"].ToString()); + } + if(ds.Tables[0].Rows[0]["RetailPrice"].ToString()!="") + { + MedicamentPriceObj.RetailPrice = decimal.Parse(ds.Tables[0].Rows[0]["RetailPrice"].ToString()); + } + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + MedicamentPriceObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + MedicamentPriceObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + MedicamentPriceObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + MedicamentPriceObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return MedicamentPriceObj; + } + + + public static DataTable GetDataTable(int MedicalItemId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("SELECT mp.Id, mi.No,mi.Name,dm.Name AS DrugManufacturerName,mp.PurchasePrice, mp.TradePrice, mp.RetailPrice, CASE mp.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append("FROM MedicamentPrice mp "); + strSql.Append("LEFT JOIN DrugManufacturer dm ON dm.Id =mp.DrugManufacturerId "); + strSql.Append("LEFT JOIN MedicalItem mi ON mi.Id = mp.MedicalItemId WHERE MedicalItemId =" + MedicalItemId + " "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DMenu.cs b/AIMSEntity/DAL/Extension/DMenu.cs index edb38fb..9e41ce6 100644 --- a/AIMSEntity/DAL/Extension/DMenu.cs +++ b/AIMSEntity/DAL/Extension/DMenu.cs @@ -5,9 +5,412 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using HelperDB; +using System.Text; + namespace AIMSDAL { internal partial class DMenu { + public static void Add(Menu MenuObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Menu]("); + strSql.Append("Name,Path,ParentId,IsValid,MenuOrder,IsAloneOpen,ImgPath,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + MenuObj.Name + "',"); + strSql.Append("'" + MenuObj.Path + "',"); + strSql.Append("" + MenuObj.ParentId + ","); + strSql.Append("" + MenuObj.IsValid + ","); + strSql.Append("" + MenuObj.MenuOrder + ","); + strSql.Append("" + MenuObj.IsAloneOpen + ","); + strSql.Append("'" + MenuObj.ImgPath + "',"); + strSql.Append("'" + MenuObj.OperatorNo + "',"); + strSql.Append("'" + MenuObj.OperatorName + "',"); + strSql.Append("'" + MenuObj.OperateDate + "'"); + strSql.Append(")"); + strSql.Append(";select @@IDENTITY"); + DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static void Delete(int Id) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete Menu "); + strSql.Append(" where Id=" + Id + ""); + DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static Menu GetModel(int Id) + { + Menu MenuObj = new Menu(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,Path,ParentId,IsValid,MenuOrder,IsAloneOpen,ImgPath,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Menu "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + MenuObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + MenuObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + MenuObj.Path = ds.Tables[0].Rows[0]["Path"].ToString(); + if (ds.Tables[0].Rows[0]["ParentId"].ToString() != "") + { + MenuObj.ParentId = int.Parse(ds.Tables[0].Rows[0]["ParentId"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + MenuObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + if (ds.Tables[0].Rows[0]["MenuOrder"].ToString() != "") + { + MenuObj.MenuOrder = int.Parse(ds.Tables[0].Rows[0]["MenuOrder"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsAloneOpen"].ToString() != "") + { + MenuObj.IsAloneOpen = int.Parse(ds.Tables[0].Rows[0]["IsAloneOpen"].ToString()); + } + if (ds.Tables[0].Rows[0]["ImgPath"].ToString() != "") + { + MenuObj.ImgPath = string.Format(ds.Tables[0].Rows[0]["ImgPath"].ToString()); + } + MenuObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + MenuObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + MenuObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return MenuObj; + } + + public static DataTable GetDateTable(string strWhere) + { + + StringBuilder strSql = new StringBuilder(); + strSql.Append("SELECT Id, Name, [Path], ParentId, CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,"); + strSql.Append("MenuOrder,CASE IsAloneOpen WHEN 1 THEN '是' WHEN 0 THEN '否' END AS IsAloneOpen,ImgPath FROM dbo.Menu "); + if (strWhere.Trim() != "") + { + + strSql.Append(" where " + strWhere); + } + return DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetModelList() + { + List MenuListObj = new List(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,Path,ParentId,IsValid,MenuOrder,IsAloneOpen,ImgPath,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Menu where IsValid =1"); + DataTable ds = DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < ds.Rows.Count; i++) + { + Menu MenuObj = new Menu(); + if (ds.Rows[i]["Id"].ToString() != "") + { + MenuObj.Id = int.Parse(ds.Rows[i]["Id"].ToString()); + } + MenuObj.Name = ds.Rows[i]["Name"].ToString(); + MenuObj.Path = ds.Rows[i]["Path"].ToString(); + if (ds.Rows[i]["ParentId"].ToString() != "") + { + MenuObj.ParentId = int.Parse(ds.Rows[i]["ParentId"].ToString()); + } + if (ds.Rows[i]["IsValid"].ToString() != "") + { + MenuObj.IsValid = int.Parse(ds.Rows[i]["IsValid"].ToString()); + } + if (ds.Rows[i]["MenuOrder"].ToString() != "") + { + MenuObj.MenuOrder = int.Parse(ds.Rows[i]["MenuOrder"].ToString()); + } + if (ds.Rows[i]["IsAloneOpen"].ToString() != "") + { + MenuObj.IsAloneOpen = int.Parse(ds.Rows[i]["IsAloneOpen"].ToString()); + } + if (ds.Rows[i]["ImgPath"].ToString() != "") + { + MenuObj.ImgPath = string.Format(ds.Rows[i]["ImgPath"].ToString()); + } + MenuObj.OperatorNo = ds.Rows[i]["OperatorNo"].ToString(); + MenuObj.OperatorName = ds.Rows[i]["OperatorName"].ToString(); + if (ds.Rows[i]["OperateDate"].ToString() != "") + { + MenuObj.OperateDate = DateTime.Parse(ds.Rows[i]["OperateDate"].ToString()); + } + MenuListObj.Add(MenuObj); + } + + return MenuListObj; + } + + + public static List GetModelList_FSB(int RoleId) + { + List MenuListObj = new List(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("m.Id,m.Name,m.Path,m.ParentId,m.IsValid,m.MenuOrder,m.IsAloneOpen,m.ImgPath,m.OperatorNo,m.OperatorName,m.OperateDate "); + strSql.Append(" from Menu m "); + strSql.Append(" LEFT JOIN UserPurview up ON up.MenuId = m.Id where m.IsValid =1 AND up.RoleId=" + RoleId + " "); + DataTable ds = DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < ds.Rows.Count; i++) + { + Menu MenuObj = new Menu(); + if (ds.Rows[i]["Id"].ToString() != "") + { + MenuObj.Id = int.Parse(ds.Rows[i]["Id"].ToString()); + } + MenuObj.Name = ds.Rows[i]["Name"].ToString(); + MenuObj.Path = ds.Rows[i]["Path"].ToString(); + if (ds.Rows[i]["ParentId"].ToString() != "") + { + MenuObj.ParentId = int.Parse(ds.Rows[i]["ParentId"].ToString()); + } + if (ds.Rows[i]["IsValid"].ToString() != "") + { + MenuObj.IsValid = int.Parse(ds.Rows[i]["IsValid"].ToString()); + } + if (ds.Rows[i]["MenuOrder"].ToString() != "") + { + MenuObj.MenuOrder = int.Parse(ds.Rows[i]["MenuOrder"].ToString()); + } + if (ds.Rows[i]["IsAloneOpen"].ToString() != "") + { + MenuObj.IsAloneOpen = int.Parse(ds.Rows[i]["IsAloneOpen"].ToString()); + } + if (ds.Rows[i]["ImgPath"].ToString() != "") + { + MenuObj.ImgPath = string.Format(ds.Rows[i]["ImgPath"].ToString()); + } + MenuObj.OperatorNo = ds.Rows[i]["OperatorNo"].ToString(); + MenuObj.OperatorName = ds.Rows[i]["OperatorName"].ToString(); + if (ds.Rows[i]["OperateDate"].ToString() != "") + { + MenuObj.OperateDate = DateTime.Parse(ds.Rows[i]["OperateDate"].ToString()); + } + MenuListObj.Add(MenuObj); + } + + return MenuListObj; + } + + public static List GetMenuRootList(int ParentId) + { + List MenuList = new List(); + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,Path,ParentId,IsValid "); + strSql.Append(" from Menu "); + strSql.Append(" where ParentId=" + ParentId + " order by MenuOrder"); + + DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < dt.Rows.Count; i++) + { + Menu Menu = new Menu(); + Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + Menu.Name = dt.Rows[i]["Name"].ToString(); + Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); + Menu.Path = dt.Rows[i]["Path"].ToString(); + MenuList.Add(Menu); + } + return MenuList; + } + + + public static List GetMenuRootList(int RoleId, int ParentId) + { + List MenuList = new List(); + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); + strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); + strSql.Append("WHERE m.IsValid=1 AND up.RoleId=" + RoleId + " AND m.ParentId=" + ParentId + " order by MenuOrder"); + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < dt.Rows.Count; i++) + { + Menu Menu = new Menu(); + Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + Menu.Name = dt.Rows[i]["Name"].ToString(); + Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); + Menu.Path = dt.Rows[i]["Path"].ToString(); + MenuList.Add(Menu); + } + return MenuList; + } + public static List GetMenuRootListManage(int RoleId, string ParentId) + { + List MenuList = new List(); + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); + strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); + strSql.Append("WHERE m.IsValid=1 AND m.ParentId in (" + ParentId + ") AND up.RoleId=" + RoleId + " order by MenuOrder");// + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < dt.Rows.Count; i++) + { + Menu Menu = new Menu(); + Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + Menu.Name = dt.Rows[i]["Name"].ToString(); + Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); + Menu.Path = dt.Rows[i]["Path"].ToString(); + MenuList.Add(Menu); + } + return MenuList; + } + public static List GetMenuRootListManage(int RoleId) + { + List MenuList = new List(); + + StringBuilder strSql = new StringBuilder(); + strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); + strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); + strSql.Append("WHERE m.IsValid=1 AND up.RoleId=" + RoleId + "order by MenuOrder");// + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + for (int i = 0; i < dt.Rows.Count; i++) + { + Menu Menu = new Menu(); + Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + Menu.Name = dt.Rows[i]["Name"].ToString(); + Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); + Menu.Path = dt.Rows[i]["Path"].ToString(); + MenuList.Add(Menu); + } + return MenuList; + } + + public static Menu GetMenuById(int Id, int RoleId, int IsAll) + { + Menu Menu = new Menu(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,Path,ParentId,IsValid "); + strSql.Append(" from Menu "); + strSql.Append(" where Id=" + Id + " order by MenuOrder"); + + DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString()); + + if (dt.Rows.Count > 0) + { + if (dt.Rows[0]["Id"].ToString() != "") + { + Menu.Id = int.Parse(dt.Rows[0]["Id"].ToString()); + } + Menu.Name = dt.Rows[0]["Name"].ToString(); + Menu.Path = dt.Rows[0]["Path"].ToString(); + if (dt.Rows[0]["ParentId"].ToString() != "") + { + Menu.ParentId = int.Parse(dt.Rows[0]["ParentId"].ToString()); + } + if (dt.Rows[0]["IsValid"].ToString() != "") + { + Menu.IsValid = int.Parse(dt.Rows[0]["IsValid"].ToString()); + } + + Menu.Children = GetChildren(Menu, RoleId, IsAll); + } + return Menu; + } + + public static Menu GetMenuByName(string Name) + { + Menu Menu = new Menu(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,Path,ParentId,IsValid "); + strSql.Append(" from Menu "); + strSql.Append(" where Name='" + Name + "' order by MenuOrder"); + + DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString()); + + if (dt.Rows.Count > 0) + { + if (dt.Rows[0]["Id"].ToString() != "") + { + Menu.Id = int.Parse(dt.Rows[0]["Id"].ToString()); + } + Menu.Name = dt.Rows[0]["Name"].ToString(); + Menu.Path = dt.Rows[0]["Path"].ToString(); + if (dt.Rows[0]["ParentId"].ToString() != "") + { + Menu.ParentId = int.Parse(dt.Rows[0]["ParentId"].ToString()); + } + if (dt.Rows[0]["IsValid"].ToString() != "") + { + Menu.IsValid = int.Parse(dt.Rows[0]["IsValid"].ToString()); + } + + } + return Menu; + } + public static List GetChildren(Menu Menu, int RoleId, int IsAll) + { + List children = new List(); + StringBuilder strSql = new StringBuilder(); + + if (IsAll == 0) + { + strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); + strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); + strSql.Append("WHERE m.IsValid=1 AND up.RoleId=" + RoleId + " AND m.ParentId=" + Menu.Id + " and m.ParentId<>63 order by MenuOrder"); + } + if (IsAll == 1) + { + strSql.Append("SELECT * FROM Menu WHERE ParentId='" + Menu.Id + "' order by MenuOrder"); + } + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + if (dt.Rows.Count > 0) + { + for (int i = 0; i < dt.Rows.Count; i++) + { + Menu MenuObj = new Menu(); + MenuObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + MenuObj.Name = dt.Rows[i]["Name"].ToString(); + MenuObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); + MenuObj.Path = dt.Rows[i]["Path"].ToString(); + children.Add(MenuObj); + MenuObj.Children = GetChildren(MenuObj, RoleId, IsAll); + + } + } + return children; + } + + public static Menu GetPathByName(string Name) + { + Menu MenuObj = new Menu(); + string strSql = "select top 1 Path,IsAloneOpen from Menu where IsValid=1 and Name='" + Name + "'"; + + DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString()); + + if (dt.Rows.Count > 0) + { + MenuObj.Path = dt.Rows[0]["Path"].ToString(); + MenuObj.IsAloneOpen = int.Parse(dt.Rows[0]["IsAloneOpen"].ToString()); + } + return MenuObj; + } + + public static DataTable GetMenuDataTable(int ParentId, int RoleId) + { + string strSql = " SELECT m.Id, m.Name,m.[Path] FROM UserPurview up LEFT JOIN [Role] r ON r.Id =up.RoleId " + + " LEFT JOIN Menu m ON m.Id =up.MenuId" + + " WHERE m.ParentId=" + ParentId + " AND up.RoleId=" + RoleId + " and m.Path!=''"; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } } } diff --git a/AIMSEntity/DAL/Extension/DNotice.cs b/AIMSEntity/DAL/Extension/DNotice.cs index 7d459d8..1da96c9 100644 --- a/AIMSEntity/DAL/Extension/DNotice.cs +++ b/AIMSEntity/DAL/Extension/DNotice.cs @@ -5,9 +5,87 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DNotice { + public static List NoticeList() + { + List NoticeList = new List(); + string strSql = "SELECT pc.Id, pc.Contents" + "FROM Notice pc"; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + for (int i = 0; i < dt.Rows.Count; i++) + { + Notice Notice = new Notice(); + Notice.Id = int.Parse(dt.Rows[i]["ID"].ToString()); + Notice.Contents = dt.Rows[i]["Contents"].ToString(); + NoticeList.Add(Notice); + } + return NoticeList; + } + public static void Add(Notice NoticeObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [NoticeTemplate]("); + strSql.Append("Contents,OperatorId,OperatorTime"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + NoticeObj.Contents + "',"); + strSql.Append("'" + AIMSExtension.PublicMethod.OperatorNo + "',"); + strSql.Append("'" + AIMSExtension.PublicMethod.SystemDate() + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static DataTable GetOperationList() + { + string strSql = "select ID,Contents from dbo.NoticeTemplate"; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } + public static DataTable GetOperation() + { + string strSql = "SELECT of1.MdrecNo,of1.PatientName FROM V_OperationFront of1 WHERE of1.[State]='手术中'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } + public static void Delete(int Id) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete NoticeTemplate "); + strSql.Append(" where Id=" + Id + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static void sendout(Notice NoticeObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Notice]("); + strSql.Append("Contents,SendState,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + NoticeObj.Contents + "',"); + strSql.Append("'" + 1 + "',"); + strSql.Append("'" + AIMSExtension.PublicMethod.OperatorNo + "',"); + strSql.Append("'" + AIMSExtension.PublicMethod.OperatorName + "',"); + strSql.Append("'" + AIMSExtension.PublicMethod.SystemDate() + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static List HistoryNoticeData() + { + List NoticeList = new List(); + string strSql = "SELECT Id,Contents, OperatorTime " + " FROM [NoticeTemplate] order by OperatorTime desc "; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + for (int i = 0; i < dt.Rows.Count; i++) + { + Notice Notice = new Notice(); + Notice.Id = int.Parse(dt.Rows[i]["Id"].ToString()); + Notice.Contents = dt.Rows[i]["Contents"].ToString(); + Notice.OperateDate = DateTime.Parse(dt.Rows[i]["OperatorTime"].ToString()); + + NoticeList.Add(Notice); + } + return NoticeList; + } } } diff --git a/AIMSEntity/DAL/Extension/DOperation.cs b/AIMSEntity/DAL/Extension/DOperation.cs index 3c4dc5e..dd64741 100644 --- a/AIMSEntity/DAL/Extension/DOperation.cs +++ b/AIMSEntity/DAL/Extension/DOperation.cs @@ -5,9 +5,104 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOperation { + public static bool IsExit(string Name) + { + + string strSql = "select * from Operation where name ='" + Name + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + return true; + } + else + { + return false; + } + } + public static void Add(Operation OperationObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Operation]("); + strSql.Append("IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + OperationObj.IcdCode + "',"); + strSql.Append("'" + OperationObj.Name + "',"); + strSql.Append("'" + OperationObj.HelpCode + "',"); + strSql.Append("" + OperationObj.UseRate + ","); + strSql.Append("" + OperationObj.IsValid + ","); + strSql.Append("'" + OperationObj.OperatorNo + "',"); + strSql.Append("'" + OperationObj.OperatorName + "',"); + strSql.Append("'" + OperationObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static Operation GetModel(int Id) + { + Operation OperationObj = new Operation(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Operation "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + OperationObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OperationObj.IcdCode = ds.Tables[0].Rows[0]["IcdCode"].ToString(); + OperationObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OperationObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") + { + OperationObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + OperationObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OperationObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + OperationObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OperationObj; + } + + public static DataTable GetDataTable(string HelpCode) + { + string strSql = ""; + if (HelpCode == "") + { + strSql = "SELECT TOP 75 d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 order by UseRate desc"; + } + else + { + strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc"; + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id], IcdCode,[Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM Operation "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOperationApply.cs b/AIMSEntity/DAL/Extension/DOperationApply.cs index 7c253d5..0d491ac 100644 --- a/AIMSEntity/DAL/Extension/DOperationApply.cs +++ b/AIMSEntity/DAL/Extension/DOperationApply.cs @@ -6,12 +6,364 @@ using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; using HelperDB; +using System.Reflection; +using System.Text; namespace AIMSDAL { internal partial class DOperationApply - { - public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom) + { + public static void Add(OperationApply OperationApplyObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [OperationApply]("); + strSql.Append("Oris_PatientId,ApplyDepId,OperationType,OrderOperationTime,OperationTimeLeight,IsReturnOperation,IsPlanReturnOperation,IsNotPlanReturnOperation,DiagnoseRemark,OperationRemark,OperationLevelId,Contagion,Intern,Other,ApplyTime,ApplyOperatorNo,State,Remark,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("" + OperationApplyObj.OrisPatientId + ","); + strSql.Append("" + OperationApplyObj.ApplyDepId + ","); + strSql.Append("'" + OperationApplyObj.OperationType + "',"); + strSql.Append("'" + OperationApplyObj.OrderOperationTime + "',"); + strSql.Append("" + OperationApplyObj.OperationTimeLeight + ","); + strSql.Append("" + OperationApplyObj.IsReturnOperation + ","); + strSql.Append("" + OperationApplyObj.IsPlanReturnOperation + ","); + strSql.Append("" + OperationApplyObj.IsNotPlanReturnOperation + ","); + strSql.Append("'" + OperationApplyObj.DiagnoseRemark + "',"); + strSql.Append("'" + OperationApplyObj.OperationRemark + "',"); + strSql.Append("" + OperationApplyObj.OperationLevelId + ","); + strSql.Append("'" + OperationApplyObj.Contagion + "',"); + strSql.Append("'" + OperationApplyObj.Intern + "',"); + strSql.Append("'" + OperationApplyObj.Other + "',"); + strSql.Append("'" + OperationApplyObj.ApplyTime + "',"); + strSql.Append("'" + OperationApplyObj.ApplyOperatorNo + "',"); + //strSql.Append("'"+OperationApplyObj.PlanOperationTime+"',"); + //strSql.Append(""+OperationApplyObj.OperationRoomId+","); + strSql.Append("" + OperationApplyObj.State + ","); + strSql.Append("'" + OperationApplyObj.Remark + "',"); + strSql.Append("'" + OperationApplyObj.OperatorNo + "',"); + strSql.Append("'" + OperationApplyObj.OperatorName + "',"); + strSql.Append("'" + OperationApplyObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + + public static void UpdateVerifyTime(int ApplyId, string VerifyTime, string VerifyOperatorNo) + { + string strSql = "UPDATE OperationApply SET VerifyTime ='" + VerifyTime + + "',VerifyOperatorNo = '" + VerifyOperatorNo + + "' ,[State] = 2 WHERE Id =" + ApplyId + ""; + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void UpdateApplyState(int ApplyId, int State) + { + string strSql = "UPDATE OperationApply SET [State] = " + State + "," + + "OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + "'," + + "OperatorName='" + AIMSExtension.PublicMethod.OperatorName + "'," + + "OperateDate='" + AIMSExtension.PublicMethod.SystemDate() + "' WHERE Id =" + ApplyId + ""; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void UpdateApplyRoom(int ApplyId, int room) + { + string strSql = "UPDATE OperationApply SET OperationRoomId = " + room + " WHERE Id =" + ApplyId + ""; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static void UpdatePlanOperationTime(int ApplyId, string PlanOperationTime, int OperationRoomId, int State) + { + //HHe 申请状态从 4改为3 3. 预排程 4 已排程 + string strSql = "UPDATE OperationApply SET PlanOperationTime ='" + PlanOperationTime + "'," + + "OperationRoomId = '" + OperationRoomId + "'," + + "[State] = " + State + " ," + + "OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + "'," + + "OperatorName='" + AIMSExtension.PublicMethod.OperatorName + "'," + + "OperateDate='" + AIMSExtension.PublicMethod.SystemDate() + "' " + + "WHERE Id =" + ApplyId + ""; + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void UpdateStopOperation(int ApplyId, string Content) + { + string strSql = "UPDATE OperationApply SET [State] = 10 ," + + "Remark ='" + Content + "'," + + "OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + "'," + + "OperatorName='" + AIMSExtension.PublicMethod.OperatorName + "'," + + "OperateDate='" + AIMSExtension.PublicMethod.SystemDate() + "' WHERE Id =" + ApplyId + ""; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void UpdatePlanOrder(int ApplyId, int PlanOrder) + { + string strSql = "UPDATE OperationApply SET PlanOrder = " + PlanOrder + " WHERE Id='" + ApplyId + "'"; + HelperDB.DbHelperSQL.ExecNonQuery(strSql); + } + + public static void UpdateOperationRoom(int ApplyId, int OperationRoomId, int MaxPlanOrder) + { + string strSql = "UPDATE OperationApply SET OperationRoomId = " + OperationRoomId + ",PlanOrder=" + MaxPlanOrder + " WHERE Id=" + ApplyId + ""; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel, int IsFasting) + { + string strSql = "UPDATE OperationApply SET ASA ='" + ASA + "',HeartFunctionLevel='" + HeartFunctionLevel + "',IsFasting=" + IsFasting + " WHERE id='" + ApplyId + "'"; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void UpdateASA(int ApplyId, string ASA, string HeartFunctionLevel) + { + //string strSql = "UPDATE OperationApply SET ASA ='" + ASA + "',HeartFunctionLevel='" + HeartFunctionLevel + "' WHERE id='" + ApplyId + "'"; + StringBuilder sb = new StringBuilder(); + sb.Append(" UPDATE OperationApply SET"); + sb.Append(" ASA ='" + ASA + "'"); + sb.Append(" ,HeartFunctionLevel='" + HeartFunctionLevel + "'"); + sb.Append(" ,[State] = case [State] when 4 then 5 else [State] end"); + sb.Append(" WHERE id='" + ApplyId + "'"); + HelperDB.DbHelperSQL.ExecNonQuery(sb.ToString()); + } + + public static int GetMaxPlanOrder(DateTime PlanOperationTime, int OperationRoomId) + { + string strSql = "SELECT ISNULL((Max(PlanOrder)),0) AS PlanOrder FROM V_OperationFront of1 WHERE of1.[State] in('已排程','预排程','已访视') AND of1.OrderOperationTime>='" + PlanOperationTime.ToString("yyyy-MM-dd 00:00:00") + "' AND of1.OrderOperationTime<'" + + PlanOperationTime.AddDays(1).ToString("yyyy-MM-dd 00:00:00") + "' AND OperationRoomId=" + OperationRoomId + " "; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + return int.Parse(dt.Rows[0]["PlanOrder"].ToString()); + } + + public static OperationApply GetModel(int Id) + { + OperationApply OperationApplyObj = new OperationApply(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Oris_PatientId,ApplyDepId,OperationType,OrderOperationTime,OperationTimeLeight,IsReturnOperation,IsPlanReturnOperation,IsNotPlanReturnOperation,DiagnoseRemark,OperationRemark,OperationLevelId,Contagion,Intern,Other,ApplyTime,ApplyOperatorNo,PlanOperationTime,OperationRoomId,State,Remark,OperatorNo,OperatorName,OperateDate,PlanOrder "); + strSql.Append(" from OperationApply "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + OperationApplyObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if (ds.Tables[0].Rows[0]["Oris_PatientId"].ToString() != "") + { + OperationApplyObj.OrisPatientId = int.Parse(ds.Tables[0].Rows[0]["Oris_PatientId"].ToString()); + } + if (ds.Tables[0].Rows[0]["ApplyDepId"].ToString() != "") + { + OperationApplyObj.ApplyDepId = int.Parse(ds.Tables[0].Rows[0]["ApplyDepId"].ToString()); + } + OperationApplyObj.OperationType = ds.Tables[0].Rows[0]["OperationType"].ToString(); + if (ds.Tables[0].Rows[0]["OrderOperationTime"].ToString() != "") + { + OperationApplyObj.OrderOperationTime = DateTime.Parse(ds.Tables[0].Rows[0]["OrderOperationTime"].ToString()); + } + if (ds.Tables[0].Rows[0]["OperationTimeLeight"].ToString() != "") + { + OperationApplyObj.OperationTimeLeight = int.Parse(ds.Tables[0].Rows[0]["OperationTimeLeight"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsReturnOperation"].ToString() != "") + { + OperationApplyObj.IsReturnOperation = int.Parse(ds.Tables[0].Rows[0]["IsReturnOperation"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsPlanReturnOperation"].ToString() != "") + { + OperationApplyObj.IsPlanReturnOperation = int.Parse(ds.Tables[0].Rows[0]["IsPlanReturnOperation"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsNotPlanReturnOperation"].ToString() != "") + { + OperationApplyObj.IsNotPlanReturnOperation = int.Parse(ds.Tables[0].Rows[0]["IsNotPlanReturnOperation"].ToString()); + } + OperationApplyObj.DiagnoseRemark = ds.Tables[0].Rows[0]["DiagnoseRemark"].ToString(); + OperationApplyObj.OperationRemark = ds.Tables[0].Rows[0]["OperationRemark"].ToString(); + if (ds.Tables[0].Rows[0]["OperationLevelId"].ToString() != "") + { + OperationApplyObj.OperationLevelId = int.Parse(ds.Tables[0].Rows[0]["OperationLevelId"].ToString()); + } + OperationApplyObj.Contagion = ds.Tables[0].Rows[0]["Contagion"].ToString(); + OperationApplyObj.Intern = ds.Tables[0].Rows[0]["Intern"].ToString(); + OperationApplyObj.Other = ds.Tables[0].Rows[0]["Other"].ToString(); + if (ds.Tables[0].Rows[0]["ApplyTime"].ToString() != "") + { + OperationApplyObj.ApplyTime = DateTime.Parse(ds.Tables[0].Rows[0]["ApplyTime"].ToString()); + } + OperationApplyObj.ApplyOperatorNo = ds.Tables[0].Rows[0]["ApplyOperatorNo"].ToString(); + if (ds.Tables[0].Rows[0]["PlanOperationTime"].ToString() != "") + { + OperationApplyObj.PlanOperationTime = DateTime.Parse(ds.Tables[0].Rows[0]["PlanOperationTime"].ToString()); + } + if (ds.Tables[0].Rows[0]["OperationRoomId"].ToString() != "") + { + OperationApplyObj.OperationRoomId = int.Parse(ds.Tables[0].Rows[0]["OperationRoomId"].ToString()); + } + if (ds.Tables[0].Rows[0]["State"].ToString() != "") + { + OperationApplyObj.State = int.Parse(ds.Tables[0].Rows[0]["State"].ToString()); + } + OperationApplyObj.Remark = ds.Tables[0].Rows[0]["Remark"].ToString(); + if (ds.Tables[0].Rows[0]["PlanOrder"].ToString() != "") OperationApplyObj.PlanOrder = int.Parse(ds.Tables[0].Rows[0]["PlanOrder"].ToString()); + OperationApplyObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationApplyObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + OperationApplyObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OperationApplyObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Oris_PatientId],[ApplyDepId],[OperationType],[OrderOperationTime],[OperationTimeLeight],[IsReturnOperation],[IsPlanReturnOperation],[IsNotPlanReturnOperation],[DiagnoseRemark],[OperationRemark],[OperationLevelId],[Contagion],[Intern],[Other],[ApplyTime],[ApplyTimeOperatorNo],[PlanOperationTime],[OperationRoomId],[State],of1.StateId,[Remark],[OperatorNo],[OperatorName],[OperateDate] "); + strSql.Append(" FROM OperationApply "); + if (strWhere.Trim() != "") + { + + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static int GetOperationApplyMaxId() + { + string strSql = "SELECT (ISNULL(MAX(Id),0)) AS Id FROM OperationApply"; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + return int.Parse(dt.Rows[0]["Id"].ToString()); + } + + public static DataTable GetOperationFrontDataTableByPatientId(int PatientId) + { + string strSql = "SELECT of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.DepartmentId,of1.ApplyDepName, of1.PatientKind," + + "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + + "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + + "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + + "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + + "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," + + "of1.OperationLevelName, of1.ApplyOperationCutTypeName," + + "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," + + "of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3," + + "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," + + "of1.VerifyTime, of1.VerifyOperatorName," + + "of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," + + "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + + "of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.ASA,of1.HeartFunctionLevel,of1.IsFasting, of1.Remark,ApplyDiagnoseInfoId,ApplyOperationInfoId ,of1.PlanOrder,of1.OperationRoomId ,of1.MedicalRecord " + + "FROM V_OperationFront of1 WHERE of1.PatientId='" + PatientId + "'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetOperationFrontDataTable(string BegInData, string EndData) + { + string strSql = "SELECT of1.ApplyId, of1.PatientId,of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + + "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + + "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + + "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + + "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + + "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," + + "of1.OperationLevelName, of1.ApplyOperationCutTypeName," + + "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," + + "of1.OperationDoctor,[dbo].[fun_getPY](of1.OperationDoctor) OperationDoctorcode, of1.Assistant1, of1.Assistant2, of1.Assistant3," + + "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," + + "of1.VerifyTime, of1.VerifyOperatorName," + + "of1.PlanOperationTime, of1.OperationRoom, of1.OperationRoomId, of1.AnesthesiaDoctor," + + "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + + "of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder " + + "FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + BegInData + "' and of1.OrderOperationTime<'" + EndData + "' order by OperationRoomId,PlanOrder asc"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetOperationFrontDataTableByPlanOperationTime(string BegInData, string EndData) + { + string strSql = "SELECT of1.ApplyId,of1.PatientId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + + "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + + "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + + "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + + "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + + "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," + + "of1.OperationLevelName, of1.ApplyOperationCutTypeName," + + "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," + + "of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3," + + "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," + + "of1.VerifyTime, of1.VerifyOperatorName," + + "of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," + + "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + + "of1.InstrumentNurseSucceed, of1.TourNurseSucceed,of1.Remark,of1.PlanOrder " + + "FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + BegInData + "' and of1.PlanOperationTime<'" + EndData + "' order by OperationRoomId,PlanOrder asc"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetOperationFrontByApplyId(List ApplyIdList) + { + string Temp = ""; + for (int i = 0; i < ApplyIdList.Count; i++) + { + Temp += ApplyIdList[i].ToString() + ","; + } + Temp = Temp.Substring(0, Temp.LastIndexOf(",")); + + string strSql = "SELECT of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + + "of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + + "of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + + "of1.OrderOperationTime, of1.OperationTimeLeight, of1.[State],of1.StateId," + + "of1.IsReturnOperation, of1.IsPlanReturnOperation, of1.ApplyDiagnoseInfoName," + + "of1.DiagnoseRemark, of1.ApplyOperationInfoName, of1.OperationRemark," + + "of1.OperationLevelName, of1.ApplyOperationCutTypeName," + + "of1.ApplyOperationPositionName, of1.AnaesthesiaMethodName, of1.Contagion," + + "of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3," + + "of1.Intern, of1.Other, of1.ApplyTime, of1.ApplyOperatorName," + + "of1.VerifyTime, of1.VerifyOperatorName," + + "of1.PlanOperationTime, of1.OperationRoom, of1.AnesthesiaDoctor," + + "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + + "of1.InstrumentNurseSucceed, of1.TourNurseSucceed ,of1.PlanOrder " + + "FROM V_OperationFront of1 WHERE of1.ApplyId in (" + Temp + ")"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetOperationRoomDataTable(DateTime PlanOperationTime, int OperationRoomId) + { + string strSql = "SELECT of1.ApplyId, of1.ApplyDepName, of1.MdrecNo, of1.PatientName, of1.Sex, of1.BirthDay," + + "of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName, " + + "of1.AnaesthesiaMethodName,of1.OperationDoctor ,of1.OperationType ,of1.PlanOrder " + + "FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + PlanOperationTime + "' AND of1.PlanOperationTime<'" + + PlanOperationTime.AddDays(1) + "' AND OperationRoomId=" + OperationRoomId + " AND of1.[State]='已排程' order by OperationRoomId,PlanOrder asc"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetPlanOperationDataTable(DateTime PlanOperationTime, int OperationRoomId) + { + string strSql = "SELECT of1.ApplyId, of1.OperationType, of1.OrderOperationTime ,of1.PlanOperationTime, of1.ApplyDepName, of1.MdrecNo, of1.PatientName," + + "of1.Sex, of1.BirthDay,of1.ApplyDiagnoseInfoName, of1.ApplyOperationInfoName," + + "of1.AnaesthesiaMethodName ,of1.OperationDoctor, of1.Assistant1, of1.Assistant2, of1.Assistant3,of1.AnesthesiaDoctor," + + "of1.InstrumentNurse, of1.TourNurse, of1.AnesthesiaDoctorSucceed," + + "of1.InstrumentNurseSucceed, of1.TourNurseSucceed, " + + "of1.[State], of1.StateId, of1.Remark ,of1.PlanOrder " + + "FROM V_OperationFront of1 WHERE of1.PlanOperationTime>='" + PlanOperationTime + "' AND " + + "of1.PlanOperationTime<'" + PlanOperationTime.AddDays(1) + "' AND of1.OperationRoomId=" + OperationRoomId + " AND of1.[State]='已排程' order by OperationRoomId,PlanOrder asc"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static void UpdateOperationRoom(int ApplyId, int OperationRoomId) + { + string strSql = "UPDATE OperationApply SET OperationRoomId =" + OperationRoomId + " WHERE Id=" + ApplyId + ""; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static DataTable SelectPlanedOpeByRoom(string whereSql) + { + try + { + string sql = @" SELECT * FROM V_OperationFront where " + whereSql + " "; + return DBHelper.GetDataTable(sql); + } + catch (Exception) + { + return null; + } + } + public static int SaveDoctorByRommTime(string DoctorNuresName, DateTime SearchTime, int CurrentRoom) { try { diff --git a/AIMSEntity/DAL/Extension/DOperationBodyPosition.cs b/AIMSEntity/DAL/Extension/DOperationBodyPosition.cs index 5074232..42d0725 100644 --- a/AIMSEntity/DAL/Extension/DOperationBodyPosition.cs +++ b/AIMSEntity/DAL/Extension/DOperationBodyPosition.cs @@ -5,9 +5,78 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOperationBodyPosition { + public static void Add(OperationBodyPosition OperationBodyPositionObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [OperationBodyPosition]("); + strSql.Append("Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + OperationBodyPositionObj.Name + "',"); + strSql.Append("'" + OperationBodyPositionObj.HelpCode + "',"); + strSql.Append("'" + OperationBodyPositionObj.Explain + "',"); + strSql.Append("" + OperationBodyPositionObj.PositionOrder + ","); + strSql.Append("" + OperationBodyPositionObj.IsValid + ","); + strSql.Append("'" + OperationBodyPositionObj.OperatorNo + "',"); + strSql.Append("'" + OperationBodyPositionObj.OperatorName + "',"); + strSql.Append("'" + OperationBodyPositionObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + + } + + public static OperationBodyPosition GetModel(int Id) + { + OperationBodyPosition OperationBodyPositionObj = new OperationBodyPosition(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from OperationBodyPosition "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + OperationBodyPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OperationBodyPositionObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OperationBodyPositionObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + OperationBodyPositionObj.Explain = ds.Tables[0].Rows[0]["Explain"].ToString(); + if (ds.Tables[0].Rows[0]["PositionOrder"].ToString() != "") + { + OperationBodyPositionObj.PositionOrder = int.Parse(ds.Tables[0].Rows[0]["PositionOrder"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + OperationBodyPositionObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OperationBodyPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationBodyPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + OperationBodyPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OperationBodyPositionObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[Explain],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM OperationBodyPosition "); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOperationCutType.cs b/AIMSEntity/DAL/Extension/DOperationCutType.cs index a28ec0e..9ae44a9 100644 --- a/AIMSEntity/DAL/Extension/DOperationCutType.cs +++ b/AIMSEntity/DAL/Extension/DOperationCutType.cs @@ -5,9 +5,72 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOperationCutType { + public static void Add(OperationCutType OperationCutTypeObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [OperationCutType]("); + strSql.Append("Name,HelpCode,Explain,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+OperationCutTypeObj.Name+"',"); + strSql.Append("'"+OperationCutTypeObj.HelpCode+"',"); + strSql.Append("'"+OperationCutTypeObj.Explain+"',"); + strSql.Append(""+OperationCutTypeObj.IsValid+","); + strSql.Append("'"+OperationCutTypeObj.OperatorNo+"',"); + strSql.Append("'"+OperationCutTypeObj.OperatorName+"',"); + strSql.Append("'"+OperationCutTypeObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static OperationCutType GetModel(int Id) + { + OperationCutType OperationCutTypeObj = new OperationCutType(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Explain,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from OperationCutType "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + OperationCutTypeObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OperationCutTypeObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OperationCutTypeObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + OperationCutTypeObj.Explain = ds.Tables[0].Rows[0]["Explain"].ToString(); + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + OperationCutTypeObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OperationCutTypeObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationCutTypeObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + OperationCutTypeObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OperationCutTypeObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[Explain],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM OperationCutType "); + if(strWhere.Trim()!="") + { + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOperationLevel.cs b/AIMSEntity/DAL/Extension/DOperationLevel.cs index 762d241..89bcc87 100644 --- a/AIMSEntity/DAL/Extension/DOperationLevel.cs +++ b/AIMSEntity/DAL/Extension/DOperationLevel.cs @@ -5,9 +5,71 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOperationLevel { + public static void Add(OperationLevel OperationLevelObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [OperationLevel]("); + strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+OperationLevelObj.Name+"',"); + strSql.Append("'"+OperationLevelObj.HelpCode+"',"); + strSql.Append(""+OperationLevelObj.IsValid+","); + strSql.Append("'"+OperationLevelObj.OperatorNo+"',"); + strSql.Append("'"+OperationLevelObj.OperatorName+"',"); + strSql.Append("'"+OperationLevelObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static OperationLevel GetModel(int Id) + { + OperationLevel OperationLevelObj = new OperationLevel(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from OperationLevel "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + OperationLevelObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OperationLevelObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OperationLevelObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + OperationLevelObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OperationLevelObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationLevelObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + OperationLevelObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OperationLevelObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM OperationLevel "); + if(strWhere.Trim()!="") + { + + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOperationPosition.cs b/AIMSEntity/DAL/Extension/DOperationPosition.cs index 7b480bb..40b8384 100644 --- a/AIMSEntity/DAL/Extension/DOperationPosition.cs +++ b/AIMSEntity/DAL/Extension/DOperationPosition.cs @@ -5,9 +5,76 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOperationPosition { + public static void Add(OperationPosition OperationPositionObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [OperationPosition]("); + strSql.Append("Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+OperationPositionObj.Name+"',"); + strSql.Append("'"+OperationPositionObj.HelpCode+"',"); + strSql.Append("'"+OperationPositionObj.Explain+"',"); + strSql.Append(""+OperationPositionObj.PositionOrder+","); + strSql.Append(""+OperationPositionObj.IsValid+","); + strSql.Append("'"+OperationPositionObj.OperatorNo+"',"); + strSql.Append("'"+OperationPositionObj.OperatorName+"',"); + strSql.Append("'"+OperationPositionObj.OperateDate+"'"); + strSql.Append(")"); + + } + public static OperationPosition GetModel(int Id) + { + OperationPosition OperationPositionObj = new OperationPosition(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from OperationPosition "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + OperationPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OperationPositionObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OperationPositionObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + OperationPositionObj.Explain = ds.Tables[0].Rows[0]["Explain"].ToString(); + if(ds.Tables[0].Rows[0]["PositionOrder"].ToString()!="") + { + OperationPositionObj.PositionOrder = int.Parse(ds.Tables[0].Rows[0]["PositionOrder"].ToString()); + } + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + OperationPositionObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OperationPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + OperationPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OperationPositionObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[Explain],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM OperationPosition "); + if(strWhere.Trim()!="") + { + strSql.Append(" where "+strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOperationRecord.cs b/AIMSEntity/DAL/Extension/DOperationRecord.cs index 7f871f0..d2e0bd1 100644 --- a/AIMSEntity/DAL/Extension/DOperationRecord.cs +++ b/AIMSEntity/DAL/Extension/DOperationRecord.cs @@ -1,13 +1,164 @@ -using System; +using AIMSModel; +using DrawGraph; +using System; using System.Data; -using System.Data.SqlClient; -using System.Collections; -using System.Collections.Generic; -using AIMSModel; -using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOperationRecord { + public static int AddTitleTime(int PatientId, int ApplyId, int RecoverId, string TableColumnName, DateTime Time, int RoomId) + { + string strSql = "INSERT INTO OperationRecord(PatientId,OperationApplyId,RecoverId," + TableColumnName + ",OperatorNo,OperatorName,OperateDate,RoomId)" + + "VALUES (" + PatientId + "," + ApplyId + "," + RecoverId + ",'" + Time + "','" + AIMSExtension.PublicMethod.OperatorNo + "','" + + AIMSExtension.PublicMethod.OperatorName + "','" + AIMSExtension.PublicMethod.SystemDate() + "','" + RoomId + "');select @@identity "; + return Convert.ToInt32(HelperDB.DbHelperSQL.ExecNonQuery(strSql)); + ; + } + + public static void UpdateTitleTime(int PatientId, string TableColumnName, DateTime Time) + { + string strSql = "Update OperationRecord Set " + TableColumnName + "='" + Time.ToString("yyyy-MM-dd HH:mm:ss") + + "',OperatorNo='" + AIMSExtension.PublicMethod.OperatorNo + + "',OperatorName='" + AIMSExtension.PublicMethod.OperatorName + "' WHERE PatientId=" + PatientId + ""; + HelperDB.DbHelperSQL.ExecNonQuery(strSql); + } + + public static TitleTime GetTitleTime(int PatientId, int RecoverId) + { + TitleTime TitleTimeObj = new TitleTime(); + string strSql = "SELECT OperationApplyId,ISNULL((SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE fe.EventTypeId=1 and e.Name='入室' and PatientId=" + PatientId + " ),getdate()) as InRoomTime, OutRoomTime, OperationBeginTime,OperationEndTime " + + "FROM OperationRecord WHERE PatientId='" + PatientId + "' and RecoverId='" + RecoverId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + if (dt.Rows[0]["OperationApplyId"].ToString() != "") + { + TitleTimeObj.OperationApplyId = int.Parse(dt.Rows[0]["OperationApplyId"].ToString()); + } + + if (dt.Rows[0]["InRoomTime"].ToString() != "") + { + TitleTimeObj.InRoomTime = DateTime.Parse(DateTime.Parse(dt.Rows[0]["InRoomTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")); + } + + if (dt.Rows[0]["OutRoomTime"].ToString() != "") + { + TitleTimeObj.OutRoomTime = DateTime.Parse(dt.Rows[0]["OutRoomTime"].ToString()); + } + if (dt.Rows[0]["OperationBeginTime"].ToString() != "") + { + TitleTimeObj.OperationBeginTime = DateTime.Parse(dt.Rows[0]["OperationBeginTime"].ToString()); + } + if (dt.Rows[0]["OperationEndTime"].ToString() != "") + { + TitleTimeObj.OperationEndTime = DateTime.Parse(dt.Rows[0]["OperationEndTime"].ToString()); + } + + } + return TitleTimeObj; + } + + + public static DataTable GetOperationDoingMainInfo(int PatientId, int TypeId) + { + string strSql = "SELECT od.Id,od.PatientId, od.ApplyId,(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='入室' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as InRoomTime," + + "(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='出室' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as OutRoomTime, " + + "(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='手术开始' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as OperationBeginTime, " + + "(SELECT TOP 1 fe.EventBeginTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE e.Name='手术结束' and PatientId=" + PatientId + " and EventTypeId=" + TypeId + " ) as OperationEndTime, " + + "od.OperationLevelName, od.OpeAfterMode, od.SpecialSituation," + + "od.PunctureBodyPosition, od.PuncturePosition, od.CatheterDepth,od.NeedleSize, od.NeedleDirection, od.AnaesthesiaPlane," + + "od.AnaesthesiaEffect, od.DiagnoseInfoName, od.OperationInfoName,od.AnaesthesiaMethodName, od.OperationCutTypeName," + + "od.OperationBodyPositionName, od.OperationPositionName, od.OperationDoctor,od.Assistant, od.AnesthesiaDoctor, od.Nurse,od.Nurse2," + + "od.OperatorNo,od.OperatorName,od.OperateDate,od.Remarks,od.State,OperationDoctorId ,[AssistantId] ,[AnesthesiaDoctorId] ,[InstrumentNurseId],[TourNurseId],DiagnoseInfoId,OperationInfoId,AnaesthesiaMethodId,OrtherDoctor,OrtherDoctorId,OperationPositionId,OperationBodyPositionId,ASALevel,SpecialCase,Fasting,BloodType FROM V_OperationDoing od WHERE od.PatientId=" + PatientId + " and od.RecoverId='" + TypeId + "'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } + + public static void UpdateState(int PatientId, int TypeId, int State) + { + string strSql = "UPDATE OperationRecord SET " + (State == 1 ? " OutRoomTime=null, " : "") + " [State] = " + State + + ",OperatorNo = '" + AIMSExtension.PublicMethod.OperatorNo + + "',OperatorName = '" + AIMSExtension.PublicMethod.OperatorName + + "',OperateDate = '" + AIMSExtension.PublicMethod.SystemDate() + + "' WHERE PatientId=" + PatientId + " and RecoverId='" + TypeId + "'"; + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void DeleteOperationRecordData(int RecorId, int PatientId, int TypeId) + { + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactAnaesthesiaMethod WHERE PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactBloodGasAnalysis WHERE OperationRecordId=" + RecorId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDiagnoseInfo WHERE PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE DrugTypeId=" + TypeId + " and PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=" + TypeId + " and PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationBodyPosition WHERE PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationCutType WHERE PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationInfo WHERE PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOperationPosition WHERE PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE OutputLiquidsTypeId=" + TypeId + " and PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " and PersonDutyId=" + TypeId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecordInfo WHERE OperationRecordId=" + RecorId); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM PhysioData WHERE PatientId =" + RecorId); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE id=" + RecorId); + } + public static void DeleteOperationRecorvreData(int PatientId, int TypeId) + { + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE DrugTypeId=" + TypeId + " and PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=" + TypeId + " and PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE OutputLiquidsTypeId=" + TypeId + " and PatientId=" + PatientId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactPersonDuty WHERE PatientId=" + PatientId + " and PersonDutyId=" + TypeId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM OperationRecord WHERE id=" + PatientId + " and RecoverId=" + TypeId + ""); + } + public static void DeleteEvent(int PatientId, int EventId) + { + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventTypeId=1 and EventId =" + EventId + " and PatientId=" + PatientId + ""); + } + + public static DataTable FillDrugData(int PatientId, int DrugTypeId) + { + string strSql = " SELECT fd.Id,d.Id as DrugsId, d.Name AS DrugName ,fd.IsContinue,fd.Dosage,fd.DosageUnit,fd.DrugBeginTime, fd.DrugEndTime,fd.DrugChannel,fd.GiveDrugType,fd.Remark,d.DrugKind,[Density],[DensityUnit],[Velocity],[VelocityUnit],[BloodType] ,fd.[OperatorNo],fd.[OperatorName],fd.[OperateDate],fd.ParentId FROM FactDrug fd " + + "LEFT JOIN Drugs d ON d.Id = fd.DrugId " + + "WHERE fd.PatientId=" + PatientId + " AND fd.DrugTypeId=" + DrugTypeId + " "; + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable FillOutFluid(int PatientId, int DrugTypeId) + { + string strSql = "SELECT fol.Id, fol.OutputLiquidsId,ol.Name AS OutputLiquidsName, fol.BeginTime, fol.EndTime, fol.Dosage, fol.DosageUnit,fol.Remark " + + "FROM FactOutputLiquids fol " + + "LEFT JOIN OutputLiquids ol ON ol.Id = fol.OutputLiquidsId " + + "WHERE fol.PatientId=" + PatientId + " AND fol.OutputLiquidsTypeId=" + DrugTypeId + " "; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DateTime GetMaxTime(int PatientId, int TypeId) + { + string strSql = "SELECT ISNULL(MAX(A.MaxTime),GETDATE()) MaxTime FROM ( " + + "SELECT fd.DrugEndTime AS MaxTime FROM FactDrug fd WHERE fd.DrugTypeId=" + TypeId + " and fd.PatientId=" + PatientId + " " + + "UNION ALL " + + "SELECT fe.EventEndTime AS MaxTime FROM FactEvents fe LEFT JOIN Events e ON e.Id =fe.EventId WHERE fe.EventTypeId=" + TypeId + " and fe.PatientId=" + PatientId + " " + + "UNION ALL " + + "SELECT fol.EndTime AS MaxTime FROM FactOutputLiquids fol WHERE fol.OutputLiquidsTypeId=" + TypeId + " and fol.PatientId=" + PatientId + " )A "; + + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + return DateTime.Parse(dt.Rows[0]["MaxTime"].ToString()); + } + public static int GetDataCount(int RecorId, int PatientId, int TypeId) + { + string strSql = "SELECT SUM(A.RowCounts) AS RowCounts FROM ( " + + "SELECT COUNT(*) AS RowCounts FROM FactDrug fd WHERE fd.DrugTypeId =" + TypeId + " and fd.PatientId=" + PatientId + " UNION ALL " + + "SELECT COUNT(*) AS RowCounts FROM FactEvents fe WHERE fe.EventTypeId=" + TypeId + " and fe.PatientId=" + PatientId + " and EventId<>7 UNION ALL " + + "SELECT COUNT(*) AS RowCounts FROM FactOutputLiquids fol WHERE OutputLiquidsTypeId=" + TypeId + " and fol.PatientId=" + PatientId + " UNION ALL " + + "SELECT COUNT(*) AS RowCounts FROM FactBloodGasAnalysis fol WHERE OperationRecordId=" + RecorId + " )A "; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + return int.Parse(dt.Rows[0]["RowCounts"].ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOperationRoom.cs b/AIMSEntity/DAL/Extension/DOperationRoom.cs index bc5bf9d..16d3cbd 100644 --- a/AIMSEntity/DAL/Extension/DOperationRoom.cs +++ b/AIMSEntity/DAL/Extension/DOperationRoom.cs @@ -5,9 +5,129 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOperationRoom { + public static void Add(OperationRoom OperationRoomObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [OperationRoom]("); + strSql.Append("Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + OperationRoomObj.Name + "',"); + strSql.Append("'" + OperationRoomObj.HelpCode + "',"); + strSql.Append("'" + OperationRoomObj.Ip + "',"); + strSql.Append("" + OperationRoomObj.RoomOrder + ","); + strSql.Append("" + OperationRoomObj.IsValid + ","); + strSql.Append("'" + OperationRoomObj.OperatorNo + "',"); + strSql.Append("'" + OperationRoomObj.OperatorName + "',"); + strSql.Append("'" + OperationRoomObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static OperationRoom GetModel(int Id) + { + OperationRoom OperationRoomObj = new OperationRoom(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from OperationRoom "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + OperationRoomObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OperationRoomObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OperationRoomObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + OperationRoomObj.Ip = ds.Tables[0].Rows[0]["Ip"].ToString(); + if (ds.Tables[0].Rows[0]["RoomOrder"].ToString() != "") + { + OperationRoomObj.RoomOrder = int.Parse(ds.Tables[0].Rows[0]["RoomOrder"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + OperationRoomObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OperationRoomObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationRoomObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + OperationRoomObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OperationRoomObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[Ip],[RoomOrder],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM OperationRoom "); + if (strWhere.Trim() != "") + { + + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static List GetOperationRooms(string strWhere) + { + + List OperationRoomObjs = new List(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],[Ip],[RoomOrder],IsValid ,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" FROM OperationRoom "); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + for (int i = 0; i < ds.Tables[0].Rows.Count; i++) + { + OperationRoom OperationRoomObj = new OperationRoom(); + if (ds.Tables[0].Rows[i]["Id"].ToString() != "") + { + OperationRoomObj.Id = int.Parse(ds.Tables[0].Rows[i]["Id"].ToString()); + } + OperationRoomObj.Name = ds.Tables[0].Rows[i]["Name"].ToString(); + OperationRoomObj.HelpCode = ds.Tables[0].Rows[i]["HelpCode"].ToString(); + OperationRoomObj.Ip = ds.Tables[0].Rows[i]["Ip"].ToString(); + if (ds.Tables[0].Rows[i]["RoomOrder"].ToString() != "") + { + OperationRoomObj.RoomOrder = int.Parse(ds.Tables[0].Rows[i]["RoomOrder"].ToString()); + } + if (ds.Tables[0].Rows[i]["IsValid"].ToString() != "") + { + OperationRoomObj.IsValid = int.Parse(ds.Tables[0].Rows[i]["IsValid"].ToString()); + } + OperationRoomObj.OperatorNo = ds.Tables[0].Rows[i]["OperatorNo"].ToString(); + OperationRoomObj.OperatorName = ds.Tables[0].Rows[i]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[i]["OperateDate"].ToString() != "") + { + OperationRoomObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[i]["OperateDate"].ToString()); + } + OperationRoomObjs.Add(OperationRoomObj); + } + } + return OperationRoomObjs; + } + + public static int GetOperationRoomIdByName(string Name) + { + string strSql = "SELECT or1.Id FROM OperationRoom or1 WHERE or1.Name='" + Name + "'"; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + return int.Parse(dt.Rows[0]["Id"].ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOperationTemplate.cs b/AIMSEntity/DAL/Extension/DOperationTemplate.cs index ec5b60d..28d2955 100644 --- a/AIMSEntity/DAL/Extension/DOperationTemplate.cs +++ b/AIMSEntity/DAL/Extension/DOperationTemplate.cs @@ -5,9 +5,174 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DOperationTemplate { + public static bool Exists(string TemplateName, int TypeId) + { + bool Temp = false; + StringBuilder strSql = new StringBuilder(); + strSql.Append("select * from OperationTemplate where TemplateName='" + TemplateName + "' and TypeId = '" + TypeId + "'"); + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + if (dt.Rows.Count > 0) + { + Temp = true; + } + return Temp; + } + + public static void Add(OperationTemplate OperationTemplateObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [OperationTemplate]("); + strSql.Append("TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + OperationTemplateObj.TemplateName + "',"); + strSql.Append("" + OperationTemplateObj.TypeId + ","); + strSql.Append("'" + OperationTemplateObj.ItemKindName + "',"); + strSql.Append("'" + OperationTemplateObj.InRoomTime + "',"); + strSql.Append("" + OperationTemplateObj.ItemId + ","); + strSql.Append("'" + OperationTemplateObj.BeginTime + "',"); + strSql.Append("'" + OperationTemplateObj.EndTime + "',"); + strSql.Append("" + OperationTemplateObj.Value + ","); + strSql.Append("'" + OperationTemplateObj.DosageUnit + "',"); + strSql.Append("'" + OperationTemplateObj.DrugChannel + "',"); + strSql.Append("'" + OperationTemplateObj.GiveDrugType + "',"); + strSql.Append("'" + OperationTemplateObj.OperatorNo + "',"); + strSql.Append("'" + OperationTemplateObj.OperatorName + "',"); + strSql.Append("'" + OperationTemplateObj.OperateDate + "',"); + strSql.Append("'" + OperationTemplateObj.IsPublic + "',"); + strSql.Append("'" + OperationTemplateObj.Spare1 + "',"); + strSql.Append("'" + OperationTemplateObj.Spare2 + "',"); + strSql.Append("'" + OperationTemplateObj.Spare3 + "',"); + strSql.Append("'" + OperationTemplateObj.Spare4 + "',"); + strSql.Append("'" + OperationTemplateObj.Spare5 + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static void Delete(string TemplateName, int TypeId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete OperationTemplate "); + strSql.Append(" where TemplateName='" + TemplateName + "' and TypeId=" + TypeId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static OperationTemplate GetModel(int Id) + { + OperationTemplate OperationTemplateObj = new OperationTemplate(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5 "); + strSql.Append(" from OperationTemplate "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + OperationTemplateObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OperationTemplateObj.TemplateName = ds.Tables[0].Rows[0]["TemplateName"].ToString(); + if (ds.Tables[0].Rows[0]["TypeId"].ToString() != "") + { + OperationTemplateObj.TypeId = int.Parse(ds.Tables[0].Rows[0]["TypeId"].ToString()); + } + OperationTemplateObj.ItemKindName = ds.Tables[0].Rows[0]["ItemKindName"].ToString(); + + if (ds.Tables[0].Rows[0]["InRoomTime"].ToString() != "") + { + OperationTemplateObj.InRoomTime = DateTime.Parse(ds.Tables[0].Rows[0]["InRoomTime"].ToString()); + } + if (ds.Tables[0].Rows[0]["ItemId"].ToString() != "") + { + OperationTemplateObj.ItemId = int.Parse(ds.Tables[0].Rows[0]["ItemId"].ToString()); + } + if (ds.Tables[0].Rows[0]["BeginTime"].ToString() != "") + { + OperationTemplateObj.BeginTime = DateTime.Parse(ds.Tables[0].Rows[0]["BeginTime"].ToString()); + } + if (ds.Tables[0].Rows[0]["EndTime"].ToString() != "") + { + OperationTemplateObj.EndTime = DateTime.Parse(ds.Tables[0].Rows[0]["EndTime"].ToString()); + } + if (ds.Tables[0].Rows[0]["Value"].ToString() != "") + { + OperationTemplateObj.Value = decimal.Parse(ds.Tables[0].Rows[0]["Value"].ToString()); + } + OperationTemplateObj.DosageUnit = ds.Tables[0].Rows[0]["DosageUnit"].ToString(); + OperationTemplateObj.DrugChannel = ds.Tables[0].Rows[0]["DrugChannel"].ToString(); + OperationTemplateObj.GiveDrugType = ds.Tables[0].Rows[0]["GiveDrugType"].ToString(); + OperationTemplateObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OperationTemplateObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + OperationTemplateObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsPublic"].ToString() != "") + { + OperationTemplateObj.IsPublic = int.Parse(ds.Tables[0].Rows[0]["IsPublic"].ToString()); + } + OperationTemplateObj.Spare1 = ds.Tables[0].Rows[0]["Spare1"].ToString(); + OperationTemplateObj.Spare2 = ds.Tables[0].Rows[0]["Spare2"].ToString(); + OperationTemplateObj.Spare3 = ds.Tables[0].Rows[0]["Spare3"].ToString(); + OperationTemplateObj.Spare4 = ds.Tables[0].Rows[0]["Spare4"].ToString(); + OperationTemplateObj.Spare5 = ds.Tables[0].Rows[0]["Spare5"].ToString(); + + } + return OperationTemplateObj; + } + + public static DataTable GetDataTable(int TypeId, string OpNo) + { + string strSql = "SELECT DISTINCT TemplateName FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and (isPublic=1 or [OperatorNo]='" + OpNo + "')"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + } + + public static void ClearData(int PatientId, int TypeId) + { + try + { + HelperDB.DbHelperSQL.BeginTrans(); + + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE PatientId=" + PatientId + " AND DrugTypeId=" + TypeId + " "); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventId not in (" + GetInRoomEventId() + ") and PatientId=" + PatientId + " AND EventTypeId=" + TypeId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE PatientId= " + PatientId + " AND OutputLiquidsTypeId=" + TypeId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM PhysioData WHERE PatientId=" + PatientId + " AND PhysioDataType=" + TypeId + ""); + HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactBloodGasAnalysis WHERE PatientId=" + PatientId + " AND TypeId=" + TypeId + ""); + HelperDB.DbHelperSQL.CommitTrans(); + } + catch + { + HelperDB.DbHelperSQL.RollbackTrans(); + } + } + private static int GetInRoomEventId() + { + string strSql = "SELECT Id FROM Events WHERE NAME='入室' "; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + return int.Parse(dt.Rows[0]["Id"].ToString()); + } + else + { + return 0; + } + + } + public static DataTable GetDataTable(string TemplateName, int TypeId) + { + string strSql = "SELECT TemplateName, ItemKindName,InRoomTime, ItemId, BeginTime, EndTime, [Value], DosageUnit,DrugChannel,GiveDrugType,[OperatorNo],[OperatorName] ,[OperateDate] ,[Ispublic static],[Spare1],[Spare2],[Spare3] ,[Spare4],[Spare5] FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and TemplateName='" + TemplateName + "'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOrisPatient.cs b/AIMSEntity/DAL/Extension/DOrisPatient.cs index c9717ea..61a9868 100644 --- a/AIMSEntity/DAL/Extension/DOrisPatient.cs +++ b/AIMSEntity/DAL/Extension/DOrisPatient.cs @@ -5,9 +5,139 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DOrisPatient { + public static void Add(OrisPatient Oris_PatientObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Oris_Patient]("); + strSql.Append("MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + Oris_PatientObj.MdrecNo + "',"); + strSql.Append("'" + Oris_PatientObj.ArchivesNo + "',"); + strSql.Append("'" + Oris_PatientObj.Name + "',"); + strSql.Append("'" + Oris_PatientObj.Sex + "',"); + strSql.Append("'" + Oris_PatientObj.BirthDay + "',"); + strSql.Append("'" + Oris_PatientObj.Height + "',"); + strSql.Append("'" + Oris_PatientObj.Weight + "',"); + strSql.Append("" + Oris_PatientObj.DepId + ","); + strSql.Append("'" + Oris_PatientObj.Illdistrict + "',"); + strSql.Append("'" + Oris_PatientObj.SickBed + "',"); + strSql.Append("'" + Oris_PatientObj.BloodType + "',"); + strSql.Append("'" + Oris_PatientObj.RHBloodType + "',"); + strSql.Append("'" + Oris_PatientObj.PatientKind + "',"); + strSql.Append("'" + Oris_PatientObj.InHosDate + "',"); + strSql.Append("'" + Oris_PatientObj.IdentityCard + "',"); + strSql.Append("'" + Oris_PatientObj.Contacts + "',"); + strSql.Append("'" + Oris_PatientObj.ContactsPhone + "',"); + strSql.Append("'" + Oris_PatientObj.OperatorNo + "',"); + strSql.Append("'" + Oris_PatientObj.OperatorName + "',"); + strSql.Append("'" + Oris_PatientObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + //public static void Update(OrisPatient Oris_PatientObj) + //{ + // StringBuilder strSql = new StringBuilder(); + // strSql.Append("update Oris_Patient set "); + // strSql.Append("MdrecNo='" + Oris_PatientObj.MdrecNo + "',"); + // strSql.Append("ArchivesNo='" + Oris_PatientObj.ArchivesNo + "',"); + // strSql.Append("Name='" + Oris_PatientObj.Name + "',"); + // strSql.Append("Sex='" + Oris_PatientObj.Sex + "',"); + // strSql.Append("BirthDay='" + Oris_PatientObj.BirthDay + "',"); + // strSql.Append("Height='" + Oris_PatientObj.Height + "',"); + // strSql.Append("Weight='" + Oris_PatientObj.Weight + "',"); + // strSql.Append("DepId=" + Oris_PatientObj.DepId + ","); + // strSql.Append("Illdistrict='" + Oris_PatientObj.Illdistrict + "',"); + // strSql.Append("SickBed='" + Oris_PatientObj.SickBed + "',"); + // strSql.Append("BloodType='" + Oris_PatientObj.BloodType + "',"); + // strSql.Append("RHBloodType='" + Oris_PatientObj.RHBloodType + "',"); + // strSql.Append("PatientKind='" + Oris_PatientObj.PatientKind + "',"); + // strSql.Append("InHosDate='" + Oris_PatientObj.InHosDate + "',"); + // strSql.Append("IdentityCard='" + Oris_PatientObj.IdentityCard + "',"); + // strSql.Append("Contacts='" + Oris_PatientObj.Contacts + "',"); + // strSql.Append("ContactsPhone='" + Oris_PatientObj.ContactsPhone + "',"); + // strSql.Append("OperatorNo='" + Oris_PatientObj.OperatorNo + "',"); + // strSql.Append("OperatorName='" + Oris_PatientObj.OperatorName + "',"); + // strSql.Append("OperateDate='" + Oris_PatientObj.OperateDate + "'"); + // strSql.Append(" where Id=" + Oris_PatientObj.Id + " "); + // HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + //} + + public static OrisPatient GetModel(int Id) + { + OrisPatient Oris_PatientObj = new OrisPatient(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,MdrecNo,ArchivesNo,Name,Sex,BirthDay,Height,Weight,DepId,Illdistrict,SickBed,BloodType,RHBloodType,PatientKind,InHosDate,IdentityCard,Contacts,ContactsPhone,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Oris_Patient "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + Oris_PatientObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + Oris_PatientObj.MdrecNo = ds.Tables[0].Rows[0]["MdrecNo"].ToString(); + Oris_PatientObj.ArchivesNo = ds.Tables[0].Rows[0]["ArchivesNo"].ToString(); + Oris_PatientObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + Oris_PatientObj.Sex = ds.Tables[0].Rows[0]["Sex"].ToString(); + if (ds.Tables[0].Rows[0]["BirthDay"].ToString() != "") + { + Oris_PatientObj.BirthDay = DateTime.Parse(ds.Tables[0].Rows[0]["BirthDay"].ToString()); + } + Oris_PatientObj.Height = ds.Tables[0].Rows[0]["Height"].ToString(); + Oris_PatientObj.Weight = ds.Tables[0].Rows[0]["Weight"].ToString(); + if (ds.Tables[0].Rows[0]["DepId"].ToString() != "") + { + Oris_PatientObj.DepId = int.Parse(ds.Tables[0].Rows[0]["DepId"].ToString()); + } + Oris_PatientObj.Illdistrict = ds.Tables[0].Rows[0]["Illdistrict"].ToString(); + Oris_PatientObj.SickBed = ds.Tables[0].Rows[0]["SickBed"].ToString(); + Oris_PatientObj.BloodType = ds.Tables[0].Rows[0]["BloodType"].ToString(); + Oris_PatientObj.RHBloodType = ds.Tables[0].Rows[0]["RHBloodType"].ToString(); + Oris_PatientObj.PatientKind = ds.Tables[0].Rows[0]["PatientKind"].ToString(); + if (ds.Tables[0].Rows[0]["InHosDate"].ToString() != "") + { + Oris_PatientObj.InHosDate = DateTime.Parse(ds.Tables[0].Rows[0]["InHosDate"].ToString()); + } + Oris_PatientObj.IdentityCard = ds.Tables[0].Rows[0]["IdentityCard"].ToString(); + Oris_PatientObj.Contacts = ds.Tables[0].Rows[0]["Contacts"].ToString(); + Oris_PatientObj.ContactsPhone = ds.Tables[0].Rows[0]["ContactsPhone"].ToString(); + Oris_PatientObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + Oris_PatientObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + Oris_PatientObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return Oris_PatientObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[MdrecNo],[ArchivesNo],[Name],[Sex],[BirthDay],[Height],[Weight],[DepId],[Illdistrict],[SickBed],[BloodType],[RHBloodType],[PatientKind],[InHosDate],[IdentityCard],[Contacts],[ContactsPhone] "); + strSql.Append(" FROM Oris_Patient "); + if (strWhere.Trim() != "") + { + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static int GetOris_PatientMaxId() + { + string strSql = "SELECT (ISNULL(MAX(Id),0)) AS Id FROM Oris_Patient"; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + return int.Parse(dt.Rows[0]["Id"].ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DOutputLiquids.cs b/AIMSEntity/DAL/Extension/DOutputLiquids.cs index b1a1c80..e6353f2 100644 --- a/AIMSEntity/DAL/Extension/DOutputLiquids.cs +++ b/AIMSEntity/DAL/Extension/DOutputLiquids.cs @@ -5,9 +5,127 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DOutputLiquids { + public static bool IsExit(string Name) + { + string strSql = "select * from OutputLiquids where name ='" + Name + "'"; + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + if (dt.Rows.Count > 0) + { + return true; + } + else + { + return false; + } + } + public static void Add(OutputLiquids OutputLiquidsObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [OutputLiquids]("); + strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + OutputLiquidsObj.Name + "',"); + strSql.Append("'" + OutputLiquidsObj.HelpCode + "',"); + strSql.Append("" + OutputLiquidsObj.IsValid + ","); + strSql.Append("'" + OutputLiquidsObj.OperatorNo + "',"); + strSql.Append("'" + OutputLiquidsObj.OperatorName + "',"); + strSql.Append("'" + OutputLiquidsObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + + } + public static void Delete(int Id) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete OutputLiquids "); + strSql.Append(" where Id=" + Id + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + public static OutputLiquids GetModel(int Id) + { + OutputLiquids OutputLiquidsObj = new OutputLiquids(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from OutputLiquids "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + OutputLiquidsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OutputLiquidsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OutputLiquidsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + OutputLiquidsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OutputLiquidsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OutputLiquidsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + OutputLiquidsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OutputLiquidsObj; + } + + public static OutputLiquids GetModelByName(string Name) + { + OutputLiquids OutputLiquidsObj = new OutputLiquids(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select top 1 "); + strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from OutputLiquids "); + strSql.Append(" where Name='" + Name + "'"); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + OutputLiquidsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + OutputLiquidsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + OutputLiquidsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + OutputLiquidsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + OutputLiquidsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + OutputLiquidsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + OutputLiquidsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return OutputLiquidsObj; + } + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id], [Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM OutputLiquids "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetDataTable(string HelpCode) + { + string strSql = "SELECT Id,Name FROM dbo.OutputLiquids WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetEventDataTable() + { + string strSql = "SELECT TOP 17 e.Id, e.Name FROM OutputLiquids e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } } } diff --git a/AIMSEntity/DAL/Extension/DPatientKind.cs b/AIMSEntity/DAL/Extension/DPatientKind.cs index 8e25557..d4a38a2 100644 --- a/AIMSEntity/DAL/Extension/DPatientKind.cs +++ b/AIMSEntity/DAL/Extension/DPatientKind.cs @@ -5,9 +5,116 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DPatientKind { + public static void Add(PatientKind PatientKindObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [PatientKind]("); + strSql.Append("No,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + PatientKindObj.No + "',"); + strSql.Append("'" + PatientKindObj.Name + "',"); + strSql.Append("'" + PatientKindObj.HelpCode + "',"); + strSql.Append("" + PatientKindObj.IsValid + ","); + strSql.Append("'" + PatientKindObj.OperatorNo + "',"); + strSql.Append("'" + PatientKindObj.OperatorName + "',"); + strSql.Append("'" + PatientKindObj.OperateDate + "'"); + strSql.Append(")"); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static PatientKind GetModel(int Id) + { + PatientKind PatientKindObj = new PatientKind(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,No,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from PatientKind "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + PatientKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + PatientKindObj.No = ds.Tables[0].Rows[0]["No"].ToString(); + PatientKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + PatientKindObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + PatientKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + PatientKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + PatientKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + PatientKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return PatientKindObj; + } + + public static DataTable GetDataTable(string strWhere) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[No],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM PatientKind "); + if (strWhere.Trim() != "") + { + + strSql.Append(" where " + strWhere); + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[No],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM PatientKind "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static bool IsExit(string No) + { + + string strSql = "select * from PatientKind where name ='" + No + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + return true; + } + else + { + return false; + } + } + public static bool NameExit(string Name) + { + + string strSql = "select * from PatientKind where name ='" + Name + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + return true; + } + else + { + return false; + } + } + } } diff --git a/AIMSEntity/DAL/Extension/DPerson.cs b/AIMSEntity/DAL/Extension/DPerson.cs index f163602..2ed874c 100644 --- a/AIMSEntity/DAL/Extension/DPerson.cs +++ b/AIMSEntity/DAL/Extension/DPerson.cs @@ -6,12 +6,244 @@ using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; using HelperDB; +using System.Text; namespace AIMSDAL { internal partial class DPerson - { + { + public static void Add(Person PersonObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Person]("); + strSql.Append("No,Name,HelpCode,Sex,PassWord,DepId,RoleId,BirthDay,TimeToWork,Diploma,JobTitle,PersonType,PersonOrder,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + PersonObj.No + "',"); + strSql.Append("'" + PersonObj.Name + "',"); + strSql.Append("'" + PersonObj.HelpCode + "',"); + strSql.Append("'" + PersonObj.Sex + "',"); + strSql.Append("'" + PersonObj.PassWord + "',"); + strSql.Append("" + PersonObj.DepId + ","); + strSql.Append("" + PersonObj.RoleId + ","); + strSql.Append("'" + PersonObj.BirthDay + "',"); + strSql.Append("'" + PersonObj.TimeToWork + "',"); + strSql.Append("'" + PersonObj.Diploma + "',"); + strSql.Append("'" + PersonObj.JobTitle + "',"); + strSql.Append("'" + PersonObj.PersonType + "',"); + strSql.Append("" + PersonObj.PersonOrder + ","); + strSql.Append("" + PersonObj.IsValid + ","); + strSql.Append("'" + PersonObj.OperatorNo + "',"); + strSql.Append("'" + PersonObj.OperatorName + "',"); + strSql.Append("'" + PersonObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static Person GetModel(int Id) + { + Person PersonObj = new Person(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,No,Name,HelpCode,Sex,PassWord,DepId,RoleId,BirthDay,TimeToWork,Diploma,JobTitle,PersonType,PersonOrder,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Person "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + PersonObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + PersonObj.No = ds.Tables[0].Rows[0]["No"].ToString(); + PersonObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + PersonObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + PersonObj.Sex = ds.Tables[0].Rows[0]["Sex"].ToString(); + PersonObj.PassWord = ds.Tables[0].Rows[0]["PassWord"].ToString(); + if (ds.Tables[0].Rows[0]["DepId"].ToString() != "") + { + PersonObj.DepId = int.Parse(ds.Tables[0].Rows[0]["DepId"].ToString()); + } + if (ds.Tables[0].Rows[0]["RoleId"].ToString() != "") + { + PersonObj.RoleId = int.Parse(ds.Tables[0].Rows[0]["RoleId"].ToString()); + } + if (ds.Tables[0].Rows[0]["BirthDay"].ToString() != "") + { + PersonObj.BirthDay = ds.Tables[0].Rows[0]["BirthDay"].ToString(); + } + if (ds.Tables[0].Rows[0]["TimeToWork"].ToString() != "") + { + PersonObj.TimeToWork = ds.Tables[0].Rows[0]["TimeToWork"].ToString(); + } + PersonObj.Diploma = ds.Tables[0].Rows[0]["Diploma"].ToString(); + PersonObj.JobTitle = ds.Tables[0].Rows[0]["JobTitle"].ToString(); + PersonObj.PersonType = ds.Tables[0].Rows[0]["PersonType"].ToString(); + if (ds.Tables[0].Rows[0]["PersonOrder"].ToString() != "") + { + PersonObj.PersonOrder = int.Parse(ds.Tables[0].Rows[0]["PersonOrder"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + PersonObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + PersonObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + PersonObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + PersonObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return PersonObj; + } + public static DataTable GetPersonDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("SELECT p.Id,p.No,p.Name,p.HelpCode,p.Sex,p.PassWord,d.Name AS DepName,r.RoleName,p.BirthDay,p.TimeToWork,"); + strSql.Append("p.Diploma,p.JobTitle,p.PersonType,p.PersonOrder,CASE p.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid FROM Person p "); + strSql.Append("LEFT JOIN Department d ON d.Id =p.DepId "); + strSql.Append("LEFT JOIN [Role] r ON r.Id = p.RoleId "); + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetPersonDataTable(string name,string DeptName) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("SELECT p.Id,p.No,p.Name,p.HelpCode,p.Sex,p.PassWord,d.Name AS DepName,r.RoleName,p.BirthDay,p.TimeToWork,"); + strSql.Append("p.Diploma,p.JobTitle,p.PersonType,p.PersonOrder,CASE p.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid FROM Person p "); + strSql.Append("LEFT JOIN Department d ON d.Id =p.DepId "); + strSql.Append("LEFT JOIN [Role] r ON r.Id = p.RoleId "); + if (name.Length > 0) + strSql.Append(" WHERE p.No like '%" + name + "%' Or p.Name like '%" + name + "%' Or p.HelpCode like '%" + name + "%' "); + if (DeptName.Length > 0 && name.Length==0) + strSql.Append(" WHERE d.Name = '" + DeptName + "' "); + else if (DeptName.Length > 0 && name.Length>0) + strSql.Append(" and d.Name = '" + DeptName + "' "); + + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static bool Login(string No, string PassWord) + { + string strSql = "SELECT * FROM Person p"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + if (dt.Rows.Count > 0) + return true; + else + return false; + + } + + public static Person GetModelByNo(string No) + { + Person PersonObj = new Person(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select top 1 "); + strSql.Append("Id,No,Name,HelpCode,Sex,PassWord,DepId,RoleId,BirthDay,TimeToWork,Diploma,JobTitle,PersonType,PersonOrder,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Person "); + strSql.Append(" where No='" + No + "'"); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + PersonObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + PersonObj.No = ds.Tables[0].Rows[0]["No"].ToString(); + PersonObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + PersonObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); + PersonObj.Sex = ds.Tables[0].Rows[0]["Sex"].ToString(); + PersonObj.PassWord = ds.Tables[0].Rows[0]["PassWord"].ToString(); + if (ds.Tables[0].Rows[0]["DepId"].ToString() != "") + { + PersonObj.DepId = int.Parse(ds.Tables[0].Rows[0]["DepId"].ToString()); + } + if (ds.Tables[0].Rows[0]["RoleId"].ToString() != "") + { + PersonObj.RoleId = int.Parse(ds.Tables[0].Rows[0]["RoleId"].ToString()); + } + if (ds.Tables[0].Rows[0]["BirthDay"].ToString() != "") + { + PersonObj.BirthDay = ds.Tables[0].Rows[0]["BirthDay"].ToString(); + } + if (ds.Tables[0].Rows[0]["TimeToWork"].ToString() != "") + { + PersonObj.TimeToWork = ds.Tables[0].Rows[0]["TimeToWork"].ToString(); + } + PersonObj.Diploma = ds.Tables[0].Rows[0]["Diploma"].ToString(); + PersonObj.JobTitle = ds.Tables[0].Rows[0]["JobTitle"].ToString(); + PersonObj.PersonType = ds.Tables[0].Rows[0]["PersonType"].ToString(); + if (ds.Tables[0].Rows[0]["PersonOrder"].ToString() != "") + { + PersonObj.PersonOrder = int.Parse(ds.Tables[0].Rows[0]["PersonOrder"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + PersonObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + PersonObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + PersonObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + PersonObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return PersonObj; + } + + public static DataTable GetPersonDataTableByDepId(int DepId, string HelpCode, string PersonType) + { + string strSql = ""; + + if (HelpCode == "简拼/汉字/ICD码") + { + HelpCode = ""; + } + string Depstr = ""; + if (DepId != -1) Depstr = " AND p.DepId='" + DepId + "' "; + if (PersonType == "医生") + { + strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='医生' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; + + } + if (PersonType == "麻醉医生") + { + strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉医生' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; + + } + if (PersonType == "麻醉护士") + { + strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉护士' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; + + } + if (PersonType == "手术室护士") + { + strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='手术室护士' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; + + } + if (PersonType == "护士") + { + strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType like '%护士%' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; + + } + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetSchedulingForSelect(DateTime time, string workerType)//int depId, + { + try + { + string sql = string.Empty; + sql = "EXEC usp_GetSchedulingForSelect @DateTime = '" + time + + "', @WorkerType= '" + workerType + "'";//, @DepId= " + depId + return DBHelper.GetDataTable(sql); + } + catch (SqlException ex) + { + throw new Exception(ex.Message); + } + } public static List GetruleAnesthesiaDoctor(string IDS) { List ruleAnesthesiaDoctors = new List(); diff --git a/AIMSEntity/DAL/Extension/DPersonDuty.cs b/AIMSEntity/DAL/Extension/DPersonDuty.cs index 5fdfe77..fcb6bf9 100644 --- a/AIMSEntity/DAL/Extension/DPersonDuty.cs +++ b/AIMSEntity/DAL/Extension/DPersonDuty.cs @@ -9,5 +9,10 @@ namespace AIMSDAL { internal partial class DPersonDuty { + public static DataTable GetDataTablePersonDuty() + { + string strSql = "select Id,Name from dbo.PersonDuty where IsValid=1"; + return HelperDB.DbHelperSQL.GetDataTable(strSql); + } } } diff --git a/AIMSEntity/DAL/Extension/DPharmaCology.cs b/AIMSEntity/DAL/Extension/DPharmaCology.cs index 0e7d155..ef8f411 100644 --- a/AIMSEntity/DAL/Extension/DPharmaCology.cs +++ b/AIMSEntity/DAL/Extension/DPharmaCology.cs @@ -5,9 +5,81 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Text; + namespace AIMSDAL { internal partial class DPharmaCology { + public static void Add(PharmaCology PharmaCologyObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("insert into [PharmaCology]("); + strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'"+PharmaCologyObj.Name+"',"); + strSql.Append("'"+PharmaCologyObj.HelpCode+"',"); + strSql.Append(""+PharmaCologyObj.IsValid+","); + strSql.Append("'"+PharmaCologyObj.OperatorNo+"',"); + strSql.Append("'"+PharmaCologyObj.OperatorName+"',"); + strSql.Append("'"+PharmaCologyObj.OperateDate+"'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + + } + + public static void Update(PharmaCology PharmaCologyObj) + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("update PharmaCology set "); + strSql.Append("Name='"+PharmaCologyObj.Name+"',"); + strSql.Append("HelpCode='"+PharmaCologyObj.HelpCode+"',"); + strSql.Append("IsValid="+PharmaCologyObj.IsValid+","); + strSql.Append("OperatorNo='"+PharmaCologyObj.OperatorNo+"',"); + strSql.Append("OperatorName='"+PharmaCologyObj.OperatorName+"',"); + strSql.Append("OperateDate='"+PharmaCologyObj.OperateDate+"'"); + strSql.Append(" where Id="+PharmaCologyObj.Id+" "); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static PharmaCology GetModel(int Id) + { + PharmaCology PharmaCologyObj = new PharmaCology(); + StringBuilder strSql=new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from PharmaCology "); + strSql.Append(" where Id="+Id+"" ); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if(ds.Tables[0].Rows.Count>0) + { + if(ds.Tables[0].Rows[0]["Id"].ToString()!="") + { + PharmaCologyObj.Id=int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + PharmaCologyObj.Name=ds.Tables[0].Rows[0]["Name"].ToString(); + PharmaCologyObj.HelpCode=ds.Tables[0].Rows[0]["HelpCode"].ToString(); + if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") + { + PharmaCologyObj.IsValid=int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + PharmaCologyObj.OperatorNo=ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + PharmaCologyObj.OperatorName=ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") + { + PharmaCologyObj.OperateDate=DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return PharmaCologyObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql=new StringBuilder(); + strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM PharmaCology "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DPhysioData.cs b/AIMSEntity/DAL/Extension/DPhysioData.cs deleted file mode 100644 index ba43275..0000000 --- a/AIMSEntity/DAL/Extension/DPhysioData.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using System.Collections.Generic; -using AIMSModel; -using AIMSObjectQuery; -namespace AIMSDAL -{ - internal partial class DPhysioData - { - } -} diff --git a/AIMSEntity/DAL/Extension/DPhysioDataConfig.cs b/AIMSEntity/DAL/Extension/DPhysioDataConfig.cs deleted file mode 100644 index 94ea11a..0000000 --- a/AIMSEntity/DAL/Extension/DPhysioDataConfig.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using System.Collections.Generic; -using AIMSModel; -using AIMSObjectQuery; -namespace AIMSDAL -{ - internal partial class DPhysioDataConfig - { - } -} diff --git a/AIMSEntity/DAL/Extension/DPrintTemplate.cs b/AIMSEntity/DAL/Extension/DPrintTemplate.cs deleted file mode 100644 index f059693..0000000 --- a/AIMSEntity/DAL/Extension/DPrintTemplate.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using System.Collections.Generic; -using AIMSModel; -using AIMSObjectQuery; -namespace AIMSDAL -{ - internal partial class DPrintTemplate - { - } -} diff --git a/AIMSEntity/DAL/Extension/DRole.cs b/AIMSEntity/DAL/Extension/DRole.cs index 3054e58..6bfe0c8 100644 --- a/AIMSEntity/DAL/Extension/DRole.cs +++ b/AIMSEntity/DAL/Extension/DRole.cs @@ -5,9 +5,72 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DRole { + public static void Add(Role RoleObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [Role]("); + strSql.Append("RoleName,PermissionLevel,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + RoleObj.RoleName + "',"); + strSql.Append("'" + RoleObj.PermissionLevel + "',"); + strSql.Append("'" + RoleObj.IsValid + "',"); + strSql.Append("'" + RoleObj.OperatorNo + "',"); + strSql.Append("'" + RoleObj.OperatorName + "',"); + strSql.Append("'" + RoleObj.OperateDate + "'"); + strSql.Append(")"); + + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static Role GetModel(int Id) + { + Role RoleObj = new Role(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,RoleName,PermissionLevel,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from Role "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + RoleObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + RoleObj.RoleName = ds.Tables[0].Rows[0]["RoleName"].ToString(); + if (ds.Tables[0].Rows[0]["PermissionLevel"].ToString() != "") + { + RoleObj.PermissionLevel = int.Parse(ds.Tables[0].Rows[0]["PermissionLevel"].ToString()); + } + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + RoleObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + + RoleObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + RoleObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + RoleObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return RoleObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[RoleName],[PermissionLevel],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); + strSql.Append(" FROM Role "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/DAL/Extension/DSysConfig.cs b/AIMSEntity/DAL/Extension/DSysConfig.cs index 29bf33e..f9f1061 100644 --- a/AIMSEntity/DAL/Extension/DSysConfig.cs +++ b/AIMSEntity/DAL/Extension/DSysConfig.cs @@ -5,9 +5,85 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DSysConfig { + public static bool IsExit(string Name) + { + + string strSql = "select * from SysConfig where name ='" + Name + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + + if (dt.Rows.Count > 0) + { + return true; + } + else + { + return false; + } + } + + public static void Add(SysConfig SysConfigObj) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [SysConfig]("); + strSql.Append("Name,Value,Note,IsValid,OperatorNo,OperatorName,OperateDate"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("'" + SysConfigObj.Name + "',"); + strSql.Append("'" + SysConfigObj.Value + "',"); + strSql.Append("'" + SysConfigObj.Note + "',"); + strSql.Append("" + SysConfigObj.IsValid + ","); + strSql.Append("'" + SysConfigObj.OperatorNo + "',"); + strSql.Append("'" + SysConfigObj.OperatorName + "',"); + strSql.Append("'" + SysConfigObj.OperateDate + "'"); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static SysConfig GetModel(int Id) + { + SysConfig SysConfigObj = new SysConfig(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,Name,Value,Note,IsValid,OperatorNo,OperatorName,OperateDate "); + strSql.Append(" from SysConfig "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + SysConfigObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + SysConfigObj.Value = ds.Tables[0].Rows[0]["Value"].ToString(); + SysConfigObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); + SysConfigObj.Note = ds.Tables[0].Rows[0]["Note"].ToString(); + if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") + { + SysConfigObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); + } + SysConfigObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); + SysConfigObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); + if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") + { + SysConfigObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); + } + } + return SysConfigObj; + } + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id], [Name],Value,Note,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); + strSql.Append(" FROM SysConfig "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } } } diff --git a/AIMSEntity/OldEntity/DAL/DUseDrugsReportService.cs b/AIMSEntity/DAL/Extension/DUseDrugsReportService.cs similarity index 100% rename from AIMSEntity/OldEntity/DAL/DUseDrugsReportService.cs rename to AIMSEntity/DAL/Extension/DUseDrugsReportService.cs diff --git a/AIMSEntity/DAL/Extension/DUserPurview.cs b/AIMSEntity/DAL/Extension/DUserPurview.cs index 886d15f..983e60a 100644 --- a/AIMSEntity/DAL/Extension/DUserPurview.cs +++ b/AIMSEntity/DAL/Extension/DUserPurview.cs @@ -5,9 +5,84 @@ using System.Collections; using System.Collections.Generic; using AIMSModel; using AIMSObjectQuery; +using System.Reflection; +using System.Text; + namespace AIMSDAL { internal partial class DUserPurview { + public static void Add(UserPurview UserPurview) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("insert into [UserPurview]("); + strSql.Append("MenuId,RoleId"); + strSql.Append(")"); + strSql.Append(" values ("); + strSql.Append("" + UserPurview.MenuId + ","); + strSql.Append("" + UserPurview.RoleId + ""); + strSql.Append(")"); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static void Delete(int RoleId) + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("delete UserPurview "); + strSql.Append(" where RoleId=" + RoleId + ""); + HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); + } + + public static UserPurview GetModel(int Id) + { + UserPurview UserPurviewObj = new UserPurview(); + StringBuilder strSql = new StringBuilder(); + strSql.Append("select "); + strSql.Append("Id,MenuId,RoleId "); + strSql.Append(" from UserPurview "); + strSql.Append(" where Id=" + Id + ""); + DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); + if (ds.Tables[0].Rows.Count > 0) + { + if (ds.Tables[0].Rows[0]["Id"].ToString() != "") + { + UserPurviewObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); + } + if (ds.Tables[0].Rows[0]["MenuId"].ToString() != "") + { + UserPurviewObj.MenuId = int.Parse(ds.Tables[0].Rows[0]["MenuId"].ToString()); + } + if (ds.Tables[0].Rows[0]["RoleId"].ToString() != "") + { + UserPurviewObj.RoleId = int.Parse(ds.Tables[0].Rows[0]["RoleId"].ToString()); + } + } + return UserPurviewObj; + } + + public static DataTable GetDataTable() + { + StringBuilder strSql = new StringBuilder(); + strSql.Append("select [Id],[MenuId],[RoleId] "); + strSql.Append(" FROM UserPurview "); + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + + } + + public static List GetPurviewListByRoleId(int RoleId) + { + List PurviewTemp = new List(); + string strSql = "SELECT * FROM UserPurview WHERE roleId='" + RoleId + "'"; + + DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); + if (dt.Rows.Count > 0) + { + for (int i = 0; i < dt.Rows.Count; i++) + { + PurviewTemp.Add(dt.Rows[i]["MenuId"].ToString()); + } + } + return PurviewTemp; + } } } diff --git a/AIMSEntity/DAL/Extension/DUserTempPurview.cs b/AIMSEntity/DAL/Extension/DUserTempPurview.cs deleted file mode 100644 index e585514..0000000 --- a/AIMSEntity/DAL/Extension/DUserTempPurview.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Data; -using System.Data.SqlClient; -using System.Collections; -using System.Collections.Generic; -using AIMSModel; -using AIMSObjectQuery; -namespace AIMSDAL -{ - internal partial class DUserTempPurview - { - } -} diff --git a/AIMSEntity/Extensions/BOperationReview.cs b/AIMSEntity/Extensions/BOperationReview.cs new file mode 100644 index 0000000..385204a --- /dev/null +++ b/AIMSEntity/Extensions/BOperationReview.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; +namespace AIMSBLL +{ + public class BOperationReview + { + public static DataTable GetOperationReviewDataTable(string MdrecNo, string PatientName, string OperationBeginTime, string OperationEndTime) + { + string strSql = " SELECT of1.PatientId, of1.ApplyId, of1.MdrecNo, of1.ArchivesNo, of1.PatientName,of1.ApplyDepName, of1.PatientKind," + + " of1.Sex, of1.BirthDay, of1.Height, of1.[Weight], of1.BloodType," + + " of1.RHBloodType, of1.Illdistrict, of1.SickBed, of1.OperationType," + + " of1.[State],od.DiagnoseInfoName, od.OperationInfoName," + + " od.OperationBeginTime,od.OperationEndTime," + + " od.AnaesthesiaMethodName, od.OperationCutTypeName," + + " od.OperationBodyPositionName, od.OperationPositionName," + + " od.OperationDoctor, od.Assistant, od.AnesthesiaDoctor," + + " od.Nurse, od.Remarks,of1.MedicalRecord,of1.MedicalRecordTime FROM V_OperationDoing od" + + " LEFT JOIN V_OperationFront of1 ON of1.PatientId = od.PatientId WHERE (of1.MdrecNo ='" + MdrecNo + "' OR of1.PatientName LIKE '" + PatientName + "%')" + + " AND od.OperationBeginTime >='" + OperationBeginTime + "' AND od.OperationBeginTime <'" + OperationEndTime + "' AND " + + " od.[State] IN ('手术结束','麻醉恢复结束')"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + } +} diff --git a/AIMSEntity/Connection.cs b/AIMSEntity/Extensions/Connection.cs similarity index 100% rename from AIMSEntity/Connection.cs rename to AIMSEntity/Extensions/Connection.cs diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/DeviceCacheData.cs b/AIMSEntity/Extensions/DeviceCacheData.cs similarity index 98% rename from AIMS/OperationDoing/AnasRecordBill/Model/DeviceCacheData.cs rename to AIMSEntity/Extensions/DeviceCacheData.cs index 8bf5ded..a34a619 100644 --- a/AIMS/OperationDoing/AnasRecordBill/Model/DeviceCacheData.cs +++ b/AIMSEntity/Extensions/DeviceCacheData.cs @@ -5,7 +5,7 @@ using System.Collections; using System.Collections.Generic; using System.Data.SqlClient; -namespace AIMS.OperationDoing.AnasRecordBill.UI +namespace AIMSModel { [Serializable] public partial class DeviceCacheData diff --git a/AIMSEntity/Model/ParameterList.cs b/AIMSEntity/Extensions/ParameterList.cs similarity index 100% rename from AIMSEntity/Model/ParameterList.cs rename to AIMSEntity/Extensions/ParameterList.cs diff --git a/AIMSEntity/Extensions/SelectPatient.cs b/AIMSEntity/Extensions/SelectPatient.cs new file mode 100644 index 0000000..1ab63cc --- /dev/null +++ b/AIMSEntity/Extensions/SelectPatient.cs @@ -0,0 +1,213 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; +using AIMSModel; +using DrawGraph; +using AIMSDAL; + +namespace AIMSBLL +{ + public class SelectPatient + { + public static DataTable GetSelectPatientDataTable(DateTime BeginDate) + { + string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + + "of1.ApplyOperationInfoName, of1.OperationDoctor, " + + "of1.AnesthesiaDoctor,of1.OperationRoomId " + + "FROM V_OperationFront of1 WHERE of1.State in('已排程','已访视') and of1.PlanOperationTime>='" + BeginDate + "' AND of1.PlanOperationTime<'" + BeginDate.AddDays(1) + "'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetSelectPatientDataTable(DateTime BeginDate, string Room) + { + string strSql = "SELECT of1.ApplyId Id, of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + + "of1.ApplyOperationInfoName, of1.OperationDoctor, " + + "of1.AnesthesiaDoctor,of1.OperationRoomId , of1.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of1.PlanOperationTime,of1.InstrumentNurse,of1.TourNurse,of1.ApplyDiagnoseInfoName,of1.OperationRoom " + + "FROM V_OperationFront of1 WHERE of1.State in('已审核','预排程','已排程','已访视') and of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + BeginDate.AddDays(1) + "'"; + if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate) + { + string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of1.ApplyOperationInfoName, of1.OperationDoctor, of1.AnesthesiaDoctor,of1.OperationRoomId,of2.State FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '手术中','手术结束') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetRelieveLockingPatientDataTable(DateTime BeginDate, string Room) + { + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '手术中','手术结束') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1"; + if (Room != "" && Room != "-1") strSql += " and of1.OperationRoomId='" + Room + "'"; + strSql += " order by [StateId] asc"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetRecoverPatientDataTable(DateTime BeginDate) + { + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.OutRoomTime PlanOperationTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of1.State in( '手术结束') and of2.OutRoomTime >= '" + BeginDate + "' AND of2.OutRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=1 and of2.Id not in (select iD from OperationRecord where RecoverId<>1)"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetSelectPatientDataTable(DateTime BeginDate, DateTime EndDate, bool isLoginPerson, string person, bool isEnOpe) + { + string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + + "of1.ApplyOperationInfoName, of1.OperationDoctor, of1.State ," + + "of1.AnesthesiaDoctor,of1.OperationRoomId,of1.InstrumentNurse,of1.TourNurse " + + "FROM V_OperationFront of1 WHERE of1.OrderOperationTime>='" + BeginDate + "' AND of1.OrderOperationTime<'" + EndDate + "' "; + if (isLoginPerson == true) strSql += " and AnesthesiaDoctor like '%" + person + "%'"; + if (isEnOpe == true) strSql += " and state ='手术结束'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetSelectPatientChart() + { + string strSql = "select CONVERT(nvarchar(7), InRoomTime,120) dat, SUM(ROUND((DATEDIFF(minute, OperationBeginTime, OperationEndTime)) / CONVERT(FLOAT, 60), 1)) AS DiffDate from V_OperationDoing group by CONVERT(nvarchar(7), InRoomTime, 120)"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + public static DataTable GetSelectPatientChart2() + { + string strSql = "select CONVERT(nvarchar(7), InRoomTime,120) dat,COUNT(*) con from V_OperationDoing group by CONVERT(nvarchar(7), InRoomTime,120) "; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetRecoverSelectPatientDataTable(DateTime BeginDate) + { + string strSql = "SELECT of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, " + + "or2.OperationInfoName AS ApplyOperationInfoName,or2.OperationDoctor,or2.AnesthesiaDoctor,of1.OperationRoomId " + + "FROM V_OperationFront of1 " + + "LEFT JOIN V_OperationDoing or2 ON or2.PatientId =of1.PatientId " + + "WHERE of1.State ='手术结束' and or2.InRoomTime>='" + BeginDate + "' AND or2.InRoomTime<'" + BeginDate.AddDays(1) + "'"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + public static DataTable GetRecoverLockingPatientDataTable(DateTime BeginDate) + { + string strSql = "SELECT of2.Id,of1.PatientId, of1.ApplyId, of1.ApplyDepName, of1.OperationType, of1.MdrecNo, of1.PatientName, of2.OperationInfoNames ApplyOperationInfoName, of2.OperationDoctor, of2.AnesthesiaDoctor,of2.OperationRoomId,of2.State ,of1.Sex,[dbo].[funGetAge](of1.BirthDay,getdate()) age,of2.InRoomTime,of2.Nurse InstrumentNurse,of2.Nurse2 TourNurse,of2.DiagnoseInfoName ApplyDiagnoseInfoName ,of2.OperationRoom,(select OutRoomTime from OperationRecord where OperationRecord.RecoverId=1 and OperationRecord.PatientId=of2.PatientId) OutRoomTime FROM V_OperationDoing of2 left join[dbo].[V_OperationFront] of1 on of1.PatientId = of2.PatientId WHERE of2.State in( '麻醉恢复中') and of2.InRoomTime >= '" + BeginDate + "' AND of2.InRoomTime<'" + BeginDate.AddDays(1) + "' and RecoverId=2 "; + strSql += " order by [StateId] asc"; + return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); + } + + + public static void UpdateApplyState(int PatientId, int ApplyId) + { + try + { + HelperDB.DbHelperSQL.BeginTrans(); + BOperationApply.UpdateApplyState(ApplyId, 6); //修改状态为手术中 + + //手术诊断 + List ApplyDiagnoseIdList = BApplyDiagnoseInfo.GetApplyDiagnoseIdList(ApplyId); + for (int i = 0; i < ApplyDiagnoseIdList.Count; i++) + { + FactDiagnoseInfo FactDiagnoseInfoObj = new FactDiagnoseInfo(); + FactDiagnoseInfoObj.PatientId = PatientId; + FactDiagnoseInfoObj.ApplyId = ApplyId; + FactDiagnoseInfoObj.DiagnoseId = ApplyDiagnoseIdList[i]; + FactDiagnoseInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactDiagnoseInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactDiagnoseInfoObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + BFactDiagnoseInfo.Add(FactDiagnoseInfoObj); + } + //实施手术 + List ApplyOperationInfoList = BApplyOperationInfo.GetApplyOperationIdList(ApplyId); + for (int i = 0; i < ApplyOperationInfoList.Count; i++) + { + FactOperationInfo FactOperationInfoObj = new FactOperationInfo(); + FactOperationInfoObj.PatientId = PatientId; + FactOperationInfoObj.ApplyId = ApplyId; + FactOperationInfoObj.OperationId = ApplyOperationInfoList[i].OperationId.Value; + FactOperationInfoObj.OperationName = ApplyOperationInfoList[i].OperationName; + FactOperationInfoObj.LeftRemark = ApplyOperationInfoList[i].LeftRemark; + FactOperationInfoObj.RightRemark = ApplyOperationInfoList[i].RightRemark; + FactOperationInfoObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactOperationInfoObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactOperationInfoObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + BFactOperationInfo.Add(FactOperationInfoObj); + } + //实施麻醉 + List ApplyAnaesthesiaMethodList = BApplyAnaesthesiaMethod.GetApplyAnaesthesiaMethodList(ApplyId); + for (int i = 0; i < ApplyAnaesthesiaMethodList.Count; i++) + { + FactAnaesthesiaMethod FactAnaesthesiaMethodObj = new FactAnaesthesiaMethod(); + FactAnaesthesiaMethodObj.PatientId = PatientId; + FactAnaesthesiaMethodObj.ApplyId = ApplyId; + FactAnaesthesiaMethodObj.AnaesthesiaMethodId = ApplyAnaesthesiaMethodList[i]; + FactAnaesthesiaMethodObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactAnaesthesiaMethodObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactAnaesthesiaMethodObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + BFactAnaesthesiaMethod.Add(FactAnaesthesiaMethodObj); + } + + //手术部位 + List ApplyOperationPositionList = BApplyOperationPosition.GetApplyOperationPositionIdList(ApplyId); + for (int i = 0; i < ApplyOperationPositionList.Count; i++) + { + FactOperationPosition FactOperationPositionObj = new FactOperationPosition(); + FactOperationPositionObj.PatientId = PatientId; + FactOperationPositionObj.ApplyId = ApplyId; + FactOperationPositionObj.OperationPositionId = ApplyOperationPositionList[i]; + FactOperationPositionObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactOperationPositionObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactOperationPositionObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + BFactOperationPosition.Add(FactOperationPositionObj); + } + + //手术切口 + List ApplyOperationCutTypeList = BApplyOperationCutType.GetApplyOperationCutTypeIdList(ApplyId); + for (int i = 0; i < ApplyOperationCutTypeList.Count; i++) + { + FactOperationCutType FactOperationCutTypeObj = new FactOperationCutType(); + FactOperationCutTypeObj.PatientId = PatientId; + FactOperationCutTypeObj.ApplyId = ApplyId; + FactOperationCutTypeObj.OperationCutTypeId = ApplyOperationCutTypeList[i]; + FactOperationCutTypeObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactOperationCutTypeObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactOperationCutTypeObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + BFactOperationCutType.Add(FactOperationCutTypeObj); + } + //医生信息 + + DataTable dt = BApplyPersonDuty.GetPersonDataTable(ApplyId); + for (int i = 0; i < dt.Rows.Count; i++) + { + FactPersonDuty FactPersonDutyObj = new FactPersonDuty(); + FactPersonDutyObj.PatientId = PatientId; + FactPersonDutyObj.ApplyId = ApplyId; + FactPersonDutyObj.PersonDutyId = int.Parse(dt.Rows[i]["PersonDutyId"].ToString()); + FactPersonDutyObj.PersonId = int.Parse(dt.Rows[i]["PersonId"].ToString()); + FactPersonDutyObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactPersonDutyObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactPersonDutyObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + BFactPersonDuty.Add(FactPersonDutyObj); + } + + //增加入室事件 + Events EventsObj = BEvents.GetModelByName("入室"); + + if (EventsObj.Name != null) + { + FactEvents FactEventsObj = new FactEvents(); + FactEventsObj.EventId = EventsObj.Id; + FactEventsObj.EventTypeId = 1; + FactEventsObj.EventBeginTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:00")); + FactEventsObj.EventEndTime = FactEventsObj.EventBeginTime; + FactEventsObj.IsContinue = 0; + FactEventsObj.PatientId = PatientId; + FactEventsObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; + FactEventsObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; + FactEventsObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); + + BFactEvents.Add(FactEventsObj); + } + + + + HelperDB.DbHelperSQL.CommitTrans(); + + } + catch + { + HelperDB.DbHelperSQL.RollbackTrans(); + } + } + } +} diff --git a/AIMS/OperationDoing/AnasRecordBill/Model/TitleTime.cs b/AIMSEntity/Extensions/TitleTime.cs similarity index 97% rename from AIMS/OperationDoing/AnasRecordBill/Model/TitleTime.cs rename to AIMSEntity/Extensions/TitleTime.cs index 7a9e73b..2d5c3b8 100644 --- a/AIMS/OperationDoing/AnasRecordBill/Model/TitleTime.cs +++ b/AIMSEntity/Extensions/TitleTime.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -namespace AIMS.OperationDoing.AnasRecordBill.Model +namespace AIMSModel { public class TitleTime { diff --git a/AIMSEntity/Model/AutoGenerate/FactOperationInfo.cs b/AIMSEntity/Model/AutoGenerate/FactOperationInfo.cs index c9a9999..9053324 100644 --- a/AIMSEntity/Model/AutoGenerate/FactOperationInfo.cs +++ b/AIMSEntity/Model/AutoGenerate/FactOperationInfo.cs @@ -15,6 +15,9 @@ namespace AIMSModel private string operatorNo; private string operatorName; private DateTime? operateDate; + private string operationName; + private string leftRemark; + private string rightRemark; /// @@ -73,5 +76,29 @@ namespace AIMSModel get{ return operateDate; } set{ operateDate=value; } } + /// + /// + /// + public string OperationName + { + get{ return operationName; } + set{ operationName=value; } + } + /// + /// + /// + public string LeftRemark + { + get{ return leftRemark; } + set{ leftRemark=value; } + } + /// + /// + /// + public string RightRemark + { + get{ return rightRemark; } + set{ rightRemark=value; } + } } } diff --git a/AIMSEntity/OldEntity/Model/InstrumentRegistration.cs b/AIMSEntity/Model/AutoGenerate/InstrumentRegistration.cs similarity index 100% rename from AIMSEntity/OldEntity/Model/InstrumentRegistration.cs rename to AIMSEntity/Model/AutoGenerate/InstrumentRegistration.cs diff --git a/AIMSEntity/OldEntity/Model/NoticeContent.cs b/AIMSEntity/Model/AutoGenerate/NoticeContent.cs similarity index 100% rename from AIMSEntity/OldEntity/Model/NoticeContent.cs rename to AIMSEntity/Model/AutoGenerate/NoticeContent.cs diff --git a/AIMSEntity/OldEntity/Model/NoticeTemplate.cs b/AIMSEntity/Model/AutoGenerate/NoticeTemplate.cs similarity index 100% rename from AIMSEntity/OldEntity/Model/NoticeTemplate.cs rename to AIMSEntity/Model/AutoGenerate/NoticeTemplate.cs diff --git a/AIMSEntity/Model/AutoGenerate/OperationTemplate.cs b/AIMSEntity/Model/AutoGenerate/OperationTemplate.cs index a0c1faa..18e3ced 100644 --- a/AIMSEntity/Model/AutoGenerate/OperationTemplate.cs +++ b/AIMSEntity/Model/AutoGenerate/OperationTemplate.cs @@ -5,145 +5,199 @@ using AIMSDAL; namespace AIMSModel { - [Serializable] + [Serializable] public partial class OperationTemplate - { - private int? id; - private string templateName; - private int? typeId; - private string itemKindName; - private DateTime? inRoomTime; - private int? itemId; - private DateTime? beginTime; - private DateTime? endTime; - private Decimal? value; - private string dosageUnit; - private string drugChannel; - private string giveDrugType; - private string operatorNo; - private string operatorName; - private DateTime? operateDate; - - - /// + { + private int? id; + private string templateName; + private int? typeId; + private string itemKindName; + private DateTime? inRoomTime; + private int? itemId; + private DateTime? beginTime; + private DateTime? endTime; + private Decimal? value; + private string dosageUnit; + private string drugChannel; + private string giveDrugType; + private string operatorNo; + private string operatorName; + private DateTime? operateDate; + private int? isPublic; + private string spare1; + private string spare2; + private string spare3; + private string spare4; + private string spare5; + + + /// /// /// - public int? Id - { - get { return id; } - set { id = value; } - } - /// + public int? Id + { + get{ return id; } + set{ id=value; } + } + /// /// /// - public string TemplateName - { - get { return templateName; } - set { templateName = value; } - } - /// + public string TemplateName + { + get{ return templateName; } + set{ templateName=value; } + } + /// /// /// - public int? TypeId - { - get { return typeId; } - set { typeId = value; } - } - /// + public int? TypeId + { + get{ return typeId; } + set{ typeId=value; } + } + /// /// /// - public string ItemKindName - { - get { return itemKindName; } - set { itemKindName = value; } - } - /// + public string ItemKindName + { + get{ return itemKindName; } + set{ itemKindName=value; } + } + /// /// /// - public DateTime? InRoomTime - { - get { return inRoomTime; } - set { inRoomTime = value; } - } - /// + public DateTime? InRoomTime + { + get{ return inRoomTime; } + set{ inRoomTime=value; } + } + /// /// /// - public int? ItemId - { - get { return itemId; } - set { itemId = value; } - } - /// + public int? ItemId + { + get{ return itemId; } + set{ itemId=value; } + } + /// /// /// - public DateTime? BeginTime - { - get { return beginTime; } - set { beginTime = value; } - } - /// + public DateTime? BeginTime + { + get{ return beginTime; } + set{ beginTime=value; } + } + /// /// /// - public DateTime? EndTime - { - get { return endTime; } - set { endTime = value; } - } - /// + public DateTime? EndTime + { + get{ return endTime; } + set{ endTime=value; } + } + /// /// /// - public Decimal? Value - { - get { return value; } - set { this.value = value; } - } - /// + public Decimal? Value + { + get{ return value; } + set{ value=value; } + } + /// /// /// - public string DosageUnit - { - get { return dosageUnit; } - set { dosageUnit = value; } - } - /// + public string DosageUnit + { + get{ return dosageUnit; } + set{ dosageUnit=value; } + } + /// /// /// - public string DrugChannel - { - get { return drugChannel; } - set { drugChannel = value; } - } - /// + public string DrugChannel + { + get{ return drugChannel; } + set{ drugChannel=value; } + } + /// /// /// - public string GiveDrugType - { - get { return giveDrugType; } - set { giveDrugType = value; } - } - /// + public string GiveDrugType + { + get{ return giveDrugType; } + set{ giveDrugType=value; } + } + /// /// /// - public string OperatorNo - { - get { return operatorNo; } - set { operatorNo = value; } - } - /// + public string OperatorNo + { + get{ return operatorNo; } + set{ operatorNo=value; } + } + /// /// /// - public string OperatorName - { - get { return operatorName; } - set { operatorName = value; } - } - /// + public string OperatorName + { + get{ return operatorName; } + set{ operatorName=value; } + } + /// /// /// - public DateTime? OperateDate - { - get { return operateDate; } - set { operateDate = value; } - } - } + public DateTime? OperateDate + { + get{ return operateDate; } + set{ operateDate=value; } + } + /// + /// + /// + public int? IsPublic + { + get{ return isPublic; } + set{ isPublic=value; } + } + /// + /// + /// + public string Spare1 + { + get{ return spare1; } + set{ spare1=value; } + } + /// + /// + /// + public string Spare2 + { + get{ return spare2; } + set{ spare2=value; } + } + /// + /// + /// + public string Spare3 + { + get{ return spare3; } + set{ spare3=value; } + } + /// + /// + /// + public string Spare4 + { + get{ return spare4; } + set{ spare4=value; } + } + /// + /// + /// + public string Spare5 + { + get{ return spare5; } + set{ spare5=value; } + } + } } diff --git a/AIMSEntity/Model/AutoGenerate/PhysioData.cs b/AIMSEntity/Model/AutoGenerate/PhysioData.cs deleted file mode 100644 index f171052..0000000 --- a/AIMSEntity/Model/AutoGenerate/PhysioData.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; - -namespace AIMSModel -{ - [Serializable] - public partial class PhysioData - { - private int? id; - private int? patientId; - private int? physioDataType; - private int? physioDataConfigId; - private DateTime? recordTime; - private Decimal? value; - private int? isValid; - private string operatorNo; - private string operatorName; - private DateTime? operateDate; - - - /// - /// - /// - public int? Id - { - get{ return id; } - set{ id=value; } - } - /// - /// - /// - public int? PatientId - { - get{ return patientId; } - set{ patientId=value; } - } - /// - /// - /// - public int? PhysioDataType - { - get{ return physioDataType; } - set{ physioDataType=value; } - } - /// - /// - /// - public int? PhysioDataConfigId - { - get{ return physioDataConfigId; } - set{ physioDataConfigId=value; } - } - /// - /// - /// - public DateTime? RecordTime - { - get{ return recordTime; } - set{ recordTime=value; } - } - /// - /// - /// - public Decimal? Value - { - get{ return value; } - set{ this.value=value; } - } - /// - /// - /// - public int? IsValid - { - get{ return isValid; } - set{ isValid=value; } - } - /// - /// - /// - public string OperatorNo - { - get{ return operatorNo; } - set{ operatorNo=value; } - } - /// - /// - /// - public string OperatorName - { - get{ return operatorName; } - set{ operatorName=value; } - } - /// - /// - /// - public DateTime? OperateDate - { - get{ return operateDate; } - set{ operateDate=value; } - } - } -} diff --git a/AIMSEntity/Model/AutoGenerate/PhysioDataConfig.cs b/AIMSEntity/Model/AutoGenerate/PhysioDataConfig.cs deleted file mode 100644 index 17a5204..0000000 --- a/AIMSEntity/Model/AutoGenerate/PhysioDataConfig.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; - -namespace AIMSModel -{ - [Serializable] - public partial class PhysioDataConfig - { - private int? id; - private string name; - private string enname; - private string color; - private string imgPath; - private Decimal? decHighLimit; - private Decimal? decLowLimit; - private int? isValid; - private string operatorNo; - private string operatorName; - private DateTime? operateDate; - - - /// - /// - /// - public int? Id - { - get{ return id; } - set{ id=value; } - } - /// - /// - /// - public string Name - { - get{ return name; } - set{ name=value; } - } - /// - /// - /// - public string Enname - { - get{ return enname; } - set{ enname=value; } - } - /// - /// - /// - public string Color - { - get{ return color; } - set{ color=value; } - } - /// - /// - /// - public string ImgPath - { - get{ return imgPath; } - set{ imgPath=value; } - } - /// - /// - /// - public Decimal? DecHighLimit - { - get{ return decHighLimit; } - set{ decHighLimit=value; } - } - /// - /// - /// - public Decimal? DecLowLimit - { - get{ return decLowLimit; } - set{ decLowLimit=value; } - } - /// - /// - /// - public int? IsValid - { - get{ return isValid; } - set{ isValid=value; } - } - /// - /// - /// - public string OperatorNo - { - get{ return operatorNo; } - set{ operatorNo=value; } - } - /// - /// - /// - public string OperatorName - { - get{ return operatorName; } - set{ operatorName=value; } - } - /// - /// - /// - public DateTime? OperateDate - { - get{ return operateDate; } - set{ operateDate=value; } - } - } -} diff --git a/AIMSEntity/Model/AutoGenerate/PrintTemplate.cs b/AIMSEntity/Model/AutoGenerate/PrintTemplate.cs deleted file mode 100644 index 5de460c..0000000 --- a/AIMSEntity/Model/AutoGenerate/PrintTemplate.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; - -namespace AIMSModel -{ - [Serializable] - public partial class PrintTemplate - { - private int? id; - private int? parentId; - private string xmlFileName; - private string xmlFile; - private string xmlStatic; - private int? templateOrder; - private int? isValid; - private string operatorNo; - private DateTime? operatorDate; - - - /// - /// Id - /// - public int? Id - { - get{ return id; } - set{ id=value; } - } - /// - /// 父节点Id - /// - public int? ParentId - { - get{ return parentId; } - set{ parentId=value; } - } - /// - /// 文书名 - /// - public string XmlFileName - { - get{ return xmlFileName; } - set{ xmlFileName=value; } - } - /// - /// xml文档 - /// - public string XmlFile - { - get{ return xmlFile; } - set{ xmlFile=value; } - } - /// - /// 需要统计字段 - /// - public string XmlStatic - { - get{ return xmlStatic; } - set{ xmlStatic=value; } - } - /// - /// 排序 - /// - public int? TemplateOrder - { - get{ return templateOrder; } - set{ templateOrder=value; } - } - /// - /// 有效性 - /// - public int? IsValid - { - get{ return isValid; } - set{ isValid=value; } - } - /// - /// 操作人工号 - /// - public string OperatorNo - { - get{ return operatorNo; } - set{ operatorNo=value; } - } - /// - /// 操作日期 - /// - public DateTime? OperatorDate - { - get{ return operatorDate; } - set{ operatorDate=value; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/UseDrugsReport.cs b/AIMSEntity/Model/AutoGenerate/UseDrugsReport.cs similarity index 100% rename from AIMSEntity/OldEntity/Model/UseDrugsReport.cs rename to AIMSEntity/Model/AutoGenerate/UseDrugsReport.cs diff --git a/AIMSEntity/Model/AutoGenerate/UserTempPurview.cs b/AIMSEntity/Model/AutoGenerate/UserTempPurview.cs deleted file mode 100644 index 17b3029..0000000 --- a/AIMSEntity/Model/AutoGenerate/UserTempPurview.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; - -namespace AIMSModel -{ - [Serializable] - public partial class UserTempPurview - { - private int? id; - private int? templateId; - private int? roleId; - - - /// - /// Id - /// - public int? Id - { - get{ return id; } - set{ id=value; } - } - /// - /// 模板Id - /// - public int? TemplateId - { - get{ return templateId; } - set{ templateId=value; } - } - /// - /// 角色Id - /// - public int? RoleId - { - get{ return roleId; } - set{ roleId=value; } - } - } -} diff --git a/AIMSEntity/Model/Extension/BasicDictionary.cs b/AIMSEntity/Model/Extension/BasicDictionary.cs index 8c0b1bb..c671025 100644 --- a/AIMSEntity/Model/Extension/BasicDictionary.cs +++ b/AIMSEntity/Model/Extension/BasicDictionary.cs @@ -6,5 +6,7 @@ namespace AIMSModel { public partial class BasicDictionary { + public List Children { get; set; } + } } diff --git a/AIMSEntity/Model/Extension/Menu.cs b/AIMSEntity/Model/Extension/Menu.cs index 64a051a..d2a7fea 100644 --- a/AIMSEntity/Model/Extension/Menu.cs +++ b/AIMSEntity/Model/Extension/Menu.cs @@ -6,5 +6,7 @@ namespace AIMSModel { public partial class Menu { + + public List Children = new List(); } } diff --git a/AIMSEntity/Model/Extension/PhysioData.cs b/AIMSEntity/Model/Extension/PhysioData.cs deleted file mode 100644 index fd7f8be..0000000 --- a/AIMSEntity/Model/Extension/PhysioData.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; -namespace AIMSModel -{ - public partial class PhysioData - { - } -} diff --git a/AIMSEntity/Model/Extension/PhysioDataConfig.cs b/AIMSEntity/Model/Extension/PhysioDataConfig.cs deleted file mode 100644 index e721869..0000000 --- a/AIMSEntity/Model/Extension/PhysioDataConfig.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; -namespace AIMSModel -{ - public partial class PhysioDataConfig - { - } -} diff --git a/AIMSEntity/Model/Extension/PrintTemplate.cs b/AIMSEntity/Model/Extension/PrintTemplate.cs deleted file mode 100644 index 96f233f..0000000 --- a/AIMSEntity/Model/Extension/PrintTemplate.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; -namespace AIMSModel -{ - public partial class PrintTemplate - { - } -} diff --git a/AIMSEntity/Model/Extension/UserTempPurview.cs b/AIMSEntity/Model/Extension/UserTempPurview.cs deleted file mode 100644 index ce34113..0000000 --- a/AIMSEntity/Model/Extension/UserTempPurview.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using AIMSDAL; -namespace AIMSModel -{ - public partial class UserTempPurview - { - } -} diff --git a/AIMSEntity/ObjectQuery/EntityMap.cs b/AIMSEntity/ObjectQuery/EntityMap.cs index 5f58d36..db66617 100644 --- a/AIMSEntity/ObjectQuery/EntityMap.cs +++ b/AIMSEntity/ObjectQuery/EntityMap.cs @@ -63,19 +63,15 @@ namespace AIMSObjectQuery entitiesMap.Add("patientkind",new EntityInfo("PatientKind",new PatientKindMap())); entitiesMap.Add("person",new EntityInfo("Person",new PersonMap())); entitiesMap.Add("personduty",new EntityInfo("PersonDuty",new PersonDutyMap())); - entitiesMap.Add("pharmacology",new EntityInfo("PharmaCology",new PharmaCologyMap())); - entitiesMap.Add("physiodata",new EntityInfo("PhysioData",new PhysioDataMap())); - entitiesMap.Add("physiodataconfig",new EntityInfo("PhysioDataConfig",new PhysioDataConfigMap())); + entitiesMap.Add("pharmacology",new EntityInfo("PharmaCology",new PharmaCologyMap())); entitiesMap.Add("printdoc",new EntityInfo("PrintDoc",new PrintDocMap())); - entitiesMap.Add("printdocument",new EntityInfo("PrintDocument",new PrintDocumentMap())); - entitiesMap.Add("printtemplate",new EntityInfo("PrintTemplate",new PrintTemplateMap())); + entitiesMap.Add("printdocument",new EntityInfo("PrintDocument",new PrintDocumentMap())); entitiesMap.Add("programexception",new EntityInfo("ProgramException",new ProgramExceptionMap())); entitiesMap.Add("provider",new EntityInfo("Provider",new ProviderMap())); entitiesMap.Add("role",new EntityInfo("Role",new RoleMap())); entitiesMap.Add("stockpile",new EntityInfo("StockPile",new StockPileMap())); entitiesMap.Add("sysconfig",new EntityInfo("SysConfig",new SysConfigMap())); - entitiesMap.Add("userpurview",new EntityInfo("UserPurview",new UserPurviewMap())); - entitiesMap.Add("usertemppurview",new EntityInfo("UserTempPurview",new UserTempPurviewMap())); + entitiesMap.Add("userpurview",new EntityInfo("UserPurview",new UserPurviewMap())); } public static EntityInfo GetEntityInfo(string entityName) diff --git a/AIMSEntity/ObjectQuery/FactOperationInfoMap.cs b/AIMSEntity/ObjectQuery/FactOperationInfoMap.cs index b85fe14..03e6e40 100644 --- a/AIMSEntity/ObjectQuery/FactOperationInfoMap.cs +++ b/AIMSEntity/ObjectQuery/FactOperationInfoMap.cs @@ -16,6 +16,9 @@ namespace AIMSObjectQuery dictionary.Add("operatorno", "OperatorNo"); dictionary.Add("operatorname", "OperatorName"); dictionary.Add("operatedate", "OperateDate"); + dictionary.Add("operationname", "OperationName"); + dictionary.Add("leftremark", "LeftRemark"); + dictionary.Add("rightremark", "RightRemark"); } #region IMap 成员 diff --git a/AIMSEntity/ObjectQuery/OperationTemplateMap.cs b/AIMSEntity/ObjectQuery/OperationTemplateMap.cs index 7294b3c..989c4b3 100644 --- a/AIMSEntity/ObjectQuery/OperationTemplateMap.cs +++ b/AIMSEntity/ObjectQuery/OperationTemplateMap.cs @@ -24,6 +24,12 @@ namespace AIMSObjectQuery dictionary.Add("operatorno", "OperatorNo"); dictionary.Add("operatorname", "OperatorName"); dictionary.Add("operatedate", "OperateDate"); + dictionary.Add("ispublic", "IsPublic"); + dictionary.Add("spare1", "Spare1"); + dictionary.Add("spare2", "Spare2"); + dictionary.Add("spare3", "Spare3"); + dictionary.Add("spare4", "Spare4"); + dictionary.Add("spare5", "Spare5"); } #region IMap 成员 diff --git a/AIMSEntity/ObjectQuery/PhysioDataConfigMap.cs b/AIMSEntity/ObjectQuery/PhysioDataConfigMap.cs deleted file mode 100644 index 626a2c2..0000000 --- a/AIMSEntity/ObjectQuery/PhysioDataConfigMap.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSObjectQuery -{ - internal partial class PhysioDataConfigMap:IMap - { - private Dictionary dictionary = new Dictionary(); - public PhysioDataConfigMap() - { - dictionary.Add("id", "Id"); - dictionary.Add("name", "Name"); - dictionary.Add("enname", "Enname"); - dictionary.Add("color", "Color"); - dictionary.Add("imgpath", "imgPath"); - dictionary.Add("dechighlimit", "decHighLimit"); - dictionary.Add("declowlimit", "decLowLimit"); - dictionary.Add("isvalid", "IsValid"); - dictionary.Add("operatorno", "OperatorNo"); - dictionary.Add("operatorname", "OperatorName"); - dictionary.Add("operatedate", "OperateDate"); - } - - #region IMap 成员 - - public string this[string propertyName] - { - get - { - try - { - return dictionary[propertyName.ToLower()]; - } - catch (KeyNotFoundException) - { - throw new Exception(propertyName + "属性不存在"); - } - } - } - - #endregion - } -} diff --git a/AIMSEntity/ObjectQuery/PhysioDataMap.cs b/AIMSEntity/ObjectQuery/PhysioDataMap.cs deleted file mode 100644 index 83e435f..0000000 --- a/AIMSEntity/ObjectQuery/PhysioDataMap.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSObjectQuery -{ - internal partial class PhysioDataMap:IMap - { - private Dictionary dictionary = new Dictionary(); - public PhysioDataMap() - { - dictionary.Add("id", "Id"); - dictionary.Add("patientid", "PatientId"); - dictionary.Add("physiodatatype", "PhysioDataType"); - dictionary.Add("physiodataconfigid", "PhysioDataConfigId"); - dictionary.Add("recordtime", "RecordTime"); - dictionary.Add("value", "Value"); - dictionary.Add("isvalid", "IsValid"); - dictionary.Add("operatorno", "OperatorNo"); - dictionary.Add("operatorname", "OperatorName"); - dictionary.Add("operatedate", "OperateDate"); - } - - #region IMap 成员 - - public string this[string propertyName] - { - get - { - try - { - return dictionary[propertyName.ToLower()]; - } - catch (KeyNotFoundException) - { - throw new Exception(propertyName + "属性不存在"); - } - } - } - - #endregion - } -} diff --git a/AIMSEntity/ObjectQuery/PrintTemplateMap.cs b/AIMSEntity/ObjectQuery/PrintTemplateMap.cs deleted file mode 100644 index 3391435..0000000 --- a/AIMSEntity/ObjectQuery/PrintTemplateMap.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSObjectQuery -{ - internal partial class PrintTemplateMap:IMap - { - private Dictionary dictionary = new Dictionary(); - public PrintTemplateMap() - { - dictionary.Add("id", "Id"); - dictionary.Add("parentid", "ParentId"); - dictionary.Add("xmlfilename", "XmlFileName"); - dictionary.Add("xmlfile", "XmlFile"); - dictionary.Add("xmlstatic", "XmlStatic"); - dictionary.Add("templateorder", "TemplateOrder"); - dictionary.Add("isvalid", "IsValid"); - dictionary.Add("operatorno", "OperatorNo"); - dictionary.Add("operatordate", "OperatorDate"); - } - - #region IMap 成员 - - public string this[string propertyName] - { - get - { - try - { - return dictionary[propertyName.ToLower()]; - } - catch (KeyNotFoundException) - { - throw new Exception(propertyName + "属性不存在"); - } - } - } - - #endregion - } -} diff --git a/AIMSEntity/ObjectQuery/UserTempPurviewMap.cs b/AIMSEntity/ObjectQuery/UserTempPurviewMap.cs deleted file mode 100644 index fbf0e17..0000000 --- a/AIMSEntity/ObjectQuery/UserTempPurviewMap.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace AIMSObjectQuery -{ - internal partial class UserTempPurviewMap:IMap - { - private Dictionary dictionary = new Dictionary(); - public UserTempPurviewMap() - { - dictionary.Add("id", "Id"); - dictionary.Add("templateid", "TemplateId"); - dictionary.Add("roleid", "RoleId"); - } - - #region IMap 成员 - - public string this[string propertyName] - { - get - { - try - { - return dictionary[propertyName.ToLower()]; - } - catch (KeyNotFoundException) - { - throw new Exception(propertyName + "属性不存在"); - } - } - } - - #endregion - } -} diff --git a/AIMSEntity/OldEntity/BLL/AnaesthesiaMethod.cs b/AIMSEntity/OldEntity/BLL/AnaesthesiaMethod.cs deleted file mode 100644 index 87ee142..0000000 --- a/AIMSEntity/OldEntity/BLL/AnaesthesiaMethod.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class AnaesthesiaMethod - { - public static void Add(Model.AnaesthesiaMethod AnaesthesiaMethodObj) - { - try - { - new DAL.AnaesthesiaMethodDB().Add(AnaesthesiaMethodObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.AnaesthesiaMethod AnaesthesiaMethodObj) - { - try - { - new DAL.AnaesthesiaMethodDB().Update(AnaesthesiaMethodObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.AnaesthesiaMethod GetModel(int Id) - { - return new DAL.AnaesthesiaMethodDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.AnaesthesiaMethodDB().GetDataTable(strWhere); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/DataDictionary.cs b/AIMSEntity/OldEntity/BLL/DataDictionary.cs deleted file mode 100644 index 76b36aa..0000000 --- a/AIMSEntity/OldEntity/BLL/DataDictionary.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class DataDictionary //:HelperDB.DbHelperSQL - { - public static void Add(Model.BasicDictionary BasicDictionaryObj) - { - try - { - new DAL.BasicDictionaryDB().Add(BasicDictionaryObj); - MessageBox.Show("增加成功!"); - } - catch(Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.BasicDictionary BasicDictionaryObj) - { - try - { - new DAL.BasicDictionaryDB().Update(BasicDictionaryObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.BasicDictionary GetModel(int Id) - { - return new DAL.BasicDictionaryDB().GetModel(Id); - } - - public static List GetModelList(int ParentId) - { - return new DAL.BasicDictionaryDB().GetModelList(ParentId); - } - public static List GetModelParentList() - { - return new DAL.BasicDictionaryDB().GetModelParentList(); - } - - public static DataTable GetDataDictionaryDataTable(string strWhere) - { - return new DAL.BasicDictionaryDB().GetDataDictionaryDataTable(strWhere); - } - public static DataTable GetDataDictionaryDataTable(int ParentId) - { - return new DAL.BasicDictionaryDB().GetDataDictionaryDataTable(ParentId); - } - - public static DataTable GetDataDictionaryDataTableByParentName(string ParentName, string HelpCode) - { - return new DAL.BasicDictionaryDB().GetDataDictionaryDataTableByParentName(ParentName, HelpCode); - } - public static DataTable GetDataDictionaryNameAndRemark(string ParentName, string HelpCode) - { - return new DAL.BasicDictionaryDB().GetDataDictionaryNameAndRemark(ParentName, HelpCode); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Department.cs b/AIMSEntity/OldEntity/BLL/Department.cs deleted file mode 100644 index cc4149c..0000000 --- a/AIMSEntity/OldEntity/BLL/Department.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace AIMS.PublicUI.BLL -{ - public class Department - { - public static void Add(Model.Department DepartmentObj) - { - try - { - new DAL.DepartmentDB().Add(DepartmentObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.Department DepartmentObj) - { - try - { - new DAL.DepartmentDB().Update(DepartmentObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!"+ex.Message); - } - } - - public static Model.Department GetModel(int Id) - { - return new DAL.DepartmentDB().GetModel(Id); - } - public static Model.Department GetModelName(string Name) - { - return new DAL.DepartmentDB().GetModelName (Name); - } - - public static DataTable GetDepartmentDataTable(string strWhere) - { - return new DAL.DepartmentDB().GetDepartmentDataTable(strWhere); - } - public static List GetDepartmentAllList(string Kind) - { - return new DAL.DepartmentDB().GetDepartmentAllList(Kind); - } - public static List GetDepartmentAllListBYSql(string Kind) - { - return new DAL.DepartmentDB().GetDepartmentAllListBYSql(Kind); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Disease.cs b/AIMSEntity/OldEntity/BLL/Disease.cs deleted file mode 100644 index 8962ac7..0000000 --- a/AIMSEntity/OldEntity/BLL/Disease.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class Disease - { - public static bool IsExit(string Name) - { - return new DAL.DiseaseDB().IsExit(Name); - } - public static void Add(Model.Disease DiseaseObj) - { - try - { - new DAL.DiseaseDB().Add(DiseaseObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.Disease DiseaseObj) - { - - try - { - new DAL.DiseaseDB().Update(DiseaseObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.Disease GetModel(int Id) - { - return new DAL.DiseaseDB().GetModel(Id); - } - - public static DataTable GetDataTable(string HelpCode) - { - return new DAL.DiseaseDB().GetDataTable(HelpCode); - } - - public static DataTable GetDataTable() - { - return new DAL.DiseaseDB().GetDataTable(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/DosageKind.cs b/AIMSEntity/OldEntity/BLL/DosageKind.cs deleted file mode 100644 index b2a718d..0000000 --- a/AIMSEntity/OldEntity/BLL/DosageKind.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DrugManagement.BLL -{ - public class DosageKind - { - public static void Add(Model.DosageKind DosageKindObj) - { - try - { - new DAL.DosageKindDB().Add(DosageKindObj); - MessageBox.Show("增加成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.DosageKind DosageKindObj) - { - try - { - new DAL.DosageKindDB().Update(DosageKindObj); - MessageBox.Show("修改成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.DosageKind GetModel(int Id) - { - return new DAL.DosageKindDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.DosageKindDB().GetDataTable(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/DosageUnit.cs b/AIMSEntity/OldEntity/BLL/DosageUnit.cs deleted file mode 100644 index 8786041..0000000 --- a/AIMSEntity/OldEntity/BLL/DosageUnit.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using System.Data; -namespace DrugManagement.BLL -{ - public class DosageUnit - { - public static void Add(Model.DosageUnit DosageUnitObj) - { - try - { - new DAL.DosageUnitDB().Add(DosageUnitObj); - MessageBox.Show("增加成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("增加失败!"+ex.Message); - } - } - - public static void Update(Model.DosageUnit DosageUnitObj) - { - try - { - new DAL.DosageUnitDB().Update(DosageUnitObj); - MessageBox.Show("修改成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.DosageUnit GetModel(int Id) - { - return new DAL.DosageUnitDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.DosageUnitDB().GetDataTable(); - } - public static DataTable GetDataTable(int UnitType) - { - return new DAL.DosageUnitDB().GetDataTable(UnitType); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/DrugKind.cs b/AIMSEntity/OldEntity/BLL/DrugKind.cs deleted file mode 100644 index 57124c9..0000000 --- a/AIMSEntity/OldEntity/BLL/DrugKind.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DrugManagement.BLL -{ - public class DrugKind - { - public static void Add(Model.DrugKind DrugKindObj) - { - try - { - new DAL.DrugKindDB().Add(DrugKindObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.DrugKind DrugKindObj) - { - try - { - new DAL.DrugKindDB().Update(DrugKindObj); - MessageBox.Show("修改成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.DrugKind GetModel(int Id) - { - return new DAL.DrugKindDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.DrugKindDB().GetDataTable(); - } - public static List GetModelList() - { - return new DAL.DrugKindDB().GetModelList(); - } - - public static DataTable GetDataTable(string MedicalItemKindId) - { - return new DAL.DrugKindDB().GetDataTable(MedicalItemKindId); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/DrugManufacturer.cs b/AIMSEntity/OldEntity/BLL/DrugManufacturer.cs deleted file mode 100644 index 8061bca..0000000 --- a/AIMSEntity/OldEntity/BLL/DrugManufacturer.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DrugManagement.BLL -{ - public class DrugManufacturer - { - public static void Add(Model.DrugManufacturer DrugManufacturerObj) - { - try - { - new DAL.DrugManufacturerDB().Add(DrugManufacturerObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!"+ex.Message); - } - } - - public static void Update(Model.DrugManufacturer DrugManufacturerObj) - { - try - { - new DAL.DrugManufacturerDB().Update(DrugManufacturerObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show(ex.Message+ "修改失败!"); - } - } - - public static Model.DrugManufacturer GetModel(int Id) - { - return new DAL.DrugManufacturerDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.DrugManufacturerDB().GetDataTable(); - } - public static DataTable GetDataTable(string HelpCode) - { - return new DAL.DrugManufacturerDB().GetDataTable(HelpCode); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Drugs.cs b/AIMSEntity/OldEntity/BLL/Drugs.cs deleted file mode 100644 index 586f2e3..0000000 --- a/AIMSEntity/OldEntity/BLL/Drugs.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class Drugs - { - public static void Add(Model.Drugs DrugsObj) - { - try - { - new DAL.DrugsDB().Add(DrugsObj); - MessageBox.Show("药品增加成功!"); - } - catch - { - MessageBox.Show("药品增加失败!"); - } - } - public static void Update(Model.Drugs DrugsObj) - { - try - { - new DAL.DrugsDB().Update(DrugsObj); - - MessageBox.Show("药品修改成功!"); - } - catch - { - MessageBox.Show("药品修改失败!"); - } - } - - public static Model.Drugs GetModel(int Id) - { - return new DAL.DrugsDB().GetModel(Id); - } - - public static DataTable GetDataTable(string DrugKind) - { - return new DAL.DrugsDB().GetDataTable(DrugKind); - } - public static DataTable GetDosageUnitDataTable(int UnitType) - { - return new DAL.DrugsDB().GetDosageUnitDataTable(UnitType); - } - - public static DataTable GetDataTableByHelpCode(string HelpCode) - { - return new DAL.DrugsDB().GetDataTableByHelpCode(HelpCode); - } - - public static DataTable GetDrugsDataTable() - { - return new DAL.DrugsDB().GetDrugsDataTable(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Events.cs b/AIMSEntity/OldEntity/BLL/Events.cs deleted file mode 100644 index ab73070..0000000 --- a/AIMSEntity/OldEntity/BLL/Events.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.BLL -{ - public class Events - { - public static bool IsExit(string Name) - { - return new DAL.EventsDB().IsExit(Name); - } - public static void Add(Model.Events EventsObj) - { - new DAL.EventsDB().Add(EventsObj); - } - - public static void Update(Model.Events EventsObj) - { - new DAL.EventsDB().Update(EventsObj); - } - public static void UpdateUseRate(int Id) - { - new DAL.EventsDB().UpdateUseRate(Id); - } - - public static void Delete(int Id) - { - new DAL.EventsDB().Delete(Id); - } - - public static Model.Events GetModel(int Id) - { - return new DAL.EventsDB().GetModel(Id); - } - public static Model.Events GetModelByName(string Name) - { - return new DAL.EventsDB().GetModelByName(Name); - } - public static DataTable GetDataTable(string HelpCode) - { - return new DAL.EventsDB().GetDataTable(HelpCode); - } - - public static DataTable GetEventDataTable() - { - return new DAL.EventsDB().GetEventDataTable(); - } - - public static DataTable GetDataTable() - { - return new DAL.EventsDB().GetDataTable(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/MedicalDict.cs b/AIMSEntity/OldEntity/BLL/MedicalDict.cs deleted file mode 100644 index 6fb4a4e..0000000 --- a/AIMSEntity/OldEntity/BLL/MedicalDict.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DrugManagement.BLL -{ - public class MedicalDict - { - public static void Add(Model.MedicalDict MedicalDictObj) - { - try - { - new DAL.MedicalDictDB().Add(MedicalDictObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!"+ex.Message); - } - } - - public static void Update(Model.MedicalDict MedicalDictObj) - { - try - { - new DAL.MedicalDictDB().Update(MedicalDictObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" +ex.Message); - } - } - - public static Model.MedicalDict GetModel(int Id) - { - return new DAL.MedicalDictDB().GetModel(Id); - } - - public static DataTable GetDataTable(int DrugKindId) - { - return new DAL.MedicalDictDB().GetDataTable(DrugKindId); - } - public static DataTable GetDataTableByName(string Name) - { - return new DAL.MedicalDictDB().GetDataTableByName(Name); - } - - public static bool Exists(string No) - { - return new DAL.MedicalDictDB().Exists(No); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/MedicalItem.cs b/AIMSEntity/OldEntity/BLL/MedicalItem.cs deleted file mode 100644 index fc23fee..0000000 --- a/AIMSEntity/OldEntity/BLL/MedicalItem.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DrugManagement.BLL -{ - public class MedicalItem - { - public static bool Exists(string No) - { - return new DAL.MedicalItemDB().Exists(No); - } - - public static void Add(Model.MedicalItem MedicalItemObj) - { - try - { - new DAL.MedicalItemDB().Add(MedicalItemObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!"+ex.Message); - } - } - - public static void Update(Model.MedicalItem MedicalItemObj) - { - try - { - new DAL.MedicalItemDB().Update(MedicalItemObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.MedicalItem GetModel(int Id) - { - return new DAL.MedicalItemDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.MedicalItemDB().GetDataTable(); - } - public static DataTable GetMedicalItemDrugDataTable(string HelpCode, int IsValid) - { - return new DAL.MedicalItemDB().GetMedicalItemDrugDataTable(HelpCode, IsValid); - } - public static DataTable GetMedicalItemByDrugKindId(int DrugKindId) - { - return new DAL.MedicalItemDB().GetMedicalItemByDrugKindId(DrugKindId); - } - public static int GetMedicalItemByDictNo(string MedicalDictNo) - { - return new DAL.MedicalItemDB().GetMedicalItemByDictNo(MedicalDictNo); - } - - } -} diff --git a/AIMSEntity/OldEntity/BLL/MedicalItemKind.cs b/AIMSEntity/OldEntity/BLL/MedicalItemKind.cs deleted file mode 100644 index 052ac55..0000000 --- a/AIMSEntity/OldEntity/BLL/MedicalItemKind.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class MedicalItemKind - { - public static void Add(Model.MedicalItemKind MedicalItemKindObj) - { - try - { - new DAL.MedicalItemKindDB().Add(MedicalItemKindObj); - } - catch (Exception ex) - { - MessageBox.Show("增加成功!" + ex.Message); - } - } - - public static void Update(Model.MedicalItemKind MedicalItemKindObj) - { - try - { - new DAL.MedicalItemKindDB().Update(MedicalItemKindObj); - } - catch (Exception ex) - { - MessageBox.Show("修改成功!" + ex.Message); - } - } - - public static Model.MedicalItemKind GetModel(int Id) - { - return new DAL.MedicalItemKindDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.MedicalItemKindDB().GetDataTable(); - } - public static DataTable GetTreeViewDataTable() - { - return new DAL.MedicalItemKindDB().GetTreeViewDataTable(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/MedicamentPrice.cs b/AIMSEntity/OldEntity/BLL/MedicamentPrice.cs deleted file mode 100644 index eaa3169..0000000 --- a/AIMSEntity/OldEntity/BLL/MedicamentPrice.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DrugManagement.BLL -{ - public class MedicamentPrice - { - public static bool Exists(int Id) - { - return new DAL.MedicamentPriceDB().Exists(Id); - } - - public static void Add(Model.MedicamentPrice MedicamentPriceObj) - { - try - { - new DAL.MedicamentPriceDB().Add(MedicamentPriceObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static void Update(Model.MedicamentPrice MedicamentPricObj) - { - - try - { - new DAL.MedicamentPriceDB().Update(MedicamentPricObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.MedicamentPrice GetModel(int Id) - { - return new DAL.MedicamentPriceDB().GetModel(Id); - } - - - public static DataTable GetDataTable(int MedicalItemId) - { - return new DAL.MedicamentPriceDB().GetDataTable(MedicalItemId); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Menu.cs b/AIMSEntity/OldEntity/BLL/Menu.cs deleted file mode 100644 index 4feff63..0000000 --- a/AIMSEntity/OldEntity/BLL/Menu.cs +++ /dev/null @@ -1,113 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace AIMS.PublicUI.BLL -{ - public class Menu - { - public static void Add(Model.Menu MenuObj) - { - try - { - new DAL.MenuDB().Add(MenuObj); - MessageBox.Show("增加成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("增加失败!"+ex.Message); - } - - } - public static void Update(Model.Menu MenuObj) - { - try - { - new DAL.MenuDB().Update(MenuObj); - MessageBox.Show("修改成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("修改失败!"+ex.Message); - } - } - public static void Delete(int Id) - { - try - { - new DAL.MenuDB().Delete(Id); - MessageBox.Show("删除成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("删除失败!"+ex.Message); - } - } - public static Model.Menu GetModel(int Id) - { - return new DAL.MenuDB().GetModel(Id); - } - public static DataTable GetDateTable(string strWhere) - { - return new DAL.MenuDB().GetDateTable(strWhere); - } - - public static List GetModelList() - { - return new DAL.MenuDB().GetModelList(); - } - public static List GetModelList_FSB(int RoleId) - { - return new DAL.MenuDB().GetModelList_FSB(RoleId); - } - - public static List GetMenuRootList(int ParentId) - { - - return new DAL.MenuDB().GetMenuRootList(ParentId); - } - public static List GetMenuRootList(int RoleId, int ParentId) - { - return new DAL.MenuDB().GetMenuRootList(RoleId,ParentId); - } - public static List GetMenuRootListManage(int RoleId, string ParentId) - { - return new DAL.MenuDB().GetMenuRootListManage(RoleId,ParentId); - } - public static List GetMenuRootListManage(int RoleId) - { - return new DAL.MenuDB().GetMenuRootListManage(RoleId); - } - public static Model.Menu GetMenuById(int Id, int RoleId, int IsAll) - { - - return new DAL.MenuDB().GetMenuById(Id, RoleId,IsAll); - } - public static Model.Menu GetMenuByName(string name) - { - - return new DAL.MenuDB().GetMenuByName(name); - } - - public List GetChildren(Model.Menu Menu, int RoleId,int IsAll) - { - - return new DAL.MenuDB().GetChildren(Menu, RoleId, IsAll); - } - - public static Model.Menu GetPathByName(string Name) - { - return new DAL.MenuDB().GetPathByName(Name); - } - - public static DataTable GetMenuDataTable(int ParentId, int RoleId) - { - return new DAL.MenuDB().GetMenuDataTable(ParentId, RoleId); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Notice.cs b/AIMSEntity/OldEntity/BLL/Notice.cs deleted file mode 100644 index 3555b04..0000000 --- a/AIMSEntity/OldEntity/BLL/Notice.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.BLL -{ - public class NoticeTemplate - { - public static DataTable GetOperationList() - { - return new DAL.NoticeDB().GetOperationList(); - } - public static DataTable GetOperation() - { - return new DAL.NoticeDB().GetOperation(); - } - public static void Add(Model.Notice NoticeObj) - { - new DAL.NoticeDB().Add(NoticeObj); - } - public static void Delete(int Id) - { - new DAL.NoticeDB().Delete(Id); - } - public static void sendout(Model.Notice NoticeObj) - { - new DAL.NoticeDB().sendout(NoticeObj); - } - - public static List HistoryNoticeData() - { - return new DAL.NoticeDB().HistoryNoticeData(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Operation.cs b/AIMSEntity/OldEntity/BLL/Operation.cs deleted file mode 100644 index 306c78d..0000000 --- a/AIMSEntity/OldEntity/BLL/Operation.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class Operation - { - public static bool IsExit(string Name) - { - return new DAL.OperationDB().IsExit(Name); - } - public static void Add(Model.Operation OperationObj) - { - try - { - new DAL.OperationDB().Add(OperationObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.Operation OperationObj) - { - try - { - new DAL.OperationDB().Update(OperationObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.Operation GetModel(int Id) - { - return new DAL.OperationDB().GetModel(Id); - } - - public static DataTable GetDataTable(string HelpCode) - { - return new DAL.OperationDB().GetDataTable(HelpCode); - } - - public static DataTable GetDataTable() - { - return new DAL.OperationDB().GetDataTable(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OperationBodyPosition.cs b/AIMSEntity/OldEntity/BLL/OperationBodyPosition.cs deleted file mode 100644 index c4e8915..0000000 --- a/AIMSEntity/OldEntity/BLL/OperationBodyPosition.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.BLL -{ - public class OperationBodyPosition - { - public static void Add(Model.OperationBodyPosition OperationBodyPosition) - { - new DAL.OperationBodyPositionDB().Add(OperationBodyPosition); - - } - - public static void Update(Model.OperationBodyPosition OperationBodyPositionObj) - { - new DAL.OperationBodyPositionDB().Update(OperationBodyPositionObj); - - } - - public static Model.OperationBodyPosition GetModel(int Id) - { - return new DAL.OperationBodyPositionDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.OperationBodyPositionDB().GetDataTable(strWhere); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OperationCutType.cs b/AIMSEntity/OldEntity/BLL/OperationCutType.cs deleted file mode 100644 index 8d4821f..0000000 --- a/AIMSEntity/OldEntity/BLL/OperationCutType.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class OperationCutType - { - public static void Add(Model.OperationCutType OperationCutTypeObj) - { - try - { - new DAL.OperationCutTypeDB().Add(OperationCutTypeObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!"+ex.Message); - } - } - - public static void Update(Model.OperationCutType OperationCutTypeObj) - { - try - { - new DAL.OperationCutTypeDB().Update(OperationCutTypeObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.OperationCutType GetModel(int Id) - { - return new DAL.OperationCutTypeDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.OperationCutTypeDB().GetDataTable(strWhere); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OperationLevel.cs b/AIMSEntity/OldEntity/BLL/OperationLevel.cs deleted file mode 100644 index 2915098..0000000 --- a/AIMSEntity/OldEntity/BLL/OperationLevel.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class OperationLevel - { - public static void Add(Model.OperationLevel OperationLevelObj) - { - try - { - new DAL.OperationLevelDB().Add(OperationLevelObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加成功!"+ex.Message); - } - } - - public static void Update(Model.OperationLevel OperationLevelObj) - { - try - { - new DAL.OperationLevelDB().Update(OperationLevelObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改成功!" + ex.Message); - } - } - - public static Model.OperationLevel GetModel(int Id) - { - return new DAL.OperationLevelDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.OperationLevelDB().GetDataTable(strWhere); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OperationPosition.cs b/AIMSEntity/OldEntity/BLL/OperationPosition.cs deleted file mode 100644 index 56e0040..0000000 --- a/AIMSEntity/OldEntity/BLL/OperationPosition.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class OperationPosition - { - public static void Add(Model.OperationPosition OperationPositionObj) - { - try - { - new DAL.OperationPositionDB().Add(OperationPositionObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.OperationPosition OperationPositionObj) - { - try - { - new DAL.OperationPositionDB().Update(OperationPositionObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.OperationPosition GetModel(int Id) - { - return new DAL.OperationPositionDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.OperationPositionDB().GetDataTable(strWhere); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OperationRecoverRoom.cs b/AIMSEntity/OldEntity/BLL/OperationRecoverRoom.cs deleted file mode 100644 index 8b70362..0000000 --- a/AIMSEntity/OldEntity/BLL/OperationRecoverRoom.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.BLL -{ - public class OperationRecoverRoom - { - public static void Add(Model.OperationRecoverRoom OperationRecoverRoomObj) - { - new DAL.OperationRecoverRoomDB().Add(OperationRecoverRoomObj); - } - - public static void Update(Model.OperationRecoverRoom OperationRecoverRoomObj) - { - new DAL.OperationRecoverRoomDB().Update(OperationRecoverRoomObj); - } - - public static void Delete(int Id) - { - new DAL.OperationRecoverRoomDB().Delete(Id); - } - - public static Model.OperationRecoverRoom GetModel(int Id) - { - return new DAL.OperationRecoverRoomDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.OperationRecoverRoomDB().GetDataTable(strWhere); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OperationRoom.cs b/AIMSEntity/OldEntity/BLL/OperationRoom.cs deleted file mode 100644 index e54b136..0000000 --- a/AIMSEntity/OldEntity/BLL/OperationRoom.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.BLL -{ - public class OperationRoom - { - public static void Add(Model.OperationRoom OperationRoomObj) - { - new DAL.OperationRoomDB().Add(OperationRoomObj); - } - - public static void Update(Model.OperationRoom OperationRoomObj) - { - new DAL.OperationRoomDB().Update(OperationRoomObj); - } - - public static Model.OperationRoom GetModel(int Id) - { - return new DAL.OperationRoomDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.OperationRoomDB().GetDataTable(strWhere); - } - public static List GetOperationRooms(string strWhere) - { - return new DAL.OperationRoomDB().GetOperationRooms(strWhere); - } - public static int GetOperationRoomIdByName(string Name) - { - return new DAL.OperationRoomDB().GetOperationRoomIdByName(Name); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OperationTemplate.cs b/AIMSEntity/OldEntity/BLL/OperationTemplate.cs deleted file mode 100644 index d89572c..0000000 --- a/AIMSEntity/OldEntity/BLL/OperationTemplate.cs +++ /dev/null @@ -1,271 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using AIMSBLL; -using DrawGraph; - -namespace AIMS.PublicUI.BLL -{ - public class OperationTemplate - { - public static bool Exists(string TemplateName, int TypeId) - { - return new DAL.OperationTemplateDB().Exists(TemplateName, TypeId); - } - public static void Add(DateTime InRoomTime, string TemplateName, int PatientId, int TypeId, int IsPublic) - { - //药品 - DataTable Drugdt = BFactDrug.GetDataTable(PatientId, TypeId); - for (int i = 0; i < Drugdt.Rows.Count; i++) - { - Model.OperationTemplate OperationTemplateDrugObj = new Model.OperationTemplate(); - int DrugId = int.Parse(Drugdt.Rows[i]["DrugId"].ToString()); - if (BFactDrug.IsValid(DrugId)) - { - OperationTemplateDrugObj.TemplateName = TemplateName; - OperationTemplateDrugObj.TypeId = TypeId; - OperationTemplateDrugObj.ItemKindName = "药品"; - OperationTemplateDrugObj.InRoomTime = InRoomTime; - OperationTemplateDrugObj.ItemId = DrugId; - OperationTemplateDrugObj.Value = decimal.Parse(Drugdt.Rows[i]["Dosage"].ToString()); - OperationTemplateDrugObj.BeginTime = DateTime.Parse(Drugdt.Rows[i]["DrugBeginTime"].ToString()); - OperationTemplateDrugObj.EndTime = DateTime.Parse(Drugdt.Rows[i]["DrugEndTime"].ToString()); - OperationTemplateDrugObj.DosageUnit = Drugdt.Rows[i]["DosageUnit"].ToString(); - OperationTemplateDrugObj.DrugChannel = Drugdt.Rows[i]["DrugChannel"].ToString(); - OperationTemplateDrugObj.GiveDrugType = Drugdt.Rows[i]["GiveDrugType"].ToString(); - OperationTemplateDrugObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - OperationTemplateDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - OperationTemplateDrugObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationTemplateDrugObj.IsPublic = IsPublic; - OperationTemplateDrugObj.Spare1 = Drugdt.Rows[i]["Density"].ToString(); - OperationTemplateDrugObj.Spare2 = Drugdt.Rows[i]["DensityUnit"].ToString(); - OperationTemplateDrugObj.Spare3 = Drugdt.Rows[i]["Velocity"].ToString(); - OperationTemplateDrugObj.Spare4 = Drugdt.Rows[i]["VelocityUnit"].ToString(); - Add(OperationTemplateDrugObj); - } - - } - //事件 - - DataTable Eventdt = BFactEvents.GetDataTable(PatientId, TypeId); - for (int i = 0; i < Eventdt.Rows.Count; i++) - { - Model.OperationTemplate OperationTemplateEventObj = new Model.OperationTemplate(); - int EventId = int.Parse(Eventdt.Rows[i]["EventId"].ToString()); - if (BFactEvents.IsValid(EventId)) - { - OperationTemplateEventObj.TemplateName = TemplateName; - OperationTemplateEventObj.TypeId = TypeId; - OperationTemplateEventObj.ItemKindName = "事件"; - OperationTemplateEventObj.InRoomTime = InRoomTime; - OperationTemplateEventObj.ItemId = EventId; - OperationTemplateEventObj.BeginTime = DateTime.Parse(Eventdt.Rows[i]["EventBeginTime"].ToString()); - OperationTemplateEventObj.EndTime = DateTime.Parse(Eventdt.Rows[i]["EventEndTime"].ToString()); - OperationTemplateEventObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - OperationTemplateEventObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - OperationTemplateEventObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationTemplateEventObj.IsPublic = IsPublic; - Add(OperationTemplateEventObj); - } - } - //出量 - DataTable OutputLiquidsdt = BFactOutputLiquids.GetDataTable(PatientId, TypeId); - for (int i = 0; i < OutputLiquidsdt.Rows.Count; i++) - { - Model.OperationTemplate OperationTemplateOutputLiquidsObj = new Model.OperationTemplate(); - int OutputLiquidsId = int.Parse(OutputLiquidsdt.Rows[i]["OutputLiquidsId"].ToString()); - if (BFactOutputLiquids.IsValid(OutputLiquidsId)) - { - OperationTemplateOutputLiquidsObj.TemplateName = TemplateName; - OperationTemplateOutputLiquidsObj.TypeId = TypeId; - OperationTemplateOutputLiquidsObj.ItemKindName = "出量"; - OperationTemplateOutputLiquidsObj.InRoomTime = InRoomTime; - OperationTemplateOutputLiquidsObj.ItemId = OutputLiquidsId; - OperationTemplateOutputLiquidsObj.BeginTime = DateTime.Parse(OutputLiquidsdt.Rows[i]["BeginTime"].ToString()); - OperationTemplateOutputLiquidsObj.EndTime = DateTime.Parse(OutputLiquidsdt.Rows[i]["EndTime"].ToString()); - OperationTemplateOutputLiquidsObj.Value = decimal.Parse(OutputLiquidsdt.Rows[i]["Dosage"].ToString()); - OperationTemplateOutputLiquidsObj.DosageUnit = OutputLiquidsdt.Rows[i]["DosageUnit"].ToString(); - OperationTemplateOutputLiquidsObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - OperationTemplateOutputLiquidsObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - OperationTemplateOutputLiquidsObj.OperateDate = AIMSExtension.PublicMethod.SystemDate(); - OperationTemplateOutputLiquidsObj.IsPublic = IsPublic; - Add(OperationTemplateOutputLiquidsObj); - } - } - } - - public static void Add(Model.OperationTemplate OperationTemplateObj) - { - new DAL.OperationTemplateDB().Add(OperationTemplateObj); - } - - public static void Delete(string TemplateName, int TypeId) - { - new DAL.OperationTemplateDB().Delete(TemplateName, TypeId); - } - - public static Model.OperationTemplate GetModel(int Id) - { - return new DAL.OperationTemplateDB().GetModel(Id); - } - - public static DataTable GetDataTable(int TypeId) - { - return new DAL.OperationTemplateDB().GetDataTable(TypeId, AIMSExtension.PublicMethod.OperatorNo); - } - - public static void ClearData(int PatientId, int TypeId) - { - new DAL.OperationTemplateDB().ClearData(PatientId, TypeId); - } - public static void InputData(string TemplateName, int PatientId, DateTime InRoomTime, int TypeId) - { - DateTime NewInRoomTime = AIMSExtension.PublicMethod.SystemDate(); - DataTable dt = new DAL.OperationTemplateDB().GetDataTable(TemplateName, TypeId); - DataRow[] drugdr = dt.Select("ItemKindName='药品'"); - foreach (DataRow dr in drugdr) - { - int DrugId = int.Parse(dr["ItemId"].ToString()); - if (BFactDrug.IsValid(DrugId)) - { - FactDrug FactDrugObj = new FactDrug(); - FactDrugObj.PatientId = PatientId; - FactDrugObj.DrugId = DrugId; - TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - - //FactDrugObj.DrugBeginTime = NewInRoomTime.AddSeconds(BeginTimets.TotalSeconds); - //FactDrugObj.DrugEndTime = NewInRoomTime.AddSeconds(EndTimets.TotalSeconds); - - FactDrugObj.DrugBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); - FactDrugObj.DrugEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); - - if (dr["BeginTime"].ToString() == dr["EndTime"].ToString()) - { - FactDrugObj.IsContinue = 0; - } - else - { - FactDrugObj.IsContinue = 1; - } - FactDrugObj.DrugTypeId = TypeId; - if (dr["Value"].ToString() != "") - { - FactDrugObj.Dosage = decimal.Parse(dr["Value"].ToString()); - } - FactDrugObj.DosageUnit = dr["DosageUnit"].ToString(); - if (dr["Spare1"].ToString() != "" && dr["Spare1"].ToString() != "0" && dr["Spare1"].ToString() != "0.00") - { - FactDrugObj.Density = decimal.Parse(dr["Spare1"].ToString()); - FactDrugObj.DensityUnit = dr["Spare2"].ToString(); - } - if (dr["Spare3"].ToString() != "" && dr["Spare3"].ToString() != "0" && dr["Spare3"].ToString() != "0.00") - { - FactDrugObj.Velocity = decimal.Parse(dr["Spare3"].ToString()); - FactDrugObj.VelocityUnit = dr["Spare4"].ToString(); - } - - FactDrugObj.DrugChannel = dr["DrugChannel"].ToString(); - FactDrugObj.GiveDrugType = dr["GiveDrugType"].ToString(); - FactDrugObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactDrugObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactDrugObj.OperateDate = NewInRoomTime; - BFactDrug.Add(FactDrugObj); - - } - - } - - DataRow[] Eventdr = dt.Select("ItemKindName='事件'"); - foreach (DataRow dr in Eventdr) - { - int EventId = int.Parse(dr["ItemId"].ToString()); - if (BFactEvents.IsValid(EventId)) - { - FactEvents FactEventObj = new FactEvents(); - FactEventObj.PatientId = PatientId; - FactEventObj.EventId = EventId; - TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - - FactEventObj.EventBeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); - FactEventObj.EventEndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); - if (dr["BeginTime"].ToString() == dr["EndTime"].ToString()) - { - FactEventObj.IsContinue = 0; - } - else - { - FactEventObj.IsContinue = 1; - } - FactEventObj.EventTypeId = TypeId; - - FactEventObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactEventObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactEventObj.OperateDate = NewInRoomTime; - BFactEvents.Add(FactEventObj); - } - } - - DataRow[] OutputLiquidsdr = dt.Select("ItemKindName='出量'"); - foreach (DataRow dr in OutputLiquidsdr) - { - int OutputLiquidsId = int.Parse(dr["ItemId"].ToString()); - if (BFactOutputLiquids.IsValid(OutputLiquidsId)) - { - FactOutputLiquids FactOutputLiquidsObj = new FactOutputLiquids(); - FactOutputLiquidsObj.PatientId = PatientId; - FactOutputLiquidsObj.OutputLiquidsId = OutputLiquidsId; - TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - TimeSpan EndTimets = DateTime.Parse(dr["EndTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - - FactOutputLiquidsObj.BeginTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); - FactOutputLiquidsObj.EndTime = InRoomTime.AddSeconds(EndTimets.TotalSeconds); - if (dr["BeginTime"].ToString() == dr["EndTime"].ToString()) - { - FactOutputLiquidsObj.IsContinue = 0; - } - else - { - FactOutputLiquidsObj.IsContinue = 1; - } - FactOutputLiquidsObj.OutputLiquidsTypeId = TypeId; - if (dr["Value"].ToString() != "") - { - FactOutputLiquidsObj.Dosage = decimal.Parse(dr["Value"].ToString()); - } - FactOutputLiquidsObj.DosageUnit = dr["DosageUnit"].ToString(); - - FactOutputLiquidsObj.OperatorNo = AIMSExtension.PublicMethod.OperatorNo; - FactOutputLiquidsObj.OperatorName = AIMSExtension.PublicMethod.OperatorName; - FactOutputLiquidsObj.OperateDate = NewInRoomTime; - BFactOutputLiquids.Add(FactOutputLiquidsObj); - } - } - //DataRow[] PhysioParamdr = dt.Select("ItemKindName='生命体征'"); - //foreach (DataRow dr in PhysioParamdr) - //{ - // int PhysioParamId = int.Parse(dr["ItemId"].ToString()); - // TimeSpan BeginTimets = DateTime.Parse(dr["BeginTime"].ToString()).Subtract(DateTime.Parse(dr["InRoomTime"].ToString())); - - // OperationDoing.AnasRecordBill.Model.PhysioData PhysioDataObj = new OperationDoing.AnasRecordBill.Model.PhysioData(); - // PhysioDataObj.PatientId = PatientId; - // PhysioDataObj.PhysioDataType = TypeId; - // PhysioDataObj.RecordTime = InRoomTime.AddSeconds(BeginTimets.TotalSeconds); - // PhysioDataObj.PhysioParamID = PhysioParamId; - - // if (dr["Value"].ToString() != "") - // { - // PhysioDataObj.Value = double.Parse(dr["Value"].ToString()); - // } - // else - // { - // PhysioDataObj.Value = 0; - // } - - //} - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/OutputLiquids.cs b/AIMSEntity/OldEntity/BLL/OutputLiquids.cs deleted file mode 100644 index c2e6b9c..0000000 --- a/AIMSEntity/OldEntity/BLL/OutputLiquids.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.BLL -{ - public class OutputLiquids - { public static bool IsExit(string Name) - { - return new DAL.OutputLiquidsDB().IsExit(Name); - } - public static void Add(Model.OutputLiquids OutputLiquidsObj) - { - new DAL.OutputLiquidsDB().Add(OutputLiquidsObj); - } - - public static void Update(Model.OutputLiquids OutputLiquidsObj) - { - new DAL.OutputLiquidsDB().Update(OutputLiquidsObj); - } - public static void Delete(int Id) - { - new DAL.OutputLiquidsDB().Delete(Id); - } - - public static Model.OutputLiquids GetModel(int Id) - { - return new DAL.OutputLiquidsDB().GetModel(Id); - } - public static Model.OutputLiquids GetModelByName(string Name) - { - return new DAL.OutputLiquidsDB().GetModelByName(Name); - } - public static DataTable GetDataTable(string HelpCode) - { - return new DAL.OutputLiquidsDB().GetDataTable(HelpCode); - } - - public static DataTable GetEventDataTable() - { - return new DAL.OutputLiquidsDB().GetEventDataTable(); - } - - public static DataTable GetDataTable() - { - return new DAL.OutputLiquidsDB().GetDataTable(); - } - } -} - - \ No newline at end of file diff --git a/AIMSEntity/OldEntity/BLL/PatientKind.cs b/AIMSEntity/OldEntity/BLL/PatientKind.cs deleted file mode 100644 index a82c4ac..0000000 --- a/AIMSEntity/OldEntity/BLL/PatientKind.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DataDictionary.BLL -{ - public class PatientKind - { - public static void Add(Model.PatientKind PatientKindObj) - { - try - { - new DAL.PatientKindDB().Add(PatientKindObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.PatientKind PatientKindObj) - { - try - { - new DAL.PatientKindDB().Update(PatientKindObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.PatientKind GetModel(int Id) - { - return new DAL.PatientKindDB().GetModel(Id); - } - - public static DataTable GetDataTable(string strWhere) - { - return new DAL.PatientKindDB().GetDataTable(strWhere); - } - - public static DataTable GetDataTable() - { - return new DAL.PatientKindDB().GetDataTable(); - } - - public static bool NameExit(string Name) - { - return new DAL.PatientKindDB().NameExit(Name); - } - - public static bool IsExit(string No) - { - return new DAL.PatientKindDB().IsExit(No); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Person.cs b/AIMSEntity/OldEntity/BLL/Person.cs deleted file mode 100644 index 13275dc..0000000 --- a/AIMSEntity/OldEntity/BLL/Person.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -using System.Data.SqlClient; -using HelperDB; - -namespace AIMS.PublicUI.BLL -{ - public class Person - { - public static void Add(Model.Person PersonObj) - { - try - { - new DAL.PersonDB().Add(PersonObj); - MessageBox.Show("增加成功!"); - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.Person PersonObj) - { - try - { - new DAL.PersonDB().Update(PersonObj); - MessageBox.Show("修改成功!"); - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.Person GetModel(int Id) - { - return new DAL.PersonDB().GetModel(Id); ; - } - - public static DataTable GetPersonDataTable() - { - return new DAL.PersonDB().GetPersonDataTable(); - } - public static DataTable GetPersonDataTable(string name,string DeptName) - { - return new DAL.PersonDB().GetPersonDataTable(name,DeptName); - } - public static bool Login(string No, string PassWord) - { - return new DAL.PersonDB().Login(No, PassWord); - } - public static Model.Person GetModelByNo(string No) - { - return new DAL.PersonDB().GetModelByNo(No); - } - - - public static DataTable GetPersonDataTableByDepId(int DepId, string HelpCode, string PersonType) - { - return new DAL.PersonDB().GetPersonDataTableByDepId(DepId, HelpCode,PersonType); - } - - /// - /// 查询排班信息 - /// - /// 查询时间 - /// 工种 - /// 部门Id - /// 关键字 - /// - public static DataTable GetSchedulingForSelect(DateTime time, string workerType )//int depId, - { - try - { - string sql = string.Empty; - sql = "EXEC usp_GetSchedulingForSelect @DateTime = '" + time + - "', @WorkerType= '" + workerType + "'";//, @DepId= " + depId - return DBHelper.GetDataTable(sql); - } - catch (SqlException ex) - { - throw new Exception(ex.Message); - } - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/PersonDuty.cs b/AIMSEntity/OldEntity/BLL/PersonDuty.cs deleted file mode 100644 index 77bb408..0000000 --- a/AIMSEntity/OldEntity/BLL/PersonDuty.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.BLL -{ - public class PersonDuty - { - public static DataTable GetDataTablePersonDuty() - { - return new DAL.PersonDutyDB().GetDataTablePersonDuty(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/PharmaCology.cs b/AIMSEntity/OldEntity/BLL/PharmaCology.cs deleted file mode 100644 index cd4fd45..0000000 --- a/AIMSEntity/OldEntity/BLL/PharmaCology.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace DrugManagement.BLL -{ - public class PharmaCology - { - public static void Add(Model.PharmaCology PharmaCologyObj) - { - try - { - new DAL.PharmaCologyDB().Add(PharmaCologyObj); - MessageBox.Show("增加成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.PharmaCology PharmaCologyObj) - { - try - { - new DAL.PharmaCologyDB().Update(PharmaCologyObj); - MessageBox.Show("修改成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static Model.PharmaCology GetModel(int Id) - { - return new DAL.PharmaCologyDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.PharmaCologyDB().GetDataTable(); - } - } - -} diff --git a/AIMSEntity/OldEntity/BLL/PrintDoc.cs b/AIMSEntity/OldEntity/BLL/PrintDoc.cs deleted file mode 100644 index 091a2ed..0000000 --- a/AIMSEntity/OldEntity/BLL/PrintDoc.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.BLL -{ - public class PrintDoc - { - public static Model.PrintDoc GetModel(int Id) - { - return new DAL.PrintDocDB().GetModel(Id); - } - - public static void Add(Model.PrintDoc PrintDocObj) - { - new DAL.PrintDocDB().Add(PrintDocObj); - } - - public static void Update(Model.PrintDoc PrintDocObj) - { - new DAL.PrintDocDB().Update(PrintDocObj); - } - - public static DataTable GetDataTable(int ApplyId, string PrintName) - { - return new DAL.PrintDocDB().GetDataTable(ApplyId, PrintName); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/Role.cs b/AIMSEntity/OldEntity/BLL/Role.cs deleted file mode 100644 index 0fa19ed..0000000 --- a/AIMSEntity/OldEntity/BLL/Role.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace AIMS.PublicUI.BLL -{ - public class Role - { - public static void Add(Model.Role RoleObj) - { - try - { - new DAL.RoleDB().Add(RoleObj); - MessageBox.Show("增加成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.Role RoleObj) - { - try - { - new DAL.RoleDB().Update(RoleObj); - MessageBox.Show("修改成功!"); - - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - - } - - - public static Model.Role GetModel(int Id) - { - return new DAL.RoleDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.RoleDB().GetDataTable(); - } - } -} diff --git a/AIMSEntity/OldEntity/BLL/SysConfig.cs b/AIMSEntity/OldEntity/BLL/SysConfig.cs deleted file mode 100644 index 9297278..0000000 --- a/AIMSEntity/OldEntity/BLL/SysConfig.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; - -namespace DataDictionary.BLL -{ - public class SysConfig - { - public static bool IsExit(string Name) - { - return new DAL.SysConfigDB().IsExit(Name); - } - public static void Add(Model.SysConfig DrugsObj) - { - try - { - new DAL.SysConfigDB().Add(DrugsObj); - MessageBox.Show("药品增加成功!"); - } - catch - { - MessageBox.Show("药品增加失败!"); - } - } - public static void Update(Model.SysConfig DrugsObj) - { - try - { - new DAL.SysConfigDB().Update(DrugsObj); - - MessageBox.Show("药品修改成功!"); - } - catch - { - MessageBox.Show("药品修改失败!"); - } - } - - public static Model.SysConfig GetModel(int Id) - { - return new DAL.SysConfigDB().GetModel(Id); - } - - public static object GetDataTable() - { - return new DAL.SysConfigDB().GetDataTable(); - } - } - -} - - - \ No newline at end of file diff --git a/AIMSEntity/OldEntity/BLL/UserPurview.cs b/AIMSEntity/OldEntity/BLL/UserPurview.cs deleted file mode 100644 index da34b0b..0000000 --- a/AIMSEntity/OldEntity/BLL/UserPurview.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using System.Windows.Forms; -namespace AIMS.PublicUI.BLL -{ - public class UserPurview - { - public static void Add(Model.UserPurview UserPurview) - { - try - { - new DAL.UserPurviewDB().Add(UserPurview); - - } - catch (Exception ex) - { - MessageBox.Show("增加失败!" + ex.Message); - } - } - - public static void Update(Model.UserPurview UserPurview) - { - try - { - new DAL.UserPurviewDB().Update(UserPurview); - - } - catch (Exception ex) - { - MessageBox.Show("修改失败!" + ex.Message); - } - } - - public static void Delete(int RoleId) - { - new DAL.UserPurviewDB().Delete(RoleId); - } - - public static Model.UserPurview GetModel(int Id) - { - return new DAL.UserPurviewDB().GetModel(Id); - } - - public static DataTable GetDataTable() - { - return new DAL.UserPurviewDB().GetDataTable(); - - } - - public static List GetPurviewListByRoleId(int RoleId) - { - return new DAL.UserPurviewDB().GetPurviewListByRoleId(RoleId); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/AnaesthesiaMethodDB.cs b/AIMSEntity/OldEntity/DAL/AnaesthesiaMethodDB.cs deleted file mode 100644 index a0dc2e8..0000000 --- a/AIMSEntity/OldEntity/DAL/AnaesthesiaMethodDB.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class AnaesthesiaMethodDB - { - public void Add(Model.AnaesthesiaMethod AnaesthesiaMethodObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [AnaesthesiaMethod]("); - strSql.Append("Name,HelpCode,ParentId,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+AnaesthesiaMethodObj.Name+"',"); - strSql.Append("'"+AnaesthesiaMethodObj.HelpCode+"',"); - strSql.Append(""+AnaesthesiaMethodObj.ParentId+","); - strSql.Append(""+AnaesthesiaMethodObj.UseRate+","); - strSql.Append(""+AnaesthesiaMethodObj.IsValid+","); - strSql.Append("'"+AnaesthesiaMethodObj.OperatorNo+"',"); - strSql.Append("'"+AnaesthesiaMethodObj.OperatorName+"',"); - strSql.Append("'"+AnaesthesiaMethodObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.AnaesthesiaMethod AnaesthesiaMethodObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update AnaesthesiaMethod set "); - strSql.Append("Name='"+AnaesthesiaMethodObj.Name+"',"); - strSql.Append("HelpCode='"+AnaesthesiaMethodObj.HelpCode+"',"); - strSql.Append("ParentId="+AnaesthesiaMethodObj.ParentId+","); - strSql.Append("UseRate="+AnaesthesiaMethodObj.UseRate+","); - strSql.Append("IsValid="+AnaesthesiaMethodObj.IsValid+","); - strSql.Append("OperatorNo='"+AnaesthesiaMethodObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+AnaesthesiaMethodObj.OperatorName+"',"); - strSql.Append("OperateDate='"+AnaesthesiaMethodObj.OperateDate+"'"); - strSql.Append(" where Id="+AnaesthesiaMethodObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.AnaesthesiaMethod GetModel(int Id) - { - Model.AnaesthesiaMethod AnaesthesiaMethodObj = new Model.AnaesthesiaMethod(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,ParentId,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from AnaesthesiaMethod "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - AnaesthesiaMethodObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - AnaesthesiaMethodObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - AnaesthesiaMethodObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["ParentId"].ToString()!="") - { - AnaesthesiaMethodObj.ParentId = int.Parse(ds.Tables[0].Rows[0]["ParentId"].ToString()); - } - if(ds.Tables[0].Rows[0]["UseRate"].ToString()!="") - { - AnaesthesiaMethodObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - AnaesthesiaMethodObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - AnaesthesiaMethodObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - AnaesthesiaMethodObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - AnaesthesiaMethodObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return AnaesthesiaMethodObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[ParentId],[UseRate],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM AnaesthesiaMethod "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/BasicDictionaryDB.cs b/AIMSEntity/OldEntity/DAL/BasicDictionaryDB.cs deleted file mode 100644 index 46d907c..0000000 --- a/AIMSEntity/OldEntity/DAL/BasicDictionaryDB.cs +++ /dev/null @@ -1,276 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class BasicDictionaryDB :HelperDB.DbHelperSQL - { - public void Add( Model.BasicDictionary BasicDictionaryObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [BasicDictionary]("); - strSql.Append("Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+BasicDictionaryObj.Name+"',"); - strSql.Append(""+BasicDictionaryObj.ParentId+","); - strSql.Append("'"+BasicDictionaryObj.HelpCode+"',"); - strSql.Append(""+BasicDictionaryObj.Order+","); - strSql.Append(""+BasicDictionaryObj.IsValid+","); - strSql.Append("'"+BasicDictionaryObj.OperatorNo+"',"); - strSql.Append("'"+BasicDictionaryObj.OperatorName+"',"); - strSql.Append("'"+BasicDictionaryObj.OperateDate+"',"); - strSql.Append("'"+BasicDictionaryObj.Remark+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.BasicDictionary BasicDictionaryObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update BasicDictionary set "); - strSql.Append("Name='"+BasicDictionaryObj.Name+"',"); - strSql.Append("ParentId="+BasicDictionaryObj.ParentId+","); - strSql.Append("HelpCode='"+BasicDictionaryObj.HelpCode+"',"); - strSql.Append("[Order]="+BasicDictionaryObj.Order+","); - strSql.Append("IsValid="+BasicDictionaryObj.IsValid+","); - strSql.Append("OperatorNo='"+BasicDictionaryObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+BasicDictionaryObj.OperatorName+"',"); - strSql.Append("OperateDate='"+BasicDictionaryObj.OperateDate+"',"); - strSql.Append("Remark='"+BasicDictionaryObj.Remark+"'"); - strSql.Append(" where Id="+BasicDictionaryObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.BasicDictionary GetModel(int Id) - { - Model.BasicDictionary BasicDictionaryObj = new Model.BasicDictionary(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); - strSql.Append(" from BasicDictionary "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - BasicDictionaryObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - BasicDictionaryObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - if(ds.Tables[0].Rows[0]["ParentId"].ToString()!="") - { - BasicDictionaryObj.ParentId = int.Parse(ds.Tables[0].Rows[0]["ParentId"].ToString()); - } - BasicDictionaryObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["Order"].ToString()!="") - { - BasicDictionaryObj.Order = int.Parse(ds.Tables[0].Rows[0]["Order"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - BasicDictionaryObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - BasicDictionaryObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - BasicDictionaryObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - BasicDictionaryObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - BasicDictionaryObj.Remark = ds.Tables[0].Rows[0]["Remark"].ToString(); - - BasicDictionaryObj.Children = GetChildren(BasicDictionaryObj); - } - return BasicDictionaryObj; - } - - - public List GetChildren(Model.BasicDictionary BasicDictionary) - { - List children = new List(); - - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); - strSql.Append(" from BasicDictionary "); - strSql.Append(" where ParentId=" + BasicDictionary.Id + " order by [Order]"); - - DataTable dt = GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.BasicDictionary BasicDictionaryObj = new Model.BasicDictionary(); - - if (dt.Rows[i]["Id"].ToString() != "") - { - BasicDictionaryObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - } - BasicDictionaryObj.Name = dt.Rows[i]["Name"].ToString(); - if (dt.Rows[i]["ParentId"].ToString() != "") - { - BasicDictionaryObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); - } - BasicDictionaryObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); - if (dt.Rows[i]["Order"].ToString() != "") - { - BasicDictionaryObj.Order = int.Parse(dt.Rows[i]["Order"].ToString()); - } - if (dt.Rows[i]["IsValid"].ToString() != "") - { - BasicDictionaryObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); - } - BasicDictionaryObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); - BasicDictionaryObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); - if (dt.Rows[i]["OperateDate"].ToString() != "") - { - BasicDictionaryObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); - } - BasicDictionaryObj.Remark = dt.Rows[i]["Remark"].ToString(); - - children.Add(BasicDictionaryObj); - BasicDictionaryObj.Children = GetChildren(BasicDictionaryObj); - } - return children; - } - - - public List GetModelList(int ParentId) - { - List BasicDictionaryListObj = new List(); - - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); - strSql.Append(" from BasicDictionary "); - strSql.Append(" where ParentId=" + ParentId + " order by [Order]"); - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.BasicDictionary BasicDictionaryObj = new Model.BasicDictionary(); - - if (dt.Rows[i]["Id"].ToString() != "") - { - BasicDictionaryObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - } - BasicDictionaryObj.Name = dt.Rows[i]["Name"].ToString(); - if (dt.Rows[i]["ParentId"].ToString() != "") - { - BasicDictionaryObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); - } - BasicDictionaryObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); - if (dt.Rows[i]["Order"].ToString() != "") - { - BasicDictionaryObj.Order = int.Parse(dt.Rows[i]["Order"].ToString()); - } - if (dt.Rows[i]["IsValid"].ToString() != "") - { - BasicDictionaryObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); - } - BasicDictionaryObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); - BasicDictionaryObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); - if (dt.Rows[i]["OperateDate"].ToString() != "") - { - BasicDictionaryObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); - } - BasicDictionaryObj.Remark = dt.Rows[i]["Remark"].ToString(); - BasicDictionaryListObj.Add(BasicDictionaryObj); - } - return BasicDictionaryListObj; - } - - public List GetModelParentList() - { - List BasicDictionaryListObj = new List(); - - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,ParentId,HelpCode,[Order],IsValid,OperatorNo,OperatorName,OperateDate,Remark "); - strSql.Append(" from BasicDictionary where ParentId=0"); - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.BasicDictionary BasicDictionaryObj = new Model.BasicDictionary(); - - if (dt.Rows[i]["Id"].ToString() != "") - { - BasicDictionaryObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - } - BasicDictionaryObj.Name = dt.Rows[i]["Name"].ToString(); - if (dt.Rows[i]["ParentId"].ToString() != "") - { - BasicDictionaryObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); - } - BasicDictionaryObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); - if (dt.Rows[i]["Order"].ToString() != "") - { - BasicDictionaryObj.Order = int.Parse(dt.Rows[i]["Order"].ToString()); - } - if (dt.Rows[i]["IsValid"].ToString() != "") - { - BasicDictionaryObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); - } - BasicDictionaryObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); - BasicDictionaryObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); - if (dt.Rows[i]["OperateDate"].ToString() != "") - { - BasicDictionaryObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); - } - BasicDictionaryObj.Remark = dt.Rows[i]["Remark"].ToString(); - BasicDictionaryListObj.Add(BasicDictionaryObj); - } - return BasicDictionaryListObj; - } - - public DataTable GetDataDictionaryDataTable(int ParentId) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[ParentId],[HelpCode],[Order],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,[Remark] "); - strSql.Append(" FROM BasicDictionary WHERE Id=" + ParentId + ""); - - strSql.Append("UNION ALL "); - - - strSql.Append("select [Id],[Name],[ParentId],[HelpCode],[Order],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,[Remark] "); - strSql.Append(" FROM BasicDictionary WHERE ParentId="+ParentId+" order by [Order]"); - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetDataDictionaryDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[ParentId],[HelpCode],[Order],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,[Remark] "); - strSql.Append(" FROM BasicDictionary "); - if(strWhere.Trim()!="") - { - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetDataDictionaryDataTableByParentName(string ParentName, string HelpCode) - { - string strSql = "SELECT bd.Id, bd.Name FROM BasicDictionary bd WHERE bd.IsValid=1 and ParentId IN " + - "(SELECT Id FROM BasicDictionary WHERE NAME='" + ParentName + "') AND (bd.Name LIKE '%" + HelpCode + "%' OR bd.HelpCode LIKE '%" + HelpCode + "%') ORDER BY bd.[Order]"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetDataDictionaryNameAndRemark(string ParentName, string HelpCode) - { - string strSql = "SELECT bd.Id, CASE bd.Remark WHEN '' THEN bd.NAME ELSE bd.NAME+ '-' + bd.Remark END AS NAME FROM BasicDictionary bd WHERE bd.IsValid=1 and ParentId IN " + - "(SELECT Id FROM BasicDictionary WHERE NAME='" + ParentName + "') AND (bd.Name LIKE '%" + HelpCode + "%' OR bd.HelpCode LIKE '%" + HelpCode + "%') ORDER BY bd.[Order]"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - - - - - - } -} diff --git a/AIMSEntity/OldEntity/DAL/DepartmentDB.cs b/AIMSEntity/OldEntity/DAL/DepartmentDB.cs deleted file mode 100644 index 536e7d3..0000000 --- a/AIMSEntity/OldEntity/DAL/DepartmentDB.cs +++ /dev/null @@ -1,257 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.DAL -{ - public class DepartmentDB :HelperDB.DbHelperSQL - { - public void Add(Model.Department DepartmentObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [Department]("); - strSql.Append("Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+DepartmentObj.Name+"',"); - strSql.Append("'"+DepartmentObj.HelpCode+"',"); - strSql.Append("'"+DepartmentObj.Kind+"',"); - strSql.Append(""+DepartmentObj.Clinic+","); - strSql.Append(""+DepartmentObj.Hospital+","); - strSql.Append(""+DepartmentObj.DepOrder+","); - strSql.Append("'"+DepartmentObj.DepAddress+"',"); - strSql.Append(""+DepartmentObj.IsValid+","); - strSql.Append("'"+DepartmentObj.OperatorNo+"',"); - strSql.Append("'"+DepartmentObj.OperatorName+"',"); - strSql.Append("'"+DepartmentObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.Department DepartmentObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update Department set "); - strSql.Append("Name='"+DepartmentObj.Name+"',"); - strSql.Append("HelpCode='"+DepartmentObj.HelpCode+"',"); - strSql.Append("Kind='"+DepartmentObj.Kind+"',"); - strSql.Append("Clinic="+DepartmentObj.Clinic+","); - strSql.Append("Hospital="+DepartmentObj.Hospital+","); - strSql.Append("DepOrder="+DepartmentObj.DepOrder+","); - strSql.Append("DepAddress='"+DepartmentObj.DepAddress+"',"); - strSql.Append("IsValid="+DepartmentObj.IsValid+","); - strSql.Append("OperatorNo='"+DepartmentObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+DepartmentObj.OperatorName+"',"); - strSql.Append("OperateDate='"+DepartmentObj.OperateDate+"'"); - strSql.Append(" where Id="+DepartmentObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.Department GetModel(int Id) - { - Model.Department DepartmentObj = new Model.Department(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Department "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - DepartmentObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DepartmentObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - DepartmentObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - DepartmentObj.Kind = ds.Tables[0].Rows[0]["Kind"].ToString(); - if(ds.Tables[0].Rows[0]["Clinic"].ToString()!="") - { - DepartmentObj.Clinic = int.Parse(ds.Tables[0].Rows[0]["Clinic"].ToString()); - } - if(ds.Tables[0].Rows[0]["Hospital"].ToString()!="") - { - DepartmentObj.Hospital = int.Parse(ds.Tables[0].Rows[0]["Hospital"].ToString()); - } - if(ds.Tables[0].Rows[0]["DepOrder"].ToString()!="") - { - DepartmentObj.DepOrder = int.Parse(ds.Tables[0].Rows[0]["DepOrder"].ToString()); - } - DepartmentObj.DepAddress = ds.Tables[0].Rows[0]["DepAddress"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - DepartmentObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DepartmentObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DepartmentObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - DepartmentObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DepartmentObj; - } - - public Model.Department GetModelName(string Name) - { - Model.Department DepartmentObj = new Model.Department(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Department "); - strSql.Append(" where Name=" + Name + "" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - DepartmentObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DepartmentObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - DepartmentObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - DepartmentObj.Kind = ds.Tables[0].Rows[0]["Kind"].ToString(); - if(ds.Tables[0].Rows[0]["Clinic"].ToString()!="") - { - DepartmentObj.Clinic = int.Parse(ds.Tables[0].Rows[0]["Clinic"].ToString()); - } - if(ds.Tables[0].Rows[0]["Hospital"].ToString()!="") - { - DepartmentObj.Hospital = int.Parse(ds.Tables[0].Rows[0]["Hospital"].ToString()); - } - if(ds.Tables[0].Rows[0]["DepOrder"].ToString()!="") - { - DepartmentObj.DepOrder = int.Parse(ds.Tables[0].Rows[0]["DepOrder"].ToString()); - } - DepartmentObj.DepAddress = ds.Tables[0].Rows[0]["DepAddress"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - DepartmentObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DepartmentObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DepartmentObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - DepartmentObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DepartmentObj; - } - public DataTable GetDepartmentDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[Kind]," - + "CASE Clinic WHEN 1 THEN '是' WHEN 0 THEN '否' END AS Clinic ," - + "CASE Hospital WHEN 1 THEN '是' WHEN 0 THEN '否' END AS Hospital ," - +"[DepOrder],[DepAddress],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM Department "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetDepartmentAllList(string Kind) - { - List DepartmentListObj = new List(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Department "); - strSql.Append(" where IsValid=1 and Kind='"+Kind+"'"); - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Department DepartmentObj = new Model.Department(); - if (dt.Rows.Count > 0) - { - if (dt.Rows[i]["Id"].ToString() != "") - { - DepartmentObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - } - DepartmentObj.Name = dt.Rows[i]["Name"].ToString(); - DepartmentObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); - DepartmentObj.Kind = dt.Rows[i]["Kind"].ToString(); - if (dt.Rows[i]["Clinic"].ToString() != "") - { - DepartmentObj.Clinic = int.Parse(dt.Rows[i]["Clinic"].ToString()); - } - if (dt.Rows[i]["Hospital"].ToString() != "") - { - DepartmentObj.Hospital = int.Parse(dt.Rows[i]["Hospital"].ToString()); - } - if (dt.Rows[i]["DepOrder"].ToString() != "") - { - DepartmentObj.DepOrder = int.Parse(dt.Rows[i]["DepOrder"].ToString()); - } - DepartmentObj.DepAddress = dt.Rows[i]["DepAddress"].ToString(); - if (dt.Rows[i]["IsValid"].ToString() != "") - { - DepartmentObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); - } - DepartmentObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); - DepartmentObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); - if (dt.Rows[i]["OperateDate"].ToString() != "") - { - DepartmentObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); - } - } - DepartmentListObj.Add(DepartmentObj); - } - return DepartmentListObj; - } - public List GetDepartmentAllListBYSql(string sql) - { - List DepartmentListObj = new List(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Kind,Clinic,Hospital,DepOrder,DepAddress,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Department "); - strSql.Append(" where IsValid=1 "+sql +""); - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Department DepartmentObj = new Model.Department(); - if (dt.Rows.Count > 0) - { - if (dt.Rows[i]["Id"].ToString() != "") - { - DepartmentObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - } - DepartmentObj.Name = dt.Rows[i]["Name"].ToString(); - DepartmentObj.HelpCode = dt.Rows[i]["HelpCode"].ToString(); - DepartmentObj.Kind = dt.Rows[i]["Kind"].ToString(); - if (dt.Rows[i]["Clinic"].ToString() != "") - { - DepartmentObj.Clinic = int.Parse(dt.Rows[i]["Clinic"].ToString()); - } - if (dt.Rows[i]["Hospital"].ToString() != "") - { - DepartmentObj.Hospital = int.Parse(dt.Rows[i]["Hospital"].ToString()); - } - if (dt.Rows[i]["DepOrder"].ToString() != "") - { - DepartmentObj.DepOrder = int.Parse(dt.Rows[i]["DepOrder"].ToString()); - } - DepartmentObj.DepAddress = dt.Rows[i]["DepAddress"].ToString(); - if (dt.Rows[i]["IsValid"].ToString() != "") - { - DepartmentObj.IsValid = int.Parse(dt.Rows[i]["IsValid"].ToString()); - } - DepartmentObj.OperatorNo = dt.Rows[i]["OperatorNo"].ToString(); - DepartmentObj.OperatorName = dt.Rows[i]["OperatorName"].ToString(); - if (dt.Rows[i]["OperateDate"].ToString() != "") - { - DepartmentObj.OperateDate = DateTime.Parse(dt.Rows[i]["OperateDate"].ToString()); - } - } - DepartmentListObj.Add(DepartmentObj); - } - return DepartmentListObj; - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/DiseaseDB.cs b/AIMSEntity/OldEntity/DAL/DiseaseDB.cs deleted file mode 100644 index f3f7cb2..0000000 --- a/AIMSEntity/OldEntity/DAL/DiseaseDB.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class DiseaseDB - { - public bool IsExit(string Name) - { - - string strSql = "select * from Disease where name ='" + Name + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - return true; - } - else - { - return false; - } - } - - public void Add(Model.Disease DiseaseObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [Disease]("); - strSql.Append("IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+DiseaseObj.IcdCode+"',"); - strSql.Append("'"+DiseaseObj.Name+"',"); - strSql.Append("'"+DiseaseObj.HelpCode+"',"); - strSql.Append(""+DiseaseObj.UseRate+","); - strSql.Append(""+DiseaseObj.IsValid+","); - strSql.Append("'"+DiseaseObj.OperatorNo+"',"); - strSql.Append("'"+DiseaseObj.OperatorName+"',"); - strSql.Append("'"+DiseaseObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.Disease DiseaseObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update Disease set "); - strSql.Append("IcdCode='"+DiseaseObj.IcdCode+"',"); - strSql.Append("Name='"+DiseaseObj.Name+"',"); - strSql.Append("HelpCode='"+DiseaseObj.HelpCode+"',"); - strSql.Append("IsValid="+DiseaseObj.IsValid+","); - strSql.Append("OperatorNo='"+DiseaseObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+DiseaseObj.OperatorName+"',"); - strSql.Append("OperateDate='"+DiseaseObj.OperateDate+"'"); - strSql.Append(" where Id="+DiseaseObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.Disease GetModel(int Id) - { - Model.Disease DiseaseObj = new Model.Disease(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Disease "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - DiseaseObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DiseaseObj.IcdCode = ds.Tables[0].Rows[0]["IcdCode"].ToString(); - DiseaseObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - DiseaseObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["UseRate"].ToString()!="") - { - DiseaseObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - DiseaseObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DiseaseObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DiseaseObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - DiseaseObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DiseaseObj; - } - public DataTable GetDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id], IcdCode,[Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM Disease "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetDataTable(string HelpCode) - { - - string strSql = ""; - if (HelpCode == "") - { - strSql = "SELECT TOP 75 d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 order by UseRate desc"; - } - else - { - strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Disease d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc"; - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/DosageKindDB.cs b/AIMSEntity/OldEntity/DAL/DosageKindDB.cs deleted file mode 100644 index 5a4c74a..0000000 --- a/AIMSEntity/OldEntity/DAL/DosageKindDB.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class DosageKindDB - { - public void Add(Model.DosageKind DosageKindObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [DosageKind]("); - strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+DosageKindObj.Name+"',"); - strSql.Append("'"+DosageKindObj.HelpCode+"',"); - strSql.Append(""+DosageKindObj.IsValid+","); - strSql.Append("'"+DosageKindObj.OperatorNo+"',"); - strSql.Append("'"+DosageKindObj.OperatorName+"',"); - strSql.Append("'"+DosageKindObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.DosageKind DosageKindObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update DosageKind set "); - strSql.Append("Name='"+DosageKindObj.Name+"',"); - strSql.Append("HelpCode='"+DosageKindObj.HelpCode+"',"); - strSql.Append("IsValid="+DosageKindObj.IsValid+","); - strSql.Append("OperatorNo='"+DosageKindObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+DosageKindObj.OperatorName+"',"); - strSql.Append("OperateDate='"+DosageKindObj.OperateDate+"'"); - strSql.Append(" where Id="+DosageKindObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.DosageKind GetModel(int Id) - { - Model.DosageKind DosageKindObj = new Model.DosageKind(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from DosageKind "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - DosageKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DosageKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - DosageKindObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - DosageKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DosageKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DosageKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - DosageKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DosageKindObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM DosageKind "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/DosageUnitDB.cs b/AIMSEntity/OldEntity/DAL/DosageUnitDB.cs deleted file mode 100644 index 09017c8..0000000 --- a/AIMSEntity/OldEntity/DAL/DosageUnitDB.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class DosageUnitDB - { - public void Add(Model.DosageUnit DosageUnitObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [DosageUnit]("); - strSql.Append("Name,HelpCode,UnitType,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+DosageUnitObj.Name+"',"); - strSql.Append("'"+DosageUnitObj.HelpCode+"',"); - strSql.Append("'"+ DosageUnitObj.UnitType + "',"); - strSql.Append(""+DosageUnitObj.IsValid+","); - strSql.Append("'"+DosageUnitObj.OperatorNo+"',"); - strSql.Append("'"+DosageUnitObj.OperatorName+"',"); - strSql.Append("'"+DosageUnitObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.DosageUnit DosageUnitObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update DosageUnit set "); - strSql.Append("Name='"+DosageUnitObj.Name+"',"); - strSql.Append("HelpCode='"+DosageUnitObj.HelpCode+"',"); - strSql.Append("UnitType=" + DosageUnitObj.UnitType + ","); - strSql.Append("IsValid="+DosageUnitObj.IsValid+","); - strSql.Append("OperatorNo='"+DosageUnitObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+DosageUnitObj.OperatorName+"',"); - strSql.Append("OperateDate='"+DosageUnitObj.OperateDate+"'"); - strSql.Append(" where Id="+DosageUnitObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.DosageUnit GetModel(int Id) - { - Model.DosageUnit DosageUnitObj = new Model.DosageUnit(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,UnitType,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from DosageUnit "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - DosageUnitObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DosageUnitObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - DosageUnitObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - DosageUnitObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - - if (ds.Tables[0].Rows[0]["UnitType"].ToString() != "") - { - DosageUnitObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["UnitType"].ToString()); - } - - DosageUnitObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DosageUnitObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - DosageUnitObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DosageUnitObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM DosageUnit "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetDataTable(int UnitType) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM DosageUnit WHERE UnitType="+UnitType+" and IsValid=1"); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/DrugKindDB.cs b/AIMSEntity/OldEntity/DAL/DrugKindDB.cs deleted file mode 100644 index 6cf16fe..0000000 --- a/AIMSEntity/OldEntity/DAL/DrugKindDB.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class DrugKindDB - { - - public void Add(Model.DrugKind DrugKindObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [DrugKind]("); - strSql.Append("Name,MedicalItemKindId,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + DrugKindObj.Name + "',"); - strSql.Append("" + DrugKindObj.MedicalItemKindId + ","); - strSql.Append("" + DrugKindObj.IsValid + ","); - strSql.Append("'" + DrugKindObj.OperatorNo + "',"); - strSql.Append("'" + DrugKindObj.OperatorName + "',"); - strSql.Append("'" + DrugKindObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - - public void Update(Model.DrugKind DrugKindObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update DrugKind set "); - strSql.Append("Name='" + DrugKindObj.Name + "',"); - strSql.Append("MedicalItemKindId=" + DrugKindObj.MedicalItemKindId + ","); - strSql.Append("IsValid=" + DrugKindObj.IsValid + ","); - strSql.Append("OperatorNo='" + DrugKindObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + DrugKindObj.OperatorName + "',"); - strSql.Append("OperateDate='" + DrugKindObj.OperateDate + "'"); - strSql.Append(" where Id=" + DrugKindObj.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.DrugKind GetModel(int Id) - { - Model.DrugKind DrugKindObj = new Model.DrugKind(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,MedicalItemKindId,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from DrugKind "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - DrugKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DrugKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - - if(ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString()!="") - { - DrugKindObj.MedicalItemKindId = int.Parse(ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - DrugKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DrugKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DrugKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - DrugKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DrugKindObj; - } - - public List GetModelList() - { - Model.DrugKind DrugKindObj = new Model.DrugKind(); - List DrugKindListObj = new List(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,MedicalItemKindId,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from DrugKind "); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - - for (int i = 0; i < ds.Tables[0].Rows.Count; i++) - { - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - DrugKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DrugKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - - if (ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString() != "") - { - DrugKindObj.MedicalItemKindId = int.Parse(ds.Tables[0].Rows[0]["MedicalItemKindId"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - DrugKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DrugKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DrugKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - DrugKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - DrugKindListObj.Add(DrugKindObj); - } - return DrugKindListObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("SELECT dk.Id, dk.Name, mik.Name AS MedicalItemKindName,CASE dk.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid FROM DrugKind dk "); - strSql.Append(" LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId "); - - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetDataTable(string MedicalItemKindId) - { - string strSql = ""; - if (MedicalItemKindId != "") - { - strSql = "SELECT dk.Id, dk.Name, dk.MedicalItemKindId FROM DrugKind dk " + - "LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId WHERE dk.IsValid=1 and mik.Id ='" + MedicalItemKindId + "'"; - } - else - { - strSql = "SELECT dk.Id, dk.Name, dk.MedicalItemKindId FROM DrugKind dk " + - "LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId WHERE dk.IsValid=1 "; - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - - } -} diff --git a/AIMSEntity/OldEntity/DAL/DrugManufacturerDB.cs b/AIMSEntity/OldEntity/DAL/DrugManufacturerDB.cs deleted file mode 100644 index 45e56c7..0000000 --- a/AIMSEntity/OldEntity/DAL/DrugManufacturerDB.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class DrugManufacturerDB - { - public void Add(Model.DrugManufacturer DrugManufacturerObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [DrugManufacturer]("); - strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+DrugManufacturerObj.Name+"',"); - strSql.Append("'"+DrugManufacturerObj.HelpCode+"',"); - strSql.Append(""+DrugManufacturerObj.IsValid+","); - strSql.Append("'"+DrugManufacturerObj.OperatorNo+"',"); - strSql.Append("'"+DrugManufacturerObj.OperatorName+"',"); - strSql.Append("'"+DrugManufacturerObj.OperateDate+"'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.DrugManufacturer DrugManufacturerObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update DrugManufacturer set "); - strSql.Append("Name='"+DrugManufacturerObj.Name+"',"); - strSql.Append("HelpCode='"+DrugManufacturerObj.HelpCode+"',"); - strSql.Append("IsValid="+DrugManufacturerObj.IsValid+","); - strSql.Append("OperatorNo='"+DrugManufacturerObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+DrugManufacturerObj.OperatorName+"',"); - strSql.Append("OperateDate='"+DrugManufacturerObj.OperateDate+"'"); - strSql.Append(" where Id="+DrugManufacturerObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.DrugManufacturer GetModel(int Id) - { - Model.DrugManufacturer DrugManufacturerObj = new Model.DrugManufacturer(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from DrugManufacturer "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - DrugManufacturerObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DrugManufacturerObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - DrugManufacturerObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - DrugManufacturerObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DrugManufacturerObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DrugManufacturerObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - DrugManufacturerObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DrugManufacturerObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM DrugManufacturer "); - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetDataTable(string HelpCode) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("SELECT dm.Id, dm.Name FROM DrugManufacturer dm WHERE dm.Name LIKE '%" + HelpCode + "%' OR DM.HelpCode LIKE '%" + HelpCode + "%'"); - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/DrugsDB.cs b/AIMSEntity/OldEntity/DAL/DrugsDB.cs deleted file mode 100644 index aaa9821..0000000 --- a/AIMSEntity/OldEntity/DAL/DrugsDB.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class DrugsDB - { - public void Add(Model.Drugs DrugsObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [Drugs]("); - strSql.Append("Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + DrugsObj.Name + "',"); - strSql.Append("'" + DrugsObj.HelpCode + "',"); - strSql.Append("'" + DrugsObj.DrugKind + "',"); - strSql.Append("'" + DrugsObj.Stand + "',"); - strSql.Append("'" + DrugsObj.DosageUnit + "',"); - strSql.Append("'" + DrugsObj.Unit + "',"); - strSql.Append("" + DrugsObj.UseRate + ","); - strSql.Append("" + DrugsObj.IsValid + ","); - strSql.Append("'" + DrugsObj.OperatorNo + "',"); - strSql.Append("'" + DrugsObj.OperatorName + "',"); - strSql.Append("'" + DrugsObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - public void Update(Model.Drugs DrugsObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update Drugs set "); - strSql.Append("Name='" + DrugsObj.Name + "',"); - strSql.Append("HelpCode='" + DrugsObj.HelpCode + "',"); - strSql.Append("DrugKind='" + DrugsObj.DrugKind + "',"); - strSql.Append("Stand='" + DrugsObj.Stand + "',"); - strSql.Append("DosageUnit='" + DrugsObj.DosageUnit + "',"); - strSql.Append("Unit='" + DrugsObj.Unit + "',"); - strSql.Append("UseRate=" + DrugsObj.UseRate + ","); - strSql.Append("IsValid=" + DrugsObj.IsValid + ","); - strSql.Append("OperatorNo='" + DrugsObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + DrugsObj.OperatorName + "',"); - strSql.Append("OperateDate='" + DrugsObj.OperateDate + "'"); - strSql.Append(" where Id=" + DrugsObj.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - - public Model.Drugs GetModel(int Id) - { - Model.Drugs DrugsObj = new Model.Drugs(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,DrugKind,Stand,DosageUnit,Unit,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Drugs "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - DrugsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - DrugsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - DrugsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - DrugsObj.DrugKind = ds.Tables[0].Rows[0]["DrugKind"].ToString(); - DrugsObj.Stand = ds.Tables[0].Rows[0]["Stand"].ToString(); - DrugsObj.DosageUnit = ds.Tables[0].Rows[0]["DosageUnit"].ToString(); - DrugsObj.Unit = ds.Tables[0].Rows[0]["Unit"].ToString(); - if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") - { - DrugsObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - DrugsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - DrugsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - DrugsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - DrugsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return DrugsObj; - } - - public DataTable GetDataTable(string DrugKind) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[DrugKind],[Stand],[DosageUnit],[Unit],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM Drugs where DrugKind like '%" + DrugKind + "%'"); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - } - public DataTable GetDosageUnitDataTable(int UnitType) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE UnitType WHEN 1 THEN '剂量单位' when 2 then '包装单位' end as UnitType,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM DosageUnit WHERE UnitType=" + UnitType + " and IsValid=1"); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetDataTableByHelpCode(string HelpCode) - { - string strSql = "SELECT Id,Name,Stand,DosageUnit FROM dbo.Drugs WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetDrugsDataTable() - { - string strSql = "SELECT TOP 21 e.Id, e.Name FROM Drugs e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/EventsDB.cs b/AIMSEntity/OldEntity/DAL/EventsDB.cs deleted file mode 100644 index 04de076..0000000 --- a/AIMSEntity/OldEntity/DAL/EventsDB.cs +++ /dev/null @@ -1,171 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class EventsDB - { - public bool IsExit(string Name) - { - - string strSql ="select * from Events where name ='"+Name+"'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - return true; - } - else - { - return false; - } - - } - public void Add(Model.Events EventsObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [Events]("); - strSql.Append("EventKind,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+EventsObj.EventKind+"',"); - strSql.Append("'"+EventsObj.Name+"',"); - strSql.Append("'"+EventsObj.HelpCode+"',"); - strSql.Append("" + EventsObj.UseRate + ","); - strSql.Append("" + EventsObj.IsValid + ","); - strSql.Append("'" + EventsObj.OperatorNo + "',"); - strSql.Append("'"+EventsObj.OperatorName+"',"); - strSql.Append("'" + EventsObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - - public void Update(Model.Events EventsObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update Events set "); - strSql.Append("EventKind='"+EventsObj.EventKind+"',"); - strSql.Append("Name='"+EventsObj.Name+"',"); - strSql.Append("HelpCode='"+EventsObj.HelpCode+"',"); - strSql.Append("UseRate="+EventsObj.UseRate+","); - strSql.Append("IsValid="+EventsObj.IsValid+","); - strSql.Append("OperatorNo='"+EventsObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+EventsObj.OperatorName+"',"); - strSql.Append("OperateDate='"+EventsObj.OperateDate+"'"); - strSql.Append(" where Id="+EventsObj.Id+" "); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void UpdateUseRate(int Id) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update Events set "); - strSql.Append("UseRate= UseRate + 1"); - strSql.Append(" where Id=" + Id + " "); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int Id) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete Events "); - strSql.Append(" where Id="+Id+"" ); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.Events GetModel(int Id) - { - Model.Events EventsObj = new Model.Events(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,EventKind,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Events "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - EventsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - EventsObj.EventKind = ds.Tables[0].Rows[0]["EventKind"].ToString(); - EventsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - EventsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["UseRate"].ToString()!="") - { - EventsObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - EventsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - EventsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - EventsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - EventsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return EventsObj; - } - - public Model.Events GetModelByName(string Name) - { - Model.Events EventsObj = new Model.Events(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select top 1 "); - strSql.Append("Id,EventKind,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Events "); - strSql.Append(" where Name='" + Name + "'"); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - EventsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - EventsObj.EventKind = ds.Tables[0].Rows[0]["EventKind"].ToString(); - EventsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - EventsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") - { - EventsObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - EventsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - EventsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - EventsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - EventsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return EventsObj; - } - public DataTable GetDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id], EventKind,[Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM Events "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetDataTable(string HelpCode) - { - string strSql = "SELECT Id,Name FROM dbo.Events WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetEventDataTable() - { - string strSql = "SELECT TOP 17 e.Id, e.Name FROM Events e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/MedicalDictDB.cs b/AIMSEntity/OldEntity/DAL/MedicalDictDB.cs deleted file mode 100644 index 990b539..0000000 --- a/AIMSEntity/OldEntity/DAL/MedicalDictDB.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class MedicalDictDB - { - public void Add(Model.MedicalDict MedicalDictObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [MedicalDict]("); - strSql.Append("No,Name,HelpCode,DrugKindId,DosageKindId,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+MedicalDictObj.No+"',"); - strSql.Append("'"+MedicalDictObj.Name+"',"); - strSql.Append("'"+MedicalDictObj.HelpCode+"',"); - strSql.Append(""+MedicalDictObj.DrugKindId+","); - strSql.Append(""+MedicalDictObj.DosageKindId+","); - strSql.Append("'" + MedicalDictObj.IsValid + "',"); - strSql.Append("'"+MedicalDictObj.OperatorNo+"',"); - strSql.Append("'"+MedicalDictObj.OperatorName+"',"); - strSql.Append("'"+MedicalDictObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.MedicalDict MedicalDictObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update MedicalDict set "); - strSql.Append("No='"+MedicalDictObj.No+"',"); - strSql.Append("Name='"+MedicalDictObj.Name+"',"); - strSql.Append("HelpCode='"+MedicalDictObj.HelpCode+"',"); - strSql.Append("DrugKindId="+MedicalDictObj.DrugKindId+","); - strSql.Append("DosageKindId="+MedicalDictObj.DosageKindId+","); - strSql.Append("IsValid='" + MedicalDictObj.IsValid + "',"); - strSql.Append("OperatorNo='"+MedicalDictObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+MedicalDictObj.OperatorName+"',"); - strSql.Append("OperateDate='"+MedicalDictObj.OperateDate+"'"); - strSql.Append(" where Id="+MedicalDictObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.MedicalDict GetModel(int Id) - { - Model.MedicalDict MedicalDictObj = new Model.MedicalDict(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,No,Name,HelpCode,DrugKindId,DosageKindId,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from MedicalDict "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - MedicalDictObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - MedicalDictObj.No = ds.Tables[0].Rows[0]["No"].ToString(); - MedicalDictObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - MedicalDictObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["DrugKindId"].ToString()!="") - { - MedicalDictObj.DrugKindId = int.Parse(ds.Tables[0].Rows[0]["DrugKindId"].ToString()); - } - if(ds.Tables[0].Rows[0]["DosageKindId"].ToString()!="") - { - MedicalDictObj.DosageKindId = int.Parse(ds.Tables[0].Rows[0]["DosageKindId"].ToString()); - } - MedicalDictObj.IsValid =int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - MedicalDictObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - MedicalDictObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - MedicalDictObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return MedicalDictObj; - } - - public DataTable GetDataTable(int DrugKindId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("SELECT md.Id,md.No, md.Name, md.HelpCode,dk.Name AS DrugKindName,dk2.Name AS DosageKindName ,"); - strSql.Append(" CASE md.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM MedicalDict md "); - strSql.Append(" LEFT JOIN DrugKind dk ON dk.Id= md.DrugKindId "); - strSql.Append(" LEFT JOIN DosageKind dk2 ON dk2.Id =md.DosageKindId "); - strSql.Append(" WHERE md.DrugKindId="+DrugKindId+""); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetDataTableByName(string Name) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("SELECT md.Id,md.No, md.Name, md.HelpCode, mik.Name AS MedicalItemKindName,dk.Name AS DrugKindName,dk2.Name AS DosageKindName ,"); - strSql.Append(" CASE md.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM MedicalDict md "); - strSql.Append(" LEFT JOIN DrugKind dk ON dk.Id= md.DrugKindId "); - strSql.Append(" LEFT JOIN DosageKind dk2 ON dk2.Id =md.DosageKindId "); - strSql.Append(" LEFT JOIN MedicalItemKind mik ON mik.Id = dk.MedicalItemKindId "); - strSql.Append(" WHERE (md.Name like '%" + Name + "%') or (md.HelpCode like '%" + Name + "%')"); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - - public bool Exists(string No) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select count(*) AS RowsCount from MedicalDict where No='" + No + "'"); - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - if (int.Parse(dt.Rows[0]["RowsCount"].ToString()) > 0) - { - return true; - } - else - { - return false; - } - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/MedicalItemDB.cs b/AIMSEntity/OldEntity/DAL/MedicalItemDB.cs deleted file mode 100644 index 0abf605..0000000 --- a/AIMSEntity/OldEntity/DAL/MedicalItemDB.cs +++ /dev/null @@ -1,207 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class MedicalItemDB - { - public bool Exists(string No) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select count(1) from MedicalItem where No="+No+""); - return HelperDB.DbHelperSQL.Exists(strSql.ToString()); - } - - public void Add(Model.MedicalItem MedicalItemObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [MedicalItem]("); - strSql.Append("No,Name,HelpCode,MedicalItemAlias,MedicalItemAliasHelpCode,RetailPrice,DosageKindId,Stand,BarCode,MedicalDictNo,DrugKindId,PharmaCologyId,InsuranceKind,InsuranceKindNH,Antibiotics,IsSkintest,Dosage,DosageUnit,PackingUnit,SplitUnit,Quotiety,IsValid,Remark,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+MedicalItemObj.No+"',"); - strSql.Append("'"+MedicalItemObj.Name+"',"); - strSql.Append("'"+MedicalItemObj.HelpCode+"',"); - strSql.Append("'"+MedicalItemObj.MedicalItemAlias+"',"); - strSql.Append("'"+MedicalItemObj.MedicalItemAliasHelpCode+"',"); - strSql.Append(""+MedicalItemObj.RetailPrice+","); - strSql.Append(""+MedicalItemObj.DosageKindId+","); - strSql.Append("'"+MedicalItemObj.Stand+"',"); - strSql.Append("'"+MedicalItemObj.BarCode+"',"); - strSql.Append("'"+MedicalItemObj.MedicalDictNo+"',"); - strSql.Append(""+MedicalItemObj.DrugKindId+","); - strSql.Append(""+MedicalItemObj.PharmaCologyId+","); - strSql.Append("'"+MedicalItemObj.InsuranceKind+"',"); - strSql.Append("'"+MedicalItemObj.InsuranceKindNH+"',"); - strSql.Append("'"+MedicalItemObj.Antibiotics+"',"); - strSql.Append(""+MedicalItemObj.IsSkintest+","); - strSql.Append(""+MedicalItemObj.Dosage+","); - strSql.Append("'"+MedicalItemObj.DosageUnit+"',"); - strSql.Append("'"+MedicalItemObj.PackingUnit+"',"); - strSql.Append("'"+MedicalItemObj.SplitUnit+"',"); - strSql.Append(""+MedicalItemObj.Quotiety+","); - strSql.Append(""+MedicalItemObj.IsValid+","); - strSql.Append("'"+MedicalItemObj.Remark+"',"); - strSql.Append("'"+MedicalItemObj.OperatorNo+"',"); - strSql.Append("'"+MedicalItemObj.OperatorName+"',"); - strSql.Append("'"+MedicalItemObj.OperateDate+"'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.MedicalItem MedicalItemObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update MedicalItem set "); - strSql.Append("No='"+MedicalItemObj.No+"',"); - strSql.Append("Name='"+MedicalItemObj.Name+"',"); - strSql.Append("HelpCode='"+MedicalItemObj.HelpCode+"',"); - strSql.Append("MedicalItemAlias='"+MedicalItemObj.MedicalItemAlias+"',"); - strSql.Append("MedicalItemAliasHelpCode='"+MedicalItemObj.MedicalItemAliasHelpCode+"',"); - strSql.Append("RetailPrice="+MedicalItemObj.RetailPrice+","); - strSql.Append("DosageKindId="+MedicalItemObj.DosageKindId+","); - strSql.Append("Stand='"+MedicalItemObj.Stand+"',"); - strSql.Append("BarCode='"+MedicalItemObj.BarCode+"',"); - strSql.Append("MedicalDictNo='"+MedicalItemObj.MedicalDictNo+"',"); - strSql.Append("DrugKindId="+MedicalItemObj.DrugKindId+","); - strSql.Append("PharmaCologyId="+MedicalItemObj.PharmaCologyId+","); - strSql.Append("InsuranceKind='"+MedicalItemObj.InsuranceKind+"',"); - strSql.Append("InsuranceKindNH='"+MedicalItemObj.InsuranceKindNH+"',"); - strSql.Append("Antibiotics='"+MedicalItemObj.Antibiotics+"',"); - strSql.Append("IsSkintest="+MedicalItemObj.IsSkintest+","); - strSql.Append("Dosage="+MedicalItemObj.Dosage+","); - strSql.Append("DosageUnit='"+MedicalItemObj.DosageUnit+"',"); - strSql.Append("PackingUnit='"+MedicalItemObj.PackingUnit+"',"); - strSql.Append("SplitUnit='"+MedicalItemObj.SplitUnit+"',"); - strSql.Append("Quotiety="+MedicalItemObj.Quotiety+","); - strSql.Append("IsValid="+MedicalItemObj.IsValid+","); - strSql.Append("Remark='"+MedicalItemObj.Remark+"',"); - strSql.Append("OperatorNo='"+MedicalItemObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+MedicalItemObj.OperatorName+"',"); - strSql.Append("OperateDate='"+MedicalItemObj.OperateDate+"'"); - strSql.Append(" where Id="+MedicalItemObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.MedicalItem GetModel(int Id) - { - Model.MedicalItem MedicalItemObj = new Model.MedicalItem(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,No,Name,HelpCode,MedicalItemAlias,MedicalItemAliasHelpCode,RetailPrice,DosageKindId,Stand,BarCode,MedicalDictNo,DrugKindId,PharmaCologyId,InsuranceKind,InsuranceKindNH,Antibiotics,IsSkintest,Dosage,DosageUnit,PackingUnit,SplitUnit,Quotiety,IsValid,Remark,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from MedicalItem "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - MedicalItemObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - MedicalItemObj.No = ds.Tables[0].Rows[0]["No"].ToString(); - MedicalItemObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - MedicalItemObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - MedicalItemObj.MedicalItemAlias = ds.Tables[0].Rows[0]["MedicalItemAlias"].ToString(); - MedicalItemObj.MedicalItemAliasHelpCode = ds.Tables[0].Rows[0]["MedicalItemAliasHelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["RetailPrice"].ToString()!="") - { - MedicalItemObj.RetailPrice = decimal.Parse(ds.Tables[0].Rows[0]["RetailPrice"].ToString()); - } - if(ds.Tables[0].Rows[0]["DosageKindId"].ToString()!="") - { - MedicalItemObj.DosageKindId = int.Parse(ds.Tables[0].Rows[0]["DosageKindId"].ToString()); - } - MedicalItemObj.Stand = ds.Tables[0].Rows[0]["Stand"].ToString(); - MedicalItemObj.BarCode = ds.Tables[0].Rows[0]["BarCode"].ToString(); - MedicalItemObj.MedicalDictNo = ds.Tables[0].Rows[0]["MedicalDictNo"].ToString(); - if(ds.Tables[0].Rows[0]["DrugKindId"].ToString()!="") - { - MedicalItemObj.DrugKindId = int.Parse(ds.Tables[0].Rows[0]["DrugKindId"].ToString()); - } - if(ds.Tables[0].Rows[0]["PharmaCologyId"].ToString()!="") - { - MedicalItemObj.PharmaCologyId = int.Parse(ds.Tables[0].Rows[0]["PharmaCologyId"].ToString()); - } - MedicalItemObj.InsuranceKind = ds.Tables[0].Rows[0]["InsuranceKind"].ToString(); - MedicalItemObj.InsuranceKindNH = ds.Tables[0].Rows[0]["InsuranceKindNH"].ToString(); - MedicalItemObj.Antibiotics = ds.Tables[0].Rows[0]["Antibiotics"].ToString(); - if(ds.Tables[0].Rows[0]["IsSkintest"].ToString()!="") - { - MedicalItemObj.IsSkintest = int.Parse(ds.Tables[0].Rows[0]["IsSkintest"].ToString()); - } - if(ds.Tables[0].Rows[0]["Dosage"].ToString()!="") - { - MedicalItemObj.Dosage = decimal.Parse(ds.Tables[0].Rows[0]["Dosage"].ToString()); - } - MedicalItemObj.DosageUnit = ds.Tables[0].Rows[0]["DosageUnit"].ToString(); - MedicalItemObj.PackingUnit = ds.Tables[0].Rows[0]["PackingUnit"].ToString(); - MedicalItemObj.SplitUnit = ds.Tables[0].Rows[0]["SplitUnit"].ToString(); - if(ds.Tables[0].Rows[0]["Quotiety"].ToString()!="") - { - MedicalItemObj.Quotiety = int.Parse(ds.Tables[0].Rows[0]["Quotiety"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - MedicalItemObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - MedicalItemObj.Remark = ds.Tables[0].Rows[0]["Remark"].ToString(); - MedicalItemObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - MedicalItemObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - MedicalItemObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return MedicalItemObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[No],[Name],[HelpCode],[MedicalItemAlias],[MedicalItemAliasHelpCode],[RetailPrice],[DosageKindId],[Stand],[BarCode],[MedicalDictNo],[DrugKindId],[PharmaCologyId],[InsuranceKind],[InsuranceKindNH],[Antibiotics],[IsSkintest],[Dosage],[DosageUnit],[PackingUnit],[SplitUnit],[Quotiety],[IsValid],[Remark],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM MedicalItem "); - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetMedicalItemDrugDataTable(string HelpCode, int IsValid) - { - string strSql = "SELECT mi.Id, mi.No, mi.Name,mi.MedicalItemAlias,mi.Stand,dk.Name AS DosageKindName,mi.BarCode,mi.MedicalDictNo, " + - "dk2.Name AS DrugKindName,pc.Name AS PharmaCologyName,mi.InsuranceKind,mi.InsuranceKindNH, " + - "mi.Antibiotics,CASE mi.IsSkintest WHEN 0 THEN '非皮试' WHEN 1 THEN '皮试' end as IsSkintest, " + - "mi.Dosage,mi.DosageUnit,mi.PackingUnit,mi.SplitUnit,mi.Quotiety,mi.Remark," + - "CASE mi.IsValid WHEN 0 THEN '无效' WHEN 1 THEN '有效' end as IsValid FROM MedicalItem mi " + - "LEFT JOIN DosageKind dk ON dk.Id =mi.DosageKindId " + - "LEFT JOIN DrugKind dk2 ON dk2.Id =mi.DrugKindId " + - "LEFT JOIN PharmaCology pc ON pc.Id =mi.PharmaCologyId " + - "WHERE mi.IsValid ='" + IsValid + "' and ((mi.Name LIKE '%" + HelpCode + "%') OR (mi.HelpCode LIKE '%" + HelpCode + "%') OR (mi.MedicalItemAlias LIKE '%" + HelpCode + "%') OR (mi.MedicalItemAliasHelpCode LIKE '%" + HelpCode + "%')) "; - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetMedicalItemByDrugKindId(int DrugKindId) - { - string strSql = "SELECT mi.Id, mi.No, mi.Name,mi.MedicalItemAlias,mi.Stand,dk.Name AS DosageKindName,mi.BarCode,mi.MedicalDictNo, " + - "dk2.Name AS DrugKindName,pc.Name AS PharmaCologyName,mi.InsuranceKind,mi.InsuranceKindNH, " + - "mi.Antibiotics,CASE mi.IsSkintest WHEN 0 THEN '非皮试' WHEN 1 THEN '皮试' end as IsSkintest, " + - "mi.Dosage,mi.DosageUnit,mi.PackingUnit,mi.SplitUnit,mi.Quotiety,mi.Remark," + - "CASE mi.IsValid WHEN 0 THEN '无效' WHEN 1 THEN '有效' end as IsValid FROM MedicalItem mi " + - "LEFT JOIN DosageKind dk ON dk.Id =mi.DosageKindId " + - "LEFT JOIN DrugKind dk2 ON dk2.Id =mi.DrugKindId " + - "LEFT JOIN PharmaCology pc ON pc.Id =mi.PharmaCologyId " + - "WHERE mi.DrugKindId ='" + DrugKindId + "'"; - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - - public int GetMedicalItemByDictNo(string MedicalDictNo) - { - string strSql = "SELECT COUNT(*) RowsCount FROM MedicalItem mi WHERE mi.MedicalDictNo='" + MedicalDictNo + "'"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - return int.Parse(dt.Rows[0]["RowsCount"].ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/MedicalItemKindDB.cs b/AIMSEntity/OldEntity/DAL/MedicalItemKindDB.cs deleted file mode 100644 index c56f537..0000000 --- a/AIMSEntity/OldEntity/DAL/MedicalItemKindDB.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; - - -namespace DataDictionary.DAL -{ - public class MedicalItemKindDB - { - public void Add(Model.MedicalItemKind MedicalItemKindObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [MedicalItemKind]("); - strSql.Append("Name,IsMed,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+MedicalItemKindObj.Name+"',"); - strSql.Append("'"+MedicalItemKindObj.IsMed+"',"); - strSql.Append(""+MedicalItemKindObj.IsValid+","); - strSql.Append("'"+MedicalItemKindObj.OperatorNo+"',"); - strSql.Append("'"+MedicalItemKindObj.OperatorName+"',"); - strSql.Append("'"+MedicalItemKindObj.OperateDate+"'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.MedicalItemKind MedicalItemKindObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update MedicalItemKind set "); - strSql.Append("Name='"+MedicalItemKindObj.Name+"',"); - strSql.Append("IsMed='"+MedicalItemKindObj.IsMed+"',"); - strSql.Append("IsValid="+MedicalItemKindObj.IsValid+","); - strSql.Append("OperatorNo='"+MedicalItemKindObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+MedicalItemKindObj.OperatorName+"',"); - strSql.Append("OperateDate='"+MedicalItemKindObj.OperateDate+"'"); - strSql.Append(" where Id="+MedicalItemKindObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.MedicalItemKind GetModel(int Id) - { - Model.MedicalItemKind MedicalItemKindObj = new Model.MedicalItemKind(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,IsMed,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from MedicalItemKind "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - MedicalItemKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - MedicalItemKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - MedicalItemKindObj.IsMed = ds.Tables[0].Rows[0]["IsMed"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - MedicalItemKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - MedicalItemKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - MedicalItemKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - MedicalItemKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return MedicalItemKindObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],CASE IsMed WHEN 1 THEN '药品' WHEN 0 THEN '非药品' END AS IsMed,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM MedicalItemKind "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetTreeViewDataTable() - { - string strSql = "SELECT dk.Id, dk.Name,mik.Name AS MedicalItemKindName FROM DrugKind dk " + - "LEFT JOIN MedicalItemKind mik ON mik.Id =dk.MedicalItemKindId " + - "WHERE mik.IsMed=1 AND dk.IsValid=1 "; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/MedicamentPriceDB.cs b/AIMSEntity/OldEntity/DAL/MedicamentPriceDB.cs deleted file mode 100644 index 98550f8..0000000 --- a/AIMSEntity/OldEntity/DAL/MedicamentPriceDB.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class MedicamentPriceDB - { - public bool Exists(int Id) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select count(1) from MedicamentPrice where Id="+Id+"" ); - return HelperDB.DbHelperSQL.Exists(strSql.ToString()); - } - - public void Add(Model.MedicamentPrice MedicamentPriceObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [MedicamentPrice]("); - strSql.Append("DrugManufacturerId,MedicalItemId,PurchasePrice,TradePrice,RetailPrice,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+MedicamentPriceObj.DrugManufacturerId+","); - strSql.Append(""+MedicamentPriceObj.MedicalItemId+","); - strSql.Append(""+MedicamentPriceObj.PurchasePrice+","); - strSql.Append(""+MedicamentPriceObj.TradePrice+","); - strSql.Append(""+MedicamentPriceObj.RetailPrice+","); - strSql.Append(""+MedicamentPriceObj.IsValid+","); - strSql.Append("'"+MedicamentPriceObj.OperatorNo+"',"); - strSql.Append("'"+MedicamentPriceObj.OperatorName+"',"); - strSql.Append("'"+MedicamentPriceObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.MedicamentPrice MedicamentPricObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update MedicamentPrice set "); - strSql.Append("IsValid="+MedicamentPricObj.IsValid+","); - strSql.Append("OperatorNo='"+MedicamentPricObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+MedicamentPricObj.OperatorName+"',"); - strSql.Append("OperateDate='"+MedicamentPricObj.OperateDate+"'"); - strSql.Append(" where Id="+MedicamentPricObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.MedicamentPrice GetModel(int Id) - { - Model.MedicamentPrice MedicamentPriceObj = new Model.MedicamentPrice(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,DrugManufacturerId,MedicalItemId,PurchasePrice,TradePrice,RetailPrice,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from MedicamentPrice "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - MedicamentPriceObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["DrugManufacturerId"].ToString()!="") - { - MedicamentPriceObj.DrugManufacturerId = int.Parse(ds.Tables[0].Rows[0]["DrugManufacturerId"].ToString()); - } - if(ds.Tables[0].Rows[0]["MedicalItemId"].ToString()!="") - { - MedicamentPriceObj.MedicalItemId = int.Parse(ds.Tables[0].Rows[0]["MedicalItemId"].ToString()); - } - if(ds.Tables[0].Rows[0]["PurchasePrice"].ToString()!="") - { - MedicamentPriceObj.PurchasePrice = decimal.Parse(ds.Tables[0].Rows[0]["PurchasePrice"].ToString()); - } - if(ds.Tables[0].Rows[0]["TradePrice"].ToString()!="") - { - MedicamentPriceObj.TradePrice = decimal.Parse(ds.Tables[0].Rows[0]["TradePrice"].ToString()); - } - if(ds.Tables[0].Rows[0]["RetailPrice"].ToString()!="") - { - MedicamentPriceObj.RetailPrice = decimal.Parse(ds.Tables[0].Rows[0]["RetailPrice"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - MedicamentPriceObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - MedicamentPriceObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - MedicamentPriceObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - MedicamentPriceObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return MedicamentPriceObj; - } - - - public DataTable GetDataTable(int MedicalItemId) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("SELECT mp.Id, mi.No,mi.Name,dm.Name AS DrugManufacturerName,mp.PurchasePrice, mp.TradePrice, mp.RetailPrice, CASE mp.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append("FROM MedicamentPrice mp "); - strSql.Append("LEFT JOIN DrugManufacturer dm ON dm.Id =mp.DrugManufacturerId "); - strSql.Append("LEFT JOIN MedicalItem mi ON mi.Id = mp.MedicalItemId WHERE MedicalItemId =" + MedicalItemId + " "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/MenuDB.cs b/AIMSEntity/OldEntity/DAL/MenuDB.cs deleted file mode 100644 index 5678655..0000000 --- a/AIMSEntity/OldEntity/DAL/MenuDB.cs +++ /dev/null @@ -1,429 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -using HelperDB; -namespace AIMS.PublicUI.DAL -{ - public class MenuDB : DbHelperSQL - { - public void Add(Model.Menu MenuObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [Menu]("); - strSql.Append("Name,Path,ParentId,IsValid,MenuOrder,IsAloneOpen,ImgPath,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + MenuObj.Name + "',"); - strSql.Append("'" + MenuObj.Path + "',"); - strSql.Append("" + MenuObj.ParentId + ","); - strSql.Append("" + MenuObj.IsValid + ","); - strSql.Append("" + MenuObj.MenuOrder + ","); - strSql.Append("" + MenuObj.IsAloneOpen + ","); - strSql.Append("'" + MenuObj.ImgPath + "',"); - strSql.Append("'" + MenuObj.OperatorNo + "',"); - strSql.Append("'" + MenuObj.OperatorName + "',"); - strSql.Append("'" + MenuObj.OperateDate + "'"); - strSql.Append(")"); - strSql.Append(";select @@IDENTITY"); - DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void Update(Model.Menu MenuObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update Menu set "); - strSql.Append("Name='" + MenuObj.Name + "',"); - strSql.Append("Path='" + MenuObj.Path + "',"); - strSql.Append("ParentId=" + MenuObj.ParentId + ","); - strSql.Append("IsValid=" + MenuObj.IsValid + ","); - strSql.Append("MenuOrder=" + MenuObj.MenuOrder + ","); - strSql.Append("IsAloneOpen=" + MenuObj.IsAloneOpen + ","); - strSql.Append("ImgPath='" + MenuObj.ImgPath + "',"); - strSql.Append("OperatorNo='" + MenuObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + MenuObj.OperatorName + "',"); - strSql.Append("OperateDate='" + MenuObj.OperateDate + "'"); - strSql.Append(" where Id=" + MenuObj.Id + " "); - DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void Delete(int Id) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("delete Menu "); - strSql.Append(" where Id=" + Id + ""); - DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public Model.Menu GetModel(int Id) - { - Model.Menu MenuObj = new Model.Menu(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,Path,ParentId,IsValid,MenuOrder,IsAloneOpen,ImgPath,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Menu "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - MenuObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - MenuObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - MenuObj.Path = ds.Tables[0].Rows[0]["Path"].ToString(); - if (ds.Tables[0].Rows[0]["ParentId"].ToString() != "") - { - MenuObj.ParentId = int.Parse(ds.Tables[0].Rows[0]["ParentId"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - MenuObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - if (ds.Tables[0].Rows[0]["MenuOrder"].ToString() != "") - { - MenuObj.MenuOrder = int.Parse(ds.Tables[0].Rows[0]["MenuOrder"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsAloneOpen"].ToString() != "") - { - MenuObj.IsAloneOpen = int.Parse(ds.Tables[0].Rows[0]["IsAloneOpen"].ToString()); - } - if (ds.Tables[0].Rows[0]["ImgPath"].ToString() != "") - { - MenuObj.ImgPath = string.Format(ds.Tables[0].Rows[0]["ImgPath"].ToString()); - } - MenuObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - MenuObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - MenuObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return MenuObj; - } - - public DataTable GetDateTable(string strWhere) - { - - StringBuilder strSql = new StringBuilder(); - strSql.Append("SELECT Id, Name, [Path], ParentId, CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid,"); - strSql.Append("MenuOrder,CASE IsAloneOpen WHEN 1 THEN '是' WHEN 0 THEN '否' END AS IsAloneOpen,ImgPath FROM dbo.Menu "); - if (strWhere.Trim() != "") - { - - strSql.Append(" where " + strWhere); - } - return DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetModelList() - { - List MenuListObj = new List(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,Path,ParentId,IsValid,MenuOrder,IsAloneOpen,ImgPath,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Menu where IsValid =1"); - DataTable ds = GetDataTable(strSql.ToString()); - - for (int i = 0; i < ds.Rows.Count; i++) - { - Model.Menu MenuObj = new Model.Menu(); - if (ds.Rows[i]["Id"].ToString() != "") - { - MenuObj.Id = int.Parse(ds.Rows[i]["Id"].ToString()); - } - MenuObj.Name = ds.Rows[i]["Name"].ToString(); - MenuObj.Path = ds.Rows[i]["Path"].ToString(); - if (ds.Rows[i]["ParentId"].ToString() != "") - { - MenuObj.ParentId = int.Parse(ds.Rows[i]["ParentId"].ToString()); - } - if (ds.Rows[i]["IsValid"].ToString() != "") - { - MenuObj.IsValid = int.Parse(ds.Rows[i]["IsValid"].ToString()); - } - if (ds.Rows[i]["MenuOrder"].ToString() != "") - { - MenuObj.MenuOrder = int.Parse(ds.Rows[i]["MenuOrder"].ToString()); - } - if (ds.Rows[i]["IsAloneOpen"].ToString() != "") - { - MenuObj.IsAloneOpen = int.Parse(ds.Rows[i]["IsAloneOpen"].ToString()); - } - if (ds.Rows[i]["ImgPath"].ToString() != "") - { - MenuObj.ImgPath = string.Format(ds.Rows[i]["ImgPath"].ToString()); - } - MenuObj.OperatorNo = ds.Rows[i]["OperatorNo"].ToString(); - MenuObj.OperatorName = ds.Rows[i]["OperatorName"].ToString(); - if (ds.Rows[i]["OperateDate"].ToString() != "") - { - MenuObj.OperateDate = DateTime.Parse(ds.Rows[i]["OperateDate"].ToString()); - } - MenuListObj.Add(MenuObj); - } - - return MenuListObj; - } - - - public List GetModelList_FSB(int RoleId) - { - List MenuListObj = new List(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("m.Id,m.Name,m.Path,m.ParentId,m.IsValid,m.MenuOrder,m.IsAloneOpen,m.ImgPath,m.OperatorNo,m.OperatorName,m.OperateDate "); - strSql.Append(" from Menu m "); - strSql.Append(" LEFT JOIN UserPurview up ON up.MenuId = m.Id where m.IsValid =1 AND up.RoleId=" + RoleId + " "); - DataTable ds = GetDataTable(strSql.ToString()); - - for (int i = 0; i < ds.Rows.Count; i++) - { - Model.Menu MenuObj = new Model.Menu(); - if (ds.Rows[i]["Id"].ToString() != "") - { - MenuObj.Id = int.Parse(ds.Rows[i]["Id"].ToString()); - } - MenuObj.Name = ds.Rows[i]["Name"].ToString(); - MenuObj.Path = ds.Rows[i]["Path"].ToString(); - if (ds.Rows[i]["ParentId"].ToString() != "") - { - MenuObj.ParentId = int.Parse(ds.Rows[i]["ParentId"].ToString()); - } - if (ds.Rows[i]["IsValid"].ToString() != "") - { - MenuObj.IsValid = int.Parse(ds.Rows[i]["IsValid"].ToString()); - } - if (ds.Rows[i]["MenuOrder"].ToString() != "") - { - MenuObj.MenuOrder = int.Parse(ds.Rows[i]["MenuOrder"].ToString()); - } - if (ds.Rows[i]["IsAloneOpen"].ToString() != "") - { - MenuObj.IsAloneOpen = int.Parse(ds.Rows[i]["IsAloneOpen"].ToString()); - } - if (ds.Rows[i]["ImgPath"].ToString() != "") - { - MenuObj.ImgPath = string.Format(ds.Rows[i]["ImgPath"].ToString()); - } - MenuObj.OperatorNo = ds.Rows[i]["OperatorNo"].ToString(); - MenuObj.OperatorName = ds.Rows[i]["OperatorName"].ToString(); - if (ds.Rows[i]["OperateDate"].ToString() != "") - { - MenuObj.OperateDate = DateTime.Parse(ds.Rows[i]["OperateDate"].ToString()); - } - MenuListObj.Add(MenuObj); - } - - return MenuListObj; - } - - public List GetMenuRootList(int ParentId) - { - List MenuList = new List(); - - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,Path,ParentId,IsValid "); - strSql.Append(" from Menu "); - strSql.Append(" where ParentId=" + ParentId + " order by MenuOrder"); - - DataTable dt = DbHelperSQL.GetDataTable(strSql.ToString()); - - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Menu Menu = new Model.Menu(); - Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - Menu.Name = dt.Rows[i]["Name"].ToString(); - Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); - Menu.Path = dt.Rows[i]["Path"].ToString(); - MenuList.Add(Menu); - } - return MenuList; - } - - - public List GetMenuRootList(int RoleId, int ParentId) - { - List MenuList = new List(); - - StringBuilder strSql = new StringBuilder(); - strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); - strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); - strSql.Append("WHERE m.IsValid=1 AND up.RoleId=" + RoleId + " AND m.ParentId=" + ParentId + " order by MenuOrder"); - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Menu Menu = new Model.Menu(); - Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - Menu.Name = dt.Rows[i]["Name"].ToString(); - Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); - Menu.Path = dt.Rows[i]["Path"].ToString(); - MenuList.Add(Menu); - } - return MenuList; - } - public List GetMenuRootListManage(int RoleId, string ParentId) - { - List MenuList = new List(); - - StringBuilder strSql = new StringBuilder(); - strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); - strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); - strSql.Append("WHERE m.IsValid=1 AND m.ParentId in (" + ParentId + ") AND up.RoleId=" + RoleId + " order by MenuOrder");// - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Menu Menu = new Model.Menu(); - Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - Menu.Name = dt.Rows[i]["Name"].ToString(); - Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); - Menu.Path = dt.Rows[i]["Path"].ToString(); - MenuList.Add(Menu); - } - return MenuList; - } - public List GetMenuRootListManage(int RoleId) - { - List MenuList = new List(); - - StringBuilder strSql = new StringBuilder(); - strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); - strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); - strSql.Append("WHERE m.IsValid=1 AND up.RoleId=" + RoleId + "order by MenuOrder");// - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Menu Menu = new Model.Menu(); - Menu.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - Menu.Name = dt.Rows[i]["Name"].ToString(); - Menu.ParentId = int.Parse(dt.Rows[i]["ParentID"].ToString()); - Menu.Path = dt.Rows[i]["Path"].ToString(); - MenuList.Add(Menu); - } - return MenuList; - } - - public Model.Menu GetMenuById(int Id, int RoleId, int IsAll) - { - Model.Menu Menu = new Model.Menu(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,Path,ParentId,IsValid "); - strSql.Append(" from Menu "); - strSql.Append(" where Id=" + Id + " order by MenuOrder"); - - DataTable dt = GetDataTable(strSql.ToString()); - - if (dt.Rows.Count > 0) - { - if (dt.Rows[0]["Id"].ToString() != "") - { - Menu.Id = int.Parse(dt.Rows[0]["Id"].ToString()); - } - Menu.Name = dt.Rows[0]["Name"].ToString(); - Menu.Path = dt.Rows[0]["Path"].ToString(); - if (dt.Rows[0]["ParentId"].ToString() != "") - { - Menu.ParentId = int.Parse(dt.Rows[0]["ParentId"].ToString()); - } - if (dt.Rows[0]["IsValid"].ToString() != "") - { - Menu.IsValid = int.Parse(dt.Rows[0]["IsValid"].ToString()); - } - - Menu.Children = GetChildren(Menu, RoleId, IsAll); - } - return Menu; - } - - public Model.Menu GetMenuByName(string Name) - { - Model.Menu Menu = new Model.Menu(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,Path,ParentId,IsValid "); - strSql.Append(" from Menu "); - strSql.Append(" where Name='" + Name + "' order by MenuOrder"); - - DataTable dt = GetDataTable(strSql.ToString()); - - if (dt.Rows.Count > 0) - { - if (dt.Rows[0]["Id"].ToString() != "") - { - Menu.Id = int.Parse(dt.Rows[0]["Id"].ToString()); - } - Menu.Name = dt.Rows[0]["Name"].ToString(); - Menu.Path = dt.Rows[0]["Path"].ToString(); - if (dt.Rows[0]["ParentId"].ToString() != "") - { - Menu.ParentId = int.Parse(dt.Rows[0]["ParentId"].ToString()); - } - if (dt.Rows[0]["IsValid"].ToString() != "") - { - Menu.IsValid = int.Parse(dt.Rows[0]["IsValid"].ToString()); - } - - } - return Menu; - } - public List GetChildren(Model.Menu Menu, int RoleId, int IsAll) - { - List children = new List(); - StringBuilder strSql = new StringBuilder(); - - if (IsAll == 0) - { - strSql.Append("select m.Id,m.Name,m.Path,m.ParentId,m.IsValid from Menu m "); - strSql.Append("INNER JOIN UserPurview up ON up.MenuId =m.Id "); - strSql.Append("WHERE m.IsValid=1 AND up.RoleId=" + RoleId + " AND m.ParentId=" + Menu.Id + " and m.ParentId<>63 order by MenuOrder"); - } - if (IsAll == 1) - { - strSql.Append("SELECT * FROM Menu WHERE ParentId='" + Menu.Id + "' order by MenuOrder"); - } - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - if (dt.Rows.Count > 0) - { - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Menu MenuObj = new Model.Menu(); - MenuObj.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - MenuObj.Name = dt.Rows[i]["Name"].ToString(); - MenuObj.ParentId = int.Parse(dt.Rows[i]["ParentId"].ToString()); - MenuObj.Path = dt.Rows[i]["Path"].ToString(); - children.Add(MenuObj); - MenuObj.Children = GetChildren(MenuObj, RoleId, IsAll); - - } - } - return children; - } - - public Model.Menu GetPathByName(string Name) - { - Model.Menu MenuObj = new Model.Menu(); - string strSql = "select top 1 Path,IsAloneOpen from Menu where IsValid=1 and Name='" + Name + "'"; - - DataTable dt = GetDataTable(strSql.ToString()); - - if (dt.Rows.Count > 0) - { - MenuObj.Path = dt.Rows[0]["Path"].ToString(); - MenuObj.IsAloneOpen = int.Parse(dt.Rows[0]["IsAloneOpen"].ToString()); - } - return MenuObj; - } - - public DataTable GetMenuDataTable(int ParentId, int RoleId) - { - string strSql = " SELECT m.Id, m.Name,m.[Path] FROM UserPurview up LEFT JOIN [Role] r ON r.Id =up.RoleId " + - " LEFT JOIN Menu m ON m.Id =up.MenuId" + - " WHERE m.ParentId=" + ParentId + " AND up.RoleId=" + RoleId + " and m.Path!=''"; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/NoticeDB.cs b/AIMSEntity/OldEntity/DAL/NoticeDB.cs deleted file mode 100644 index 4cdddc7..0000000 --- a/AIMSEntity/OldEntity/DAL/NoticeDB.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.DAL -{ - public class NoticeDB - { - public List NoticeList() - { - List NoticeList = new List(); - string strSql = "SELECT pc.Id, pc.Contents" + "FROM Notice pc"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Notice Notice = new Model.Notice(); - Notice.Id = int.Parse(dt.Rows[i]["ID"].ToString()); - Notice.Contents = dt.Rows[i]["Contents"].ToString(); - NoticeList.Add(Notice); - } - return NoticeList; - } - public void Add(Model.Notice NoticeObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [NoticeTemplate]("); - strSql.Append("Contents,OperatorId,OperatorTime"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + NoticeObj.Contents + "',"); - strSql.Append("'" + AIMSExtension.PublicMethod.OperatorNo + "',"); - strSql.Append("'" + AIMSExtension.PublicMethod.SystemDate() + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public DataTable GetOperationList() - { - string strSql = "select ID,Contents from dbo.NoticeTemplate"; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - public DataTable GetOperation() - { - string strSql = "SELECT of1.MdrecNo,of1.PatientName FROM V_OperationFront of1 WHERE of1.[State]='手术中'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - public void Delete(int Id) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("delete NoticeTemplate "); - strSql.Append(" where Id=" + Id + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void sendout(Model.Notice NoticeObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [Notice]("); - strSql.Append("Contents,SendState,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + NoticeObj.Contents + "',"); - strSql.Append("'" + 1 + "',"); - strSql.Append("'" + AIMSExtension.PublicMethod.OperatorNo + "',"); - strSql.Append("'" + AIMSExtension.PublicMethod.OperatorName + "',"); - strSql.Append("'" + AIMSExtension.PublicMethod.SystemDate() + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public List HistoryNoticeData() - { - List NoticeList = new List(); - string strSql = "SELECT Id,Contents, OperatorTime " + " FROM [NoticeTemplate] order by OperatorTime desc "; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - for (int i = 0; i < dt.Rows.Count; i++) - { - Model.Notice Notice = new Model.Notice(); - Notice.Id = int.Parse(dt.Rows[i]["Id"].ToString()); - Notice.Contents = dt.Rows[i]["Contents"].ToString(); - Notice.OperateDate = DateTime.Parse(dt.Rows[i]["OperatorTime"].ToString()); - - NoticeList.Add(Notice); - } - return NoticeList; - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationBodyPositionDB.cs b/AIMSEntity/OldEntity/DAL/OperationBodyPositionDB.cs deleted file mode 100644 index dbfab49..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationBodyPositionDB.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class OperationBodyPositionDB - { - public void Add(Model.OperationBodyPosition OperationBodyPositionObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [OperationBodyPosition]("); - strSql.Append("Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + OperationBodyPositionObj.Name + "',"); - strSql.Append("'" + OperationBodyPositionObj.HelpCode + "',"); - strSql.Append("'" + OperationBodyPositionObj.Explain + "',"); - strSql.Append("" + OperationBodyPositionObj.PositionOrder + ","); - strSql.Append("" + OperationBodyPositionObj.IsValid + ","); - strSql.Append("'" + OperationBodyPositionObj.OperatorNo + "',"); - strSql.Append("'" + OperationBodyPositionObj.OperatorName + "',"); - strSql.Append("'" + OperationBodyPositionObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - - public void Update(Model.OperationBodyPosition OperationBodyPositionObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update OperationBodyPosition set "); - strSql.Append("Name='" + OperationBodyPositionObj.Name + "',"); - strSql.Append("HelpCode='" + OperationBodyPositionObj.HelpCode + "',"); - strSql.Append("Explain='" + OperationBodyPositionObj.Explain + "',"); - strSql.Append("PositionOrder=" + OperationBodyPositionObj.PositionOrder + ","); - strSql.Append("IsValid=" + OperationBodyPositionObj.IsValid + ","); - strSql.Append("OperatorNo='" + OperationBodyPositionObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + OperationBodyPositionObj.OperatorName + "',"); - strSql.Append("OperateDate='" + OperationBodyPositionObj.OperateDate + "'"); - strSql.Append(" where Id=" + OperationBodyPositionObj.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.OperationBodyPosition GetModel(int Id) - { - Model.OperationBodyPosition OperationBodyPositionObj = new Model.OperationBodyPosition(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OperationBodyPosition "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - OperationBodyPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationBodyPositionObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OperationBodyPositionObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - OperationBodyPositionObj.Explain = ds.Tables[0].Rows[0]["Explain"].ToString(); - if (ds.Tables[0].Rows[0]["PositionOrder"].ToString() != "") - { - OperationBodyPositionObj.PositionOrder = int.Parse(ds.Tables[0].Rows[0]["PositionOrder"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - OperationBodyPositionObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OperationBodyPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationBodyPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - OperationBodyPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationBodyPositionObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[Explain],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM OperationBodyPosition "); - if (strWhere.Trim() != "") - { - strSql.Append(" where " + strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationCutTypeDB.cs b/AIMSEntity/OldEntity/DAL/OperationCutTypeDB.cs deleted file mode 100644 index 26f1fe1..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationCutTypeDB.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class OperationCutTypeDB - { - public void Add(Model.OperationCutType OperationCutTypeObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [OperationCutType]("); - strSql.Append("Name,HelpCode,Explain,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+OperationCutTypeObj.Name+"',"); - strSql.Append("'"+OperationCutTypeObj.HelpCode+"',"); - strSql.Append("'"+OperationCutTypeObj.Explain+"',"); - strSql.Append(""+OperationCutTypeObj.IsValid+","); - strSql.Append("'"+OperationCutTypeObj.OperatorNo+"',"); - strSql.Append("'"+OperationCutTypeObj.OperatorName+"',"); - strSql.Append("'"+OperationCutTypeObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.OperationCutType OperationCutTypeObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update OperationCutType set "); - strSql.Append("Name='"+OperationCutTypeObj.Name+"',"); - strSql.Append("HelpCode='"+OperationCutTypeObj.HelpCode+"',"); - strSql.Append("Explain='"+OperationCutTypeObj.Explain+"',"); - strSql.Append("IsValid="+OperationCutTypeObj.IsValid+","); - strSql.Append("OperatorNo='"+OperationCutTypeObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+OperationCutTypeObj.OperatorName+"',"); - strSql.Append("OperateDate='"+OperationCutTypeObj.OperateDate+"'"); - strSql.Append(" where Id="+OperationCutTypeObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.OperationCutType GetModel(int Id) - { - Model.OperationCutType OperationCutTypeObj = new Model.OperationCutType(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Explain,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OperationCutType "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - OperationCutTypeObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationCutTypeObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OperationCutTypeObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - OperationCutTypeObj.Explain = ds.Tables[0].Rows[0]["Explain"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - OperationCutTypeObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OperationCutTypeObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationCutTypeObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - OperationCutTypeObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationCutTypeObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[Explain],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM OperationCutType "); - if(strWhere.Trim()!="") - { - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationDB.cs b/AIMSEntity/OldEntity/DAL/OperationDB.cs deleted file mode 100644 index 3736858..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationDB.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class OperationDB - { - - public bool IsExit(string Name) - { - - string strSql = "select * from Operation where name ='" + Name + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - return true; - } - else - { - return false; - } - } - public void Add(Model.Operation OperationObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [Operation]("); - strSql.Append("IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + OperationObj.IcdCode + "',"); - strSql.Append("'" + OperationObj.Name + "',"); - strSql.Append("'" + OperationObj.HelpCode + "',"); - strSql.Append("" + OperationObj.UseRate + ","); - strSql.Append("" + OperationObj.IsValid + ","); - strSql.Append("'" + OperationObj.OperatorNo + "',"); - strSql.Append("'" + OperationObj.OperatorName + "',"); - strSql.Append("'" + OperationObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.Operation OperationObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update Operation set "); - strSql.Append("IcdCode='" + OperationObj.IcdCode + "',"); - strSql.Append("Name='" + OperationObj.Name + "',"); - strSql.Append("HelpCode='" + OperationObj.HelpCode + "',"); - strSql.Append("IsValid=" + OperationObj.IsValid + ","); - strSql.Append("OperatorNo='" + OperationObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + OperationObj.OperatorName + "',"); - strSql.Append("OperateDate='" + OperationObj.OperateDate + "'"); - strSql.Append(" where Id=" + OperationObj.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.Operation GetModel(int Id) - { - Model.Operation OperationObj = new Model.Operation(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,IcdCode,Name,HelpCode,UseRate,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Operation "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - OperationObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationObj.IcdCode = ds.Tables[0].Rows[0]["IcdCode"].ToString(); - OperationObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OperationObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if (ds.Tables[0].Rows[0]["UseRate"].ToString() != "") - { - OperationObj.UseRate = int.Parse(ds.Tables[0].Rows[0]["UseRate"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - OperationObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OperationObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - OperationObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationObj; - } - - public DataTable GetDataTable(string HelpCode) - { - string strSql = ""; - if (HelpCode == "") - { - strSql = "SELECT TOP 75 d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 order by UseRate desc"; - } - else - { - strSql = "SELECT d.Id, d.IcdCode, d.Name FROM Operation d WHERE d.IsValid=1 AND (d.IcdCode LIKE '" + HelpCode + "%' OR d.Name LIKE '" + HelpCode + "%' OR d.HelpCode LIKE '" + HelpCode + "%') order by UseRate desc"; - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - - internal DataTable GetDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id], IcdCode,[Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM Operation "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationLevelDB.cs b/AIMSEntity/OldEntity/DAL/OperationLevelDB.cs deleted file mode 100644 index bb7dac1..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationLevelDB.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class OperationLevelDB - { - public void Add(Model.OperationLevel OperationLevelObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [OperationLevel]("); - strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+OperationLevelObj.Name+"',"); - strSql.Append("'"+OperationLevelObj.HelpCode+"',"); - strSql.Append(""+OperationLevelObj.IsValid+","); - strSql.Append("'"+OperationLevelObj.OperatorNo+"',"); - strSql.Append("'"+OperationLevelObj.OperatorName+"',"); - strSql.Append("'"+OperationLevelObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.OperationLevel OperationLevelObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update OperationLevel set "); - strSql.Append("Name='"+OperationLevelObj.Name+"',"); - strSql.Append("HelpCode='"+OperationLevelObj.HelpCode+"',"); - strSql.Append("IsValid="+OperationLevelObj.IsValid+","); - strSql.Append("OperatorNo='"+OperationLevelObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+OperationLevelObj.OperatorName+"',"); - strSql.Append("OperateDate='"+OperationLevelObj.OperateDate+"'"); - strSql.Append(" where Id="+OperationLevelObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.OperationLevel GetModel(int Id) - { - Model.OperationLevel OperationLevelObj = new Model.OperationLevel(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OperationLevel "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - OperationLevelObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationLevelObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OperationLevelObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - OperationLevelObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OperationLevelObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationLevelObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - OperationLevelObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationLevelObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM OperationLevel "); - if(strWhere.Trim()!="") - { - - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationPositionDB.cs b/AIMSEntity/OldEntity/DAL/OperationPositionDB.cs deleted file mode 100644 index fb3b545..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationPositionDB.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class OperationPositionDB - { - public void Add(Model.OperationPosition OperationPositionObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [OperationPosition]("); - strSql.Append("Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+OperationPositionObj.Name+"',"); - strSql.Append("'"+OperationPositionObj.HelpCode+"',"); - strSql.Append("'"+OperationPositionObj.Explain+"',"); - strSql.Append(""+OperationPositionObj.PositionOrder+","); - strSql.Append(""+OperationPositionObj.IsValid+","); - strSql.Append("'"+OperationPositionObj.OperatorNo+"',"); - strSql.Append("'"+OperationPositionObj.OperatorName+"',"); - strSql.Append("'"+OperationPositionObj.OperateDate+"'"); - strSql.Append(")"); - - } - - public void Update(Model.OperationPosition OperationPositionObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update OperationPosition set "); - strSql.Append("Name='"+OperationPositionObj.Name+"',"); - strSql.Append("HelpCode='"+OperationPositionObj.HelpCode+"',"); - strSql.Append("Explain='"+OperationPositionObj.Explain+"',"); - strSql.Append("PositionOrder="+OperationPositionObj.PositionOrder+","); - strSql.Append("IsValid="+OperationPositionObj.IsValid+","); - strSql.Append("OperatorNo='"+OperationPositionObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+OperationPositionObj.OperatorName+"',"); - strSql.Append("OperateDate='"+OperationPositionObj.OperateDate+"'"); - strSql.Append(" where Id="+OperationPositionObj.Id+" "); - - } - - public Model.OperationPosition GetModel(int Id) - { - Model.OperationPosition OperationPositionObj = new Model.OperationPosition(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Explain,PositionOrder,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OperationPosition "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - OperationPositionObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationPositionObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OperationPositionObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - OperationPositionObj.Explain = ds.Tables[0].Rows[0]["Explain"].ToString(); - if(ds.Tables[0].Rows[0]["PositionOrder"].ToString()!="") - { - OperationPositionObj.PositionOrder = int.Parse(ds.Tables[0].Rows[0]["PositionOrder"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - OperationPositionObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OperationPositionObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationPositionObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - OperationPositionObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationPositionObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[Explain],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM OperationPosition "); - if(strWhere.Trim()!="") - { - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationRecoverRoomDB.cs b/AIMSEntity/OldEntity/DAL/OperationRecoverRoomDB.cs deleted file mode 100644 index 2579e70..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationRecoverRoomDB.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class OperationRecoverRoomDB - { - public void Add(Model.OperationRecoverRoom OperationRecoverRoomObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [OperationRecoverRoom]("); - strSql.Append("Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+OperationRecoverRoomObj.Name+"',"); - strSql.Append("'"+OperationRecoverRoomObj.HelpCode+"',"); - strSql.Append("'"+OperationRecoverRoomObj.Ip+"',"); - strSql.Append(""+OperationRecoverRoomObj.RoomOrder+","); - strSql.Append(""+OperationRecoverRoomObj.IsValid+","); - strSql.Append("'"+OperationRecoverRoomObj.OperatorNo+"',"); - strSql.Append("'"+OperationRecoverRoomObj.OperatorName+"',"); - strSql.Append("'"+OperationRecoverRoomObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.OperationRecoverRoom OperationRecoverRoomObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update OperationRecoverRoom set "); - strSql.Append("Name='"+OperationRecoverRoomObj.Name+"',"); - strSql.Append("HelpCode='"+OperationRecoverRoomObj.HelpCode+"',"); - strSql.Append("Ip='"+OperationRecoverRoomObj.Ip+"',"); - strSql.Append("RoomOrder="+OperationRecoverRoomObj.RoomOrder+","); - strSql.Append("IsValid="+OperationRecoverRoomObj.IsValid+","); - strSql.Append("OperatorNo='"+OperationRecoverRoomObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+OperationRecoverRoomObj.OperatorName+"',"); - strSql.Append("OperateDate='"+OperationRecoverRoomObj.OperateDate+"'"); - strSql.Append(" where Id="+OperationRecoverRoomObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int Id) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete OperationRecoverRoom "); - strSql.Append(" where Id="+Id+"" ); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.OperationRecoverRoom GetModel(int Id) - { - Model.OperationRecoverRoom OperationRecoverRoomObj = new Model.OperationRecoverRoom(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OperationRecoverRoom "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - OperationRecoverRoomObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationRecoverRoomObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OperationRecoverRoomObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - OperationRecoverRoomObj.Ip = ds.Tables[0].Rows[0]["Ip"].ToString(); - if(ds.Tables[0].Rows[0]["RoomOrder"].ToString()!="") - { - OperationRecoverRoomObj.RoomOrder = int.Parse(ds.Tables[0].Rows[0]["RoomOrder"].ToString()); - } - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - OperationRecoverRoomObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OperationRecoverRoomObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationRecoverRoomObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - OperationRecoverRoomObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationRecoverRoomObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[Ip],[RoomOrder],[IsValid],[OperatorNo],[OperatorName],[OperateDate] "); - strSql.Append(" FROM OperationRecoverRoom "); - if(strWhere.Trim()!="") - { - strSql.Append(" where "+strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationRoomDB.cs b/AIMSEntity/OldEntity/DAL/OperationRoomDB.cs deleted file mode 100644 index 243052c..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationRoomDB.cs +++ /dev/null @@ -1,145 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class OperationRoomDB - { - public void Add(Model.OperationRoom OperationRoomObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [OperationRoom]("); - strSql.Append("Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + OperationRoomObj.Name + "',"); - strSql.Append("'" + OperationRoomObj.HelpCode + "',"); - strSql.Append("'" + OperationRoomObj.Ip + "',"); - strSql.Append("" + OperationRoomObj.RoomOrder + ","); - strSql.Append("" + OperationRoomObj.IsValid + ","); - strSql.Append("'" + OperationRoomObj.OperatorNo + "',"); - strSql.Append("'" + OperationRoomObj.OperatorName + "',"); - strSql.Append("'" + OperationRoomObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.OperationRoom OperationRoomObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update OperationRoom set "); - strSql.Append("Name='" + OperationRoomObj.Name + "',"); - strSql.Append("HelpCode='" + OperationRoomObj.HelpCode + "',"); - strSql.Append("Ip='" + OperationRoomObj.Ip + "',"); - strSql.Append("RoomOrder=" + OperationRoomObj.RoomOrder + ","); - strSql.Append("IsValid=" + OperationRoomObj.IsValid + ","); - strSql.Append("OperatorNo='" + OperationRoomObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + OperationRoomObj.OperatorName + "',"); - strSql.Append("OperateDate='" + OperationRoomObj.OperateDate + "'"); - strSql.Append(" where Id=" + OperationRoomObj.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.OperationRoom GetModel(int Id) - { - Model.OperationRoom OperationRoomObj = new Model.OperationRoom(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,Ip,RoomOrder,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OperationRoom "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - OperationRoomObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationRoomObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OperationRoomObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - OperationRoomObj.Ip = ds.Tables[0].Rows[0]["Ip"].ToString(); - if (ds.Tables[0].Rows[0]["RoomOrder"].ToString() != "") - { - OperationRoomObj.RoomOrder = int.Parse(ds.Tables[0].Rows[0]["RoomOrder"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - OperationRoomObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OperationRoomObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationRoomObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - OperationRoomObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OperationRoomObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[Ip],[RoomOrder],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM OperationRoom "); - if (strWhere.Trim() != "") - { - - strSql.Append(" where " + strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public List GetOperationRooms(string strWhere) - { - - List OperationRoomObjs = new List(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],[Ip],[RoomOrder],IsValid ,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" FROM OperationRoom "); - if (strWhere.Trim() != "") - { - strSql.Append(" where " + strWhere); - } - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - for (int i = 0; i < ds.Tables[0].Rows.Count; i++) - { - Model.OperationRoom OperationRoomObj = new Model.OperationRoom(); - if (ds.Tables[0].Rows[i]["Id"].ToString() != "") - { - OperationRoomObj.Id = int.Parse(ds.Tables[0].Rows[i]["Id"].ToString()); - } - OperationRoomObj.Name = ds.Tables[0].Rows[i]["Name"].ToString(); - OperationRoomObj.HelpCode = ds.Tables[0].Rows[i]["HelpCode"].ToString(); - OperationRoomObj.Ip = ds.Tables[0].Rows[i]["Ip"].ToString(); - if (ds.Tables[0].Rows[i]["RoomOrder"].ToString() != "") - { - OperationRoomObj.RoomOrder = int.Parse(ds.Tables[0].Rows[i]["RoomOrder"].ToString()); - } - if (ds.Tables[0].Rows[i]["IsValid"].ToString() != "") - { - OperationRoomObj.IsValid = int.Parse(ds.Tables[0].Rows[i]["IsValid"].ToString()); - } - OperationRoomObj.OperatorNo = ds.Tables[0].Rows[i]["OperatorNo"].ToString(); - OperationRoomObj.OperatorName = ds.Tables[0].Rows[i]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[i]["OperateDate"].ToString() != "") - { - OperationRoomObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[i]["OperateDate"].ToString()); - } - OperationRoomObjs.Add(OperationRoomObj); - } - } - return OperationRoomObjs; - } - - public int GetOperationRoomIdByName(string Name) - { - string strSql = "SELECT or1.Id FROM OperationRoom or1 WHERE or1.Name='" + Name + "'"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - return int.Parse(dt.Rows[0]["Id"].ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/OperationTemplateDB.cs b/AIMSEntity/OldEntity/DAL/OperationTemplateDB.cs deleted file mode 100644 index b9df40a..0000000 --- a/AIMSEntity/OldEntity/DAL/OperationTemplateDB.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.DAL -{ - public class OperationTemplateDB - { - public bool Exists(string TemplateName, int TypeId) - { - bool Temp = false; - StringBuilder strSql = new StringBuilder(); - strSql.Append("select * from OperationTemplate where TemplateName='" + TemplateName + "' and TypeId = '" + TypeId + "'"); - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - if (dt.Rows.Count > 0) - { - Temp = true; - } - return Temp; - } - - public void Add(Model.OperationTemplate OperationTemplateObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [OperationTemplate]("); - strSql.Append("TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + OperationTemplateObj.TemplateName + "',"); - strSql.Append("" + OperationTemplateObj.TypeId + ","); - strSql.Append("'" + OperationTemplateObj.ItemKindName + "',"); - strSql.Append("'" + OperationTemplateObj.InRoomTime + "',"); - strSql.Append("" + OperationTemplateObj.ItemId + ","); - strSql.Append("'" + OperationTemplateObj.BeginTime + "',"); - strSql.Append("'" + OperationTemplateObj.EndTime + "',"); - strSql.Append("" + OperationTemplateObj.Value + ","); - strSql.Append("'" + OperationTemplateObj.DosageUnit + "',"); - strSql.Append("'" + OperationTemplateObj.DrugChannel + "',"); - strSql.Append("'" + OperationTemplateObj.GiveDrugType + "',"); - strSql.Append("'" + OperationTemplateObj.OperatorNo + "',"); - strSql.Append("'" + OperationTemplateObj.OperatorName + "',"); - strSql.Append("'" + OperationTemplateObj.OperateDate + "',"); - strSql.Append("'" + OperationTemplateObj.IsPublic + "',"); - strSql.Append("'" + OperationTemplateObj.Spare1 + "',"); - strSql.Append("'" + OperationTemplateObj.Spare2 + "',"); - strSql.Append("'" + OperationTemplateObj.Spare3 + "',"); - strSql.Append("'" + OperationTemplateObj.Spare4 + "',"); - strSql.Append("'" + OperationTemplateObj.Spare5 + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.OperationTemplate OperationTemplateOb) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update OperationTemplate set "); - strSql.Append("TemplateName='" + OperationTemplateOb.TemplateName + "',"); - strSql.Append("TypeId=" + OperationTemplateOb.TypeId + ","); - strSql.Append("ItemKindName='" + OperationTemplateOb.ItemKindName + "',"); - strSql.Append("InRoomTime='" + OperationTemplateOb.InRoomTime + "',"); - strSql.Append("ItemId=" + OperationTemplateOb.ItemId + ","); - strSql.Append("BeginTime='" + OperationTemplateOb.BeginTime + "',"); - strSql.Append("EndTime='" + OperationTemplateOb.EndTime + "',"); - strSql.Append("Value=" + OperationTemplateOb.Value + ","); - strSql.Append("DosageUnit='" + OperationTemplateOb.DosageUnit + "',"); - strSql.Append("DrugChannel='" + OperationTemplateOb.DrugChannel + "',"); - strSql.Append("GiveDrugType='" + OperationTemplateOb.GiveDrugType + "',"); - strSql.Append("OperatorNo='" + OperationTemplateOb.OperatorNo + "',"); - strSql.Append("OperatorName='" + OperationTemplateOb.OperatorName + "',"); - strSql.Append("OperateDate='" + OperationTemplateOb.OperateDate + "'"); - strSql.Append(" where Id=" + OperationTemplateOb.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(string TemplateName, int TypeId) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("delete OperationTemplate "); - strSql.Append(" where TemplateName='" + TemplateName + "' and TypeId=" + TypeId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.OperationTemplate GetModel(int Id) - { - Model.OperationTemplate OperationTemplateObj = new Model.OperationTemplate(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,TemplateName,TypeId,ItemKindName,InRoomTime,ItemId,BeginTime,EndTime,Value,DosageUnit,DrugChannel,GiveDrugType,OperatorNo,OperatorName,OperateDate, IsPublic, Spare1, Spare2, Spare3, Spare4, Spare5 "); - strSql.Append(" from OperationTemplate "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - OperationTemplateObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OperationTemplateObj.TemplateName = ds.Tables[0].Rows[0]["TemplateName"].ToString(); - if (ds.Tables[0].Rows[0]["TypeId"].ToString() != "") - { - OperationTemplateObj.TypeId = int.Parse(ds.Tables[0].Rows[0]["TypeId"].ToString()); - } - OperationTemplateObj.ItemKindName = ds.Tables[0].Rows[0]["ItemKindName"].ToString(); - - if (ds.Tables[0].Rows[0]["InRoomTime"].ToString() != "") - { - OperationTemplateObj.InRoomTime = DateTime.Parse(ds.Tables[0].Rows[0]["InRoomTime"].ToString()); - } - if (ds.Tables[0].Rows[0]["ItemId"].ToString() != "") - { - OperationTemplateObj.ItemId = int.Parse(ds.Tables[0].Rows[0]["ItemId"].ToString()); - } - if (ds.Tables[0].Rows[0]["BeginTime"].ToString() != "") - { - OperationTemplateObj.BeginTime = DateTime.Parse(ds.Tables[0].Rows[0]["BeginTime"].ToString()); - } - if (ds.Tables[0].Rows[0]["EndTime"].ToString() != "") - { - OperationTemplateObj.EndTime = DateTime.Parse(ds.Tables[0].Rows[0]["EndTime"].ToString()); - } - if (ds.Tables[0].Rows[0]["Value"].ToString() != "") - { - OperationTemplateObj.Value = decimal.Parse(ds.Tables[0].Rows[0]["Value"].ToString()); - } - OperationTemplateObj.DosageUnit = ds.Tables[0].Rows[0]["DosageUnit"].ToString(); - OperationTemplateObj.DrugChannel = ds.Tables[0].Rows[0]["DrugChannel"].ToString(); - OperationTemplateObj.GiveDrugType = ds.Tables[0].Rows[0]["GiveDrugType"].ToString(); - OperationTemplateObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OperationTemplateObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - OperationTemplateObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsPublic"].ToString() != "") - { - OperationTemplateObj.IsPublic = int.Parse(ds.Tables[0].Rows[0]["IsPublic"].ToString()); - } - OperationTemplateObj.Spare1 = ds.Tables[0].Rows[0]["Spare1"].ToString(); - OperationTemplateObj.Spare2 = ds.Tables[0].Rows[0]["Spare2"].ToString(); - OperationTemplateObj.Spare3 = ds.Tables[0].Rows[0]["Spare3"].ToString(); - OperationTemplateObj.Spare4 = ds.Tables[0].Rows[0]["Spare4"].ToString(); - OperationTemplateObj.Spare5 = ds.Tables[0].Rows[0]["Spare5"].ToString(); - - } - return OperationTemplateObj; - } - - public DataTable GetDataTable(int TypeId, string OpNo) - { - string strSql = "SELECT DISTINCT TemplateName FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and (isPublic=1 or [OperatorNo]='" + OpNo + "')"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - } - - public void ClearData(int PatientId, int TypeId) - { - try - { - HelperDB.DbHelperSQL.BeginTrans(); - - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactDrug WHERE PatientId=" + PatientId + " AND DrugTypeId=" + TypeId + " "); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactEvents WHERE EventId not in (" + GetInRoomEventId() + ") and PatientId=" + PatientId + " AND EventTypeId=" + TypeId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactOutputLiquids WHERE PatientId= " + PatientId + " AND OutputLiquidsTypeId=" + TypeId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM PhysioData WHERE PatientId=" + PatientId + " AND PhysioDataType=" + TypeId + ""); - HelperDB.DbHelperSQL.ExecNonQuery("DELETE FROM FactBloodGasAnalysis WHERE PatientId=" + PatientId + " AND TypeId=" + TypeId + ""); - HelperDB.DbHelperSQL.CommitTrans(); - } - catch - { - HelperDB.DbHelperSQL.RollbackTrans(); - } - } - private int GetInRoomEventId() - { - string strSql = "SELECT Id FROM Events WHERE NAME='入室' "; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - return int.Parse(dt.Rows[0]["Id"].ToString()); - } - else - { - return 0; - } - - } - public DataTable GetDataTable(string TemplateName, int TypeId) - { - string strSql = "SELECT TemplateName, ItemKindName,InRoomTime, ItemId, BeginTime, EndTime, [Value], DosageUnit,DrugChannel,GiveDrugType,[OperatorNo],[OperatorName] ,[OperateDate] ,[IsPublic],[Spare1],[Spare2],[Spare3] ,[Spare4],[Spare5] FROM OperationTemplate ot WHERE TypeId=" + TypeId + " and TemplateName='" + TemplateName + "'"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/OutputLiquidsDB.cs b/AIMSEntity/OldEntity/DAL/OutputLiquidsDB.cs deleted file mode 100644 index 677bfb7..0000000 --- a/AIMSEntity/OldEntity/DAL/OutputLiquidsDB.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; - -namespace DataDictionary.DAL -{ - public class OutputLiquidsDB - { - - public bool IsExit(string Name) - { - string strSql ="select * from OutputLiquids where name ='"+Name+"'"; - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - if (dt.Rows.Count > 0) - { - return true; - } - else - { - return false; - } - } - public void Add(Model.OutputLiquids OutputLiquidsObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [OutputLiquids]("); - strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + OutputLiquidsObj.Name + "',"); - strSql.Append("'" + OutputLiquidsObj.HelpCode + "',"); - strSql.Append("" + OutputLiquidsObj.IsValid + ","); - strSql.Append("'" + OutputLiquidsObj.OperatorNo + "',"); - strSql.Append("'" + OutputLiquidsObj.OperatorName + "',"); - strSql.Append("'" + OutputLiquidsObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - public void Update(Model.OutputLiquids OutputLiquidsObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update OutputLiquids set "); - strSql.Append("Name='" + OutputLiquidsObj.Name + "',"); - strSql.Append("HelpCode='" + OutputLiquidsObj.HelpCode + "',"); - strSql.Append("IsValid=" + OutputLiquidsObj.IsValid + ","); - strSql.Append("OperatorNo='" + OutputLiquidsObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + OutputLiquidsObj.OperatorName + "',"); - strSql.Append("OperateDate='" + OutputLiquidsObj.OperateDate + "'"); - strSql.Append(" where Id=" + OutputLiquidsObj.Id + " "); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public void Delete(int Id) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("delete OutputLiquids "); - strSql.Append(" where Id=" + Id + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - public Model.OutputLiquids GetModel(int Id) - { - Model.OutputLiquids OutputLiquidsObj = new Model.OutputLiquids(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OutputLiquids "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - OutputLiquidsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OutputLiquidsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OutputLiquidsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - OutputLiquidsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OutputLiquidsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OutputLiquidsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - OutputLiquidsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OutputLiquidsObj; - } - - public Model.OutputLiquids GetModelByName(string Name) - { - Model.OutputLiquids OutputLiquidsObj = new Model.OutputLiquids(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select top 1 "); - strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from OutputLiquids "); - strSql.Append(" where Name='" + Name + "'"); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - OutputLiquidsObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - OutputLiquidsObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - OutputLiquidsObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - OutputLiquidsObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - OutputLiquidsObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - OutputLiquidsObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - OutputLiquidsObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return OutputLiquidsObj; - } - public DataTable GetDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id], [Name],HelpCode,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM OutputLiquids "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetDataTable(string HelpCode) - { - string strSql = "SELECT Id,Name FROM dbo.OutputLiquids WHERE (NAME LIKE '" + HelpCode + "%') OR (HelpCode LIKE '" + HelpCode + "%')"; - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetEventDataTable() - { - string strSql = "SELECT TOP 17 e.Id, e.Name FROM OutputLiquids e WHERE e.IsValid=1 ORDER BY e.UseRate DESC "; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - } - } - diff --git a/AIMSEntity/OldEntity/DAL/PatientKindDB.cs b/AIMSEntity/OldEntity/DAL/PatientKindDB.cs deleted file mode 100644 index f521b71..0000000 --- a/AIMSEntity/OldEntity/DAL/PatientKindDB.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class PatientKindDB - { - public void Add(Model.PatientKind PatientKindObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [PatientKind]("); - strSql.Append("No,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + PatientKindObj.No + "',"); - strSql.Append("'" + PatientKindObj.Name + "',"); - strSql.Append("'" + PatientKindObj.HelpCode + "',"); - strSql.Append("" + PatientKindObj.IsValid + ","); - strSql.Append("'" + PatientKindObj.OperatorNo + "',"); - strSql.Append("'" + PatientKindObj.OperatorName + "',"); - strSql.Append("'" + PatientKindObj.OperateDate + "'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.PatientKind PatientKindObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update PatientKind set "); - strSql.Append("No='" + PatientKindObj.No + "',"); - strSql.Append("Name='" + PatientKindObj.Name + "',"); - strSql.Append("HelpCode='" + PatientKindObj.HelpCode + "',"); - strSql.Append("IsValid=" + PatientKindObj.IsValid + ","); - strSql.Append("OperatorNo='" + PatientKindObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + PatientKindObj.OperatorName + "',"); - strSql.Append("OperateDate='" + PatientKindObj.OperateDate + "'"); - strSql.Append(" where Id=" + PatientKindObj.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.PatientKind GetModel(int Id) - { - Model.PatientKind PatientKindObj = new Model.PatientKind(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,No,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from PatientKind "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - PatientKindObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - PatientKindObj.No = ds.Tables[0].Rows[0]["No"].ToString(); - PatientKindObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - PatientKindObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - PatientKindObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - PatientKindObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - PatientKindObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - PatientKindObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return PatientKindObj; - } - - public DataTable GetDataTable(string strWhere) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[No],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM PatientKind "); - if (strWhere.Trim() != "") - { - - strSql.Append(" where " + strWhere); - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - public DataTable GetDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id],[No],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM PatientKind "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public bool IsExit(string No) - { - - string strSql = "select * from PatientKind where name ='" + No + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - return true; - } - else - { - return false; - } - } - public bool NameExit(string Name) - { - - string strSql = "select * from PatientKind where name ='" + Name + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - return true; - } - else - { - return false; - } - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/PersonDB.cs b/AIMSEntity/OldEntity/DAL/PersonDB.cs deleted file mode 100644 index 6ba6872..0000000 --- a/AIMSEntity/OldEntity/DAL/PersonDB.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.DAL -{ - public class PersonDB : HelperDB.DbHelperSQL - { - public void Add(Model.Person PersonObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("insert into [Person]("); - strSql.Append("No,Name,HelpCode,Sex,PassWord,DepId,RoleId,BirthDay,TimeToWork,Diploma,JobTitle,PersonType,PersonOrder,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + PersonObj.No + "',"); - strSql.Append("'" + PersonObj.Name + "',"); - strSql.Append("'" + PersonObj.HelpCode + "',"); - strSql.Append("'" + PersonObj.Sex + "',"); - strSql.Append("'" + PersonObj.PassWord + "',"); - strSql.Append("" + PersonObj.DepId + ","); - strSql.Append("" + PersonObj.RoleId + ","); - strSql.Append("'" + PersonObj.BirthDay + "',"); - strSql.Append("'" + PersonObj.TimeToWork + "',"); - strSql.Append("'" + PersonObj.Diploma + "',"); - strSql.Append("'" + PersonObj.JobTitle + "',"); - strSql.Append("'" + PersonObj.PersonType + "',"); - strSql.Append("" + PersonObj.PersonOrder + ","); - strSql.Append("" + PersonObj.IsValid + ","); - strSql.Append("'" + PersonObj.OperatorNo + "',"); - strSql.Append("'" + PersonObj.OperatorName + "',"); - strSql.Append("'" + PersonObj.OperateDate + "'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.Person PersonObj) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("update Person set "); - strSql.Append("No='" + PersonObj.No + "',"); - strSql.Append("Name='" + PersonObj.Name + "',"); - strSql.Append("HelpCode='" + PersonObj.HelpCode + "',"); - strSql.Append("Sex='" + PersonObj.Sex + "',"); - strSql.Append("PassWord='" + PersonObj.PassWord + "',"); - strSql.Append("DepId=" + PersonObj.DepId + ","); - strSql.Append("RoleId=" + PersonObj.RoleId + ","); - strSql.Append("BirthDay='" + PersonObj.BirthDay + "',"); - strSql.Append("TimeToWork='" + PersonObj.TimeToWork + "',"); - strSql.Append("Diploma='" + PersonObj.Diploma + "',"); - strSql.Append("JobTitle='" + PersonObj.JobTitle + "',"); - strSql.Append("PersonType='" + PersonObj.PersonType + "',"); - - strSql.Append("PersonOrder=" + PersonObj.PersonOrder + ","); - strSql.Append("IsValid=" + PersonObj.IsValid + ","); - strSql.Append("OperatorNo='" + PersonObj.OperatorNo + "',"); - strSql.Append("OperatorName='" + PersonObj.OperatorName + "',"); - strSql.Append("OperateDate='" + PersonObj.OperateDate + "'"); - strSql.Append(" where Id=" + PersonObj.Id + " "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.Person GetModel(int Id) - { - Model.Person PersonObj = new Model.Person(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,No,Name,HelpCode,Sex,PassWord,DepId,RoleId,BirthDay,TimeToWork,Diploma,JobTitle,PersonType,PersonOrder,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Person "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - PersonObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - PersonObj.No = ds.Tables[0].Rows[0]["No"].ToString(); - PersonObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - PersonObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - PersonObj.Sex = ds.Tables[0].Rows[0]["Sex"].ToString(); - PersonObj.PassWord = ds.Tables[0].Rows[0]["PassWord"].ToString(); - if (ds.Tables[0].Rows[0]["DepId"].ToString() != "") - { - PersonObj.DepId = int.Parse(ds.Tables[0].Rows[0]["DepId"].ToString()); - } - if (ds.Tables[0].Rows[0]["RoleId"].ToString() != "") - { - PersonObj.RoleId = int.Parse(ds.Tables[0].Rows[0]["RoleId"].ToString()); - } - if (ds.Tables[0].Rows[0]["BirthDay"].ToString() != "") - { - PersonObj.BirthDay = ds.Tables[0].Rows[0]["BirthDay"].ToString(); - } - if (ds.Tables[0].Rows[0]["TimeToWork"].ToString() != "") - { - PersonObj.TimeToWork = ds.Tables[0].Rows[0]["TimeToWork"].ToString(); - } - PersonObj.Diploma = ds.Tables[0].Rows[0]["Diploma"].ToString(); - PersonObj.JobTitle = ds.Tables[0].Rows[0]["JobTitle"].ToString(); - PersonObj.PersonType = ds.Tables[0].Rows[0]["PersonType"].ToString(); - if (ds.Tables[0].Rows[0]["PersonOrder"].ToString() != "") - { - PersonObj.PersonOrder = int.Parse(ds.Tables[0].Rows[0]["PersonOrder"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - PersonObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - PersonObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - PersonObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - PersonObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return PersonObj; - } - - public DataTable GetPersonDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("SELECT p.Id,p.No,p.Name,p.HelpCode,p.Sex,p.PassWord,d.Name AS DepName,r.RoleName,p.BirthDay,p.TimeToWork,"); - strSql.Append("p.Diploma,p.JobTitle,p.PersonType,p.PersonOrder,CASE p.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid FROM Person p "); - strSql.Append("LEFT JOIN Department d ON d.Id =p.DepId "); - strSql.Append("LEFT JOIN [Role] r ON r.Id = p.RoleId "); - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public DataTable GetPersonDataTable(string name,string DeptName) - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("SELECT p.Id,p.No,p.Name,p.HelpCode,p.Sex,p.PassWord,d.Name AS DepName,r.RoleName,p.BirthDay,p.TimeToWork,"); - strSql.Append("p.Diploma,p.JobTitle,p.PersonType,p.PersonOrder,CASE p.IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid FROM Person p "); - strSql.Append("LEFT JOIN Department d ON d.Id =p.DepId "); - strSql.Append("LEFT JOIN [Role] r ON r.Id = p.RoleId "); - if (name.Length > 0) - strSql.Append(" WHERE p.No like '%" + name + "%' Or p.Name like '%" + name + "%' Or p.HelpCode like '%" + name + "%' "); - if (DeptName.Length > 0 && name.Length==0) - strSql.Append(" WHERE d.Name = '" + DeptName + "' "); - else if (DeptName.Length > 0 && name.Length>0) - strSql.Append(" and d.Name = '" + DeptName + "' "); - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - public bool Login(string No, string PassWord) - { - string strSql = "SELECT * FROM Person p"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - if (dt.Rows.Count > 0) - return true; - else - return false; - - } - - public Model.Person GetModelByNo(string No) - { - Model.Person PersonObj = new Model.Person(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select top 1 "); - strSql.Append("Id,No,Name,HelpCode,Sex,PassWord,DepId,RoleId,BirthDay,TimeToWork,Diploma,JobTitle,PersonType,PersonOrder,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Person "); - strSql.Append(" where No='" + No + "'"); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - PersonObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - PersonObj.No = ds.Tables[0].Rows[0]["No"].ToString(); - PersonObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - PersonObj.HelpCode = ds.Tables[0].Rows[0]["HelpCode"].ToString(); - PersonObj.Sex = ds.Tables[0].Rows[0]["Sex"].ToString(); - PersonObj.PassWord = ds.Tables[0].Rows[0]["PassWord"].ToString(); - if (ds.Tables[0].Rows[0]["DepId"].ToString() != "") - { - PersonObj.DepId = int.Parse(ds.Tables[0].Rows[0]["DepId"].ToString()); - } - if (ds.Tables[0].Rows[0]["RoleId"].ToString() != "") - { - PersonObj.RoleId = int.Parse(ds.Tables[0].Rows[0]["RoleId"].ToString()); - } - if (ds.Tables[0].Rows[0]["BirthDay"].ToString() != "") - { - PersonObj.BirthDay = ds.Tables[0].Rows[0]["BirthDay"].ToString(); - } - if (ds.Tables[0].Rows[0]["TimeToWork"].ToString() != "") - { - PersonObj.TimeToWork = ds.Tables[0].Rows[0]["TimeToWork"].ToString(); - } - PersonObj.Diploma = ds.Tables[0].Rows[0]["Diploma"].ToString(); - PersonObj.JobTitle = ds.Tables[0].Rows[0]["JobTitle"].ToString(); - PersonObj.PersonType = ds.Tables[0].Rows[0]["PersonType"].ToString(); - if (ds.Tables[0].Rows[0]["PersonOrder"].ToString() != "") - { - PersonObj.PersonOrder = int.Parse(ds.Tables[0].Rows[0]["PersonOrder"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - PersonObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - PersonObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - PersonObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - PersonObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return PersonObj; - } - - public DataTable GetPersonDataTableByDepId(int DepId, string HelpCode, string PersonType) - { - string strSql = ""; - - if (HelpCode == "简拼/汉字/ICD码") - { - HelpCode = ""; - } - string Depstr = ""; - if (DepId != -1) Depstr = " AND p.DepId='" + DepId + "' "; - if (PersonType == "医生") - { - strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='医生' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; - - } - if (PersonType == "麻醉医生") - { - strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉医生' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; - - } - if (PersonType == "麻醉护士") - { - strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='麻醉护士' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; - - } - if (PersonType == "手术室护士") - { - strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType ='手术室护士' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; - - } - if (PersonType == "护士") - { - strSql = "SELECT p.Id,p.Name,p.[No] FROM Person p WHERE p.IsValid=1 AND p.PersonType like '%护士%' " + Depstr + " AND (p.Name LIKE '%" + HelpCode + "%' OR p.HelpCode LIKE '%" + HelpCode + "%')"; - - } - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/PersonDutyDB.cs b/AIMSEntity/OldEntity/DAL/PersonDutyDB.cs deleted file mode 100644 index b6b3ea0..0000000 --- a/AIMSEntity/OldEntity/DAL/PersonDutyDB.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DataDictionary.DAL -{ - public class PersonDutyDB - { - public DataTable GetDataTablePersonDuty() - { - string strSql = "select Id,Name from dbo.PersonDuty where IsValid=1"; - return HelperDB.DbHelperSQL.GetDataTable(strSql); - } - - } -} diff --git a/AIMSEntity/OldEntity/DAL/PharmaCologyDB.cs b/AIMSEntity/OldEntity/DAL/PharmaCologyDB.cs deleted file mode 100644 index 73e77a2..0000000 --- a/AIMSEntity/OldEntity/DAL/PharmaCologyDB.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace DrugManagement.DAL -{ - public class PharmaCologyDB - { - public void Add(Model.PharmaCology PharmaCologyObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [PharmaCology]("); - strSql.Append("Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+PharmaCologyObj.Name+"',"); - strSql.Append("'"+PharmaCologyObj.HelpCode+"',"); - strSql.Append(""+PharmaCologyObj.IsValid+","); - strSql.Append("'"+PharmaCologyObj.OperatorNo+"',"); - strSql.Append("'"+PharmaCologyObj.OperatorName+"',"); - strSql.Append("'"+PharmaCologyObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - - } - - public void Update(Model.PharmaCology PharmaCologyObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update PharmaCology set "); - strSql.Append("Name='"+PharmaCologyObj.Name+"',"); - strSql.Append("HelpCode='"+PharmaCologyObj.HelpCode+"',"); - strSql.Append("IsValid="+PharmaCologyObj.IsValid+","); - strSql.Append("OperatorNo='"+PharmaCologyObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+PharmaCologyObj.OperatorName+"',"); - strSql.Append("OperateDate='"+PharmaCologyObj.OperateDate+"'"); - strSql.Append(" where Id="+PharmaCologyObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.PharmaCology GetModel(int Id) - { - Model.PharmaCology PharmaCologyObj = new Model.PharmaCology(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,HelpCode,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from PharmaCology "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - PharmaCologyObj.Id=int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - PharmaCologyObj.Name=ds.Tables[0].Rows[0]["Name"].ToString(); - PharmaCologyObj.HelpCode=ds.Tables[0].Rows[0]["HelpCode"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - PharmaCologyObj.IsValid=int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - PharmaCologyObj.OperatorNo=ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - PharmaCologyObj.OperatorName=ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - PharmaCologyObj.OperateDate=DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return PharmaCologyObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[Name],[HelpCode],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM PharmaCology "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/PrintDocDB.cs b/AIMSEntity/OldEntity/DAL/PrintDocDB.cs deleted file mode 100644 index 600d3c4..0000000 --- a/AIMSEntity/OldEntity/DAL/PrintDocDB.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.DAL -{ - public class PrintDocDB - { - public Model.PrintDoc GetModel(int Id) - { - Model.PrintDoc PrintDocObj = new Model.PrintDoc(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,PrintName,ApplyId,TextData,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from PrintDoc "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - PrintDocObj.Id=int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - PrintDocObj.PrintName=ds.Tables[0].Rows[0]["PrintName"].ToString(); - if(ds.Tables[0].Rows[0]["ApplyId"].ToString()!="") - { - PrintDocObj.ApplyId=int.Parse(ds.Tables[0].Rows[0]["ApplyId"].ToString()); - //D:\HIS\DataDictionary\BLL\ - } - PrintDocObj.TextData=ds.Tables[0].Rows[0]["TextData"].ToString(); - PrintDocObj.OperatorNo=ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - PrintDocObj.OperatorName=ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - PrintDocObj.OperateDate=DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return PrintDocObj; - } - - public void Add(Model.PrintDoc PrintDocObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [PrintDoc]("); - strSql.Append("PrintName,ApplyId,TextData,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+PrintDocObj.PrintName+"',"); - strSql.Append(""+PrintDocObj.ApplyId+","); - strSql.Append("'"+PrintDocObj.TextData+"',"); - strSql.Append("'"+PrintDocObj.OperatorNo+"',"); - strSql.Append("'"+PrintDocObj.OperatorName+"',"); - strSql.Append("'"+PrintDocObj.OperateDate+"'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - - public void Update(Model.PrintDoc PrintDocObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update PrintDoc set "); - strSql.Append("TextData='"+PrintDocObj.TextData+"',"); - strSql.Append("OperatorNo='"+PrintDocObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+PrintDocObj.OperatorName+"',"); - strSql.Append("OperateDate='"+PrintDocObj.OperateDate+"'"); - strSql.Append(" where ApplyId="+PrintDocObj.ApplyId+" and PrintName='"+PrintDocObj.PrintName+"'"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public DataTable GetDataTable(int ApplyId, string PrintName) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[PrintName],[ApplyId],[TextData]"); - strSql.Append(" FROM PrintDoc where ApplyId='" + ApplyId + "' and PrintName='" + PrintName + "'"); - - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} diff --git a/AIMSEntity/OldEntity/DAL/RoleDB.cs b/AIMSEntity/OldEntity/DAL/RoleDB.cs deleted file mode 100644 index c2ebfa3..0000000 --- a/AIMSEntity/OldEntity/DAL/RoleDB.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; -namespace AIMS.PublicUI.DAL -{ - public class RoleDB :HelperDB.DbHelperSQL - { - - public void Add(Model.Role RoleObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [Role]("); - strSql.Append("RoleName,PermissionLevel,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'"+RoleObj.RoleName+"',"); - strSql.Append("'" + RoleObj.PermissionLevel + "',"); - strSql.Append("'" + RoleObj.IsValid + "',"); - strSql.Append("'"+RoleObj.OperatorNo+"',"); - strSql.Append("'"+RoleObj.OperatorName+"',"); - strSql.Append("'"+RoleObj.OperateDate+"'"); - strSql.Append(")"); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.Role RoleObj) - { - - StringBuilder strSql=new StringBuilder(); - strSql.Append("update Role set "); - strSql.Append("RoleName='"+RoleObj.RoleName+"',"); - strSql.Append("PermissionLevel='" + RoleObj.PermissionLevel + "',"); - strSql.Append("IsValid='" + RoleObj.IsValid + "',"); - strSql.Append("OperatorNo='"+RoleObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+RoleObj.OperatorName+"',"); - strSql.Append("OperateDate='"+RoleObj.OperateDate+"'"); - strSql.Append(" where Id="+RoleObj.Id+" "); - - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - - public Model.Role GetModel(int Id) - { - Model.Role RoleObj = new Model.Role(); - StringBuilder strSql = new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,RoleName,PermissionLevel,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from Role "); - strSql.Append(" where Id=" + Id + ""); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if (ds.Tables[0].Rows.Count > 0) - { - if (ds.Tables[0].Rows[0]["Id"].ToString() != "") - { - RoleObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - RoleObj.RoleName = ds.Tables[0].Rows[0]["RoleName"].ToString(); - if (ds.Tables[0].Rows[0]["PermissionLevel"].ToString() != "") - { - RoleObj.PermissionLevel = int.Parse(ds.Tables[0].Rows[0]["PermissionLevel"].ToString()); - } - if (ds.Tables[0].Rows[0]["IsValid"].ToString() != "") - { - RoleObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - - RoleObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - RoleObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if (ds.Tables[0].Rows[0]["OperateDate"].ToString() != "") - { - RoleObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return RoleObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[RoleName],[PermissionLevel],CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid "); - strSql.Append(" FROM Role "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - - - } -} diff --git a/AIMSEntity/OldEntity/DAL/SysConfigDB.cs b/AIMSEntity/OldEntity/DAL/SysConfigDB.cs deleted file mode 100644 index 828746b..0000000 --- a/AIMSEntity/OldEntity/DAL/SysConfigDB.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; - -namespace DataDictionary.DAL -{ - public class SysConfigDB - { - public bool IsExit(string Name) - { - - string strSql = "select * from SysConfig where name ='" + Name + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - - if (dt.Rows.Count > 0) - { - return true; - } - else - { - return false; - } - } - - public void Add(Model.SysConfig SysConfigObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [SysConfig]("); - strSql.Append("Name,Value,Note,IsValid,OperatorNo,OperatorName,OperateDate"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append("'" + SysConfigObj.Name + "',"); - strSql.Append("'" + SysConfigObj.Value + "',"); - strSql.Append("'" + SysConfigObj.Note + "',"); - strSql.Append(""+SysConfigObj.IsValid+","); - strSql.Append("'"+SysConfigObj.OperatorNo+"',"); - strSql.Append("'"+SysConfigObj.OperatorName+"',"); - strSql.Append("'"+SysConfigObj.OperateDate+"'"); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.SysConfig SysConfigObj) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update SysConfig set "); - strSql.Append("Name='" + SysConfigObj.Name + "',"); - strSql.Append("Value='" + SysConfigObj.Value + "',"); - strSql.Append("Note='" + SysConfigObj.Note + "',"); - strSql.Append("IsValid="+SysConfigObj.IsValid+","); - strSql.Append("OperatorNo='"+SysConfigObj.OperatorNo+"',"); - strSql.Append("OperatorName='"+SysConfigObj.OperatorName+"',"); - strSql.Append("OperateDate='"+SysConfigObj.OperateDate+"'"); - strSql.Append(" where Id="+SysConfigObj.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.SysConfig GetModel(int Id) - { - Model.SysConfig SysConfigObj = new Model.SysConfig(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,Name,Value,Note,IsValid,OperatorNo,OperatorName,OperateDate "); - strSql.Append(" from SysConfig "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds=HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - SysConfigObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - SysConfigObj.Value = ds.Tables[0].Rows[0]["Value"].ToString(); - SysConfigObj.Name = ds.Tables[0].Rows[0]["Name"].ToString(); - SysConfigObj.Note = ds.Tables[0].Rows[0]["Note"].ToString(); - if(ds.Tables[0].Rows[0]["IsValid"].ToString()!="") - { - SysConfigObj.IsValid = int.Parse(ds.Tables[0].Rows[0]["IsValid"].ToString()); - } - SysConfigObj.OperatorNo = ds.Tables[0].Rows[0]["OperatorNo"].ToString(); - SysConfigObj.OperatorName = ds.Tables[0].Rows[0]["OperatorName"].ToString(); - if(ds.Tables[0].Rows[0]["OperateDate"].ToString()!="") - { - SysConfigObj.OperateDate = DateTime.Parse(ds.Tables[0].Rows[0]["OperateDate"].ToString()); - } - } - return SysConfigObj; - } - public DataTable GetDataTable() - { - StringBuilder strSql = new StringBuilder(); - strSql.Append("select [Id], [Name],Value,Note,CASE IsValid WHEN 1 THEN '有效' WHEN 0 THEN '无效' END AS IsValid"); - strSql.Append(" FROM SysConfig "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - } - } -} - - \ No newline at end of file diff --git a/AIMSEntity/OldEntity/DAL/UserPurviewDB.cs b/AIMSEntity/OldEntity/DAL/UserPurviewDB.cs deleted file mode 100644 index 8079fcc..0000000 --- a/AIMSEntity/OldEntity/DAL/UserPurviewDB.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Data; - -namespace AIMS.PublicUI.DAL -{ - public class UserPurviewDB :HelperDB.DbHelperSQL - { - public void Add(Model.UserPurview UserPurview) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("insert into [UserPurview]("); - strSql.Append("MenuId,RoleId"); - strSql.Append(")"); - strSql.Append(" values ("); - strSql.Append(""+UserPurview.MenuId+","); - strSql.Append(""+UserPurview.RoleId+""); - strSql.Append(")"); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Update(Model.UserPurview UserPurview) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("update UserPurview set "); - strSql.Append("MenuId="+UserPurview.MenuId+","); - strSql.Append("RoleId="+UserPurview.RoleId+""); - strSql.Append(" where Id="+UserPurview.Id+" "); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public void Delete(int RoleId) - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("delete UserPurview "); - strSql.Append(" where RoleId=" + RoleId + ""); - HelperDB.DbHelperSQL.ExecNonQuery(strSql.ToString()); - } - - public Model.UserPurview GetModel(int Id) - { - Model.UserPurview UserPurviewObj = new Model.UserPurview(); - StringBuilder strSql=new StringBuilder(); - strSql.Append("select "); - strSql.Append("Id,MenuId,RoleId "); - strSql.Append(" from UserPurview "); - strSql.Append(" where Id="+Id+"" ); - DataSet ds = HelperDB.DbHelperSQL.GetDataSet(strSql.ToString()); - if(ds.Tables[0].Rows.Count>0) - { - if(ds.Tables[0].Rows[0]["Id"].ToString()!="") - { - UserPurviewObj.Id = int.Parse(ds.Tables[0].Rows[0]["Id"].ToString()); - } - if(ds.Tables[0].Rows[0]["MenuId"].ToString()!="") - { - UserPurviewObj.MenuId = int.Parse(ds.Tables[0].Rows[0]["MenuId"].ToString()); - } - if(ds.Tables[0].Rows[0]["RoleId"].ToString()!="") - { - UserPurviewObj.RoleId = int.Parse(ds.Tables[0].Rows[0]["RoleId"].ToString()); - } - } - return UserPurviewObj; - } - - public DataTable GetDataTable() - { - StringBuilder strSql=new StringBuilder(); - strSql.Append("select [Id],[MenuId],[RoleId] "); - strSql.Append(" FROM UserPurview "); - return HelperDB.DbHelperSQL.GetDataTable(strSql.ToString()); - - } - - public List GetPurviewListByRoleId(int RoleId) - { - List PurviewTemp = new List(); - string strSql = "SELECT * FROM UserPurview WHERE roleId='" + RoleId + "'"; - - DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql); - if (dt.Rows.Count > 0) - { - for (int i = 0; i < dt.Rows.Count; i++) - { - PurviewTemp.Add(dt.Rows[i]["MenuId"].ToString()); - } - } - return PurviewTemp; - } - } -} diff --git a/AIMSEntity/OldEntity/Model/AnaesthesiaMethod.cs b/AIMSEntity/OldEntity/Model/AnaesthesiaMethod.cs deleted file mode 100644 index 9a0a8b0..0000000 --- a/AIMSEntity/OldEntity/Model/AnaesthesiaMethod.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class AnaesthesiaMethod - { - private int _id; - private string _name; - private string _helpcode; - private int _parentid; - private int _userate; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int ParentId - { - set { _parentid = value; } - get { return _parentid; } - } - /// - /// - /// - public int UseRate - { - set { _userate = value; } - get { return _userate; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/BasicDictionary.cs b/AIMSEntity/OldEntity/Model/BasicDictionary.cs deleted file mode 100644 index 89c844f..0000000 --- a/AIMSEntity/OldEntity/Model/BasicDictionary.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class BasicDictionary - { - #region Model - private int _id; - private string _name; - private int _parentid; - private string _helpcode; - private int _order; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - private string _remark; - private List _children = new List(); - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public int ParentId - { - set { _parentid = value; } - get { return _parentid; } - } - public List Children - { - get { return this._children; } - set { this._children = value; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int Order - { - set { _order = value; } - get { return _order; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - /// - /// - /// - public string Remark - { - set { _remark = value; } - get { return _remark; } - } - #endregion Model - - } -} diff --git a/AIMSEntity/OldEntity/Model/Department.cs b/AIMSEntity/OldEntity/Model/Department.cs deleted file mode 100644 index 38cf7b8..0000000 --- a/AIMSEntity/OldEntity/Model/Department.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - public class Department - { - private int _id; - private string _name; - private string _helpcode; - private string _kind; - private int _clinic; - private int _hospital; - private int _deporder; - private string _depaddress; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public string Kind - { - set { _kind = value; } - get { return _kind; } - } - /// - /// - /// - public int Clinic - { - set { _clinic = value; } - get { return _clinic; } - } - /// - /// - /// - public int Hospital - { - set { _hospital = value; } - get { return _hospital; } - } - /// - /// - /// - public int DepOrder - { - set { _deporder = value; } - get { return _deporder; } - } - /// - /// - /// - public string DepAddress - { - set { _depaddress = value; } - get { return _depaddress; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/Disease.cs b/AIMSEntity/OldEntity/Model/Disease.cs deleted file mode 100644 index aca8ca4..0000000 --- a/AIMSEntity/OldEntity/Model/Disease.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class Disease - { - private int _id; - private string _icdcode; - private string _name; - private string _helpcode; - private int _userate; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string IcdCode - { - set { _icdcode = value; } - get { return _icdcode; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int UseRate - { - set { _userate = value; } - get { return _userate; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/DosageKind.cs b/AIMSEntity/OldEntity/Model/DosageKind.cs deleted file mode 100644 index cb2ea95..0000000 --- a/AIMSEntity/OldEntity/Model/DosageKind.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class DosageKind - { - private int id; - private string name; - private string helpcode; - private int isvalid; - private string operatorno; - private string operatorname; - private DateTime operatedate; - /// - /// - /// - public int Id - { - set { id = value; } - get { return id; } - } - /// - /// - /// - public string Name - { - set { name = value; } - get { return name; } - } - /// - /// - /// - public string HelpCode - { - set { helpcode = value; } - get { return helpcode; } - } - /// - /// - /// - public int IsValid - { - set { isvalid = value; } - get { return isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { operatorno = value; } - get { return operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { operatorname = value; } - get { return operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { operatedate = value; } - get { return operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/DosageUnit.cs b/AIMSEntity/OldEntity/Model/DosageUnit.cs deleted file mode 100644 index 0349d19..0000000 --- a/AIMSEntity/OldEntity/Model/DosageUnit.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class DosageUnit - { - private int _id; - private string _name; - private string _helpcode; - private int _unittype; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - - public int UnitType - { - set { _unittype = value; } - get { return _unittype; } - } - - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/DrugKind.cs b/AIMSEntity/OldEntity/Model/DrugKind.cs deleted file mode 100644 index 3531db1..0000000 --- a/AIMSEntity/OldEntity/Model/DrugKind.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class DrugKind - { - private int _id; - private string _name; - private int _medicalitemkindid; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public int MedicalItemKindId - { - set { _medicalitemkindid = value; } - get { return _medicalitemkindid; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/DrugManufacturer.cs b/AIMSEntity/OldEntity/Model/DrugManufacturer.cs deleted file mode 100644 index c503b3e..0000000 --- a/AIMSEntity/OldEntity/Model/DrugManufacturer.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class DrugManufacturer - { - #region Model - private int _id; - private string _name; - private string _helpcode; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - #endregion Model - - } -} diff --git a/AIMSEntity/OldEntity/Model/Drugs.cs b/AIMSEntity/OldEntity/Model/Drugs.cs deleted file mode 100644 index e2e175b..0000000 --- a/AIMSEntity/OldEntity/Model/Drugs.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class Drugs - { - #region Model - private int _id; - private string _name; - private string _helpcode; - private string _drugkind; - private string _stand; - private string _dosageunit; - private string _unit; - private int _userate; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public string DrugKind - { - set { _drugkind = value; } - get { return _drugkind; } - } - /// - /// - /// - public string Stand - { - set { _stand = value; } - get { return _stand; } - } - /// - /// - /// - public string DosageUnit - { - set { _dosageunit = value; } - get { return _dosageunit; } - } - /// - /// - /// - public string Unit - { - set { _unit = value; } - get { return _unit; } - } - /// - /// - /// - public int UseRate - { - set { _userate = value; } - get { return _userate; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - #endregion Model - } -} diff --git a/AIMSEntity/OldEntity/Model/Events.cs b/AIMSEntity/OldEntity/Model/Events.cs deleted file mode 100644 index 82ff237..0000000 --- a/AIMSEntity/OldEntity/Model/Events.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class Events - { - private int _id; - private string _eventkind; - private string _name; - private string _helpcode; - private int _userate; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string EventKind - { - set { _eventkind = value; } - get { return _eventkind; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int UseRate - { - set { _userate = value; } - get { return _userate; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/MedicalDict.cs b/AIMSEntity/OldEntity/Model/MedicalDict.cs deleted file mode 100644 index 7c2d7b1..0000000 --- a/AIMSEntity/OldEntity/Model/MedicalDict.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class MedicalDict - { - private int _id; - private string _no; - private string _name; - private string _helpcode; - private int _drugkindid; - private int _dosagekindid; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string No - { - set { _no = value; } - get { return _no; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int DrugKindId - { - set { _drugkindid = value; } - get { return _drugkindid; } - } - /// - /// - /// - public int DosageKindId - { - set { _dosagekindid = value; } - get { return _dosagekindid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/MedicalItem.cs b/AIMSEntity/OldEntity/Model/MedicalItem.cs deleted file mode 100644 index ffdd08b..0000000 --- a/AIMSEntity/OldEntity/Model/MedicalItem.cs +++ /dev/null @@ -1,255 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class MedicalItem - { - private int _id; - private string _no; - private string _name; - private string _helpcode; - private string _medicalitemalias; - private string _medicalitemaliashelpcode; - private decimal _retailprice; - private int _dosagekindid; - private string _stand; - private string _barcode; - private string _medicaldictno; - private int _drugkindid; - private int _pharmacologyid; - private string _insurancekind; - private string _insurancekindnh; - private string _antibiotics; - private int _isskintest; - private decimal _dosage; - private string _dosageunit; - private string _packingunit; - private string _splitunit; - private int _quotiety; - private int _isvalid; - private string _remark; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// 编码 - /// - public string No - { - set { _no = value; } - get { return _no; } - } - /// - /// 名称 - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// 帮助码 - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// 别名 - /// - public string MedicalItemAlias - { - set { _medicalitemalias = value; } - get { return _medicalitemalias; } - } - /// - /// 别名帮助码 - /// - public string MedicalItemAliasHelpCode - { - set { _medicalitemaliashelpcode = value; } - get { return _medicalitemaliashelpcode; } - } - /// - /// 零售价格 - /// - public decimal RetailPrice - { - set { _retailprice = value; } - get { return _retailprice; } - } - /// - /// 剂型 - /// - public int DosageKindId - { - set { _dosagekindid = value; } - get { return _dosagekindid; } - } - /// - /// 规格 - /// - public string Stand - { - set { _stand = value; } - get { return _stand; } - } - /// - /// 条形码 - /// - public string BarCode - { - set { _barcode = value; } - get { return _barcode; } - } - /// - /// 品种码 - /// - public string MedicalDictNo - { - set { _medicaldictno = value; } - get { return _medicaldictno; } - } - /// - /// 药物分类 - /// - public int DrugKindId - { - set { _drugkindid = value; } - get { return _drugkindid; } - } - /// - /// 药理分类 - /// - public int PharmaCologyId - { - set { _pharmacologyid = value; } - get { return _pharmacologyid; } - } - /// - /// 医保类别 - /// - public string InsuranceKind - { - set { _insurancekind = value; } - get { return _insurancekind; } - } - /// - /// 农合类别 - /// - public string InsuranceKindNH - { - set { _insurancekindnh = value; } - get { return _insurancekindnh; } - } - /// - /// 抗菌素 - /// - public string Antibiotics - { - set { _antibiotics = value; } - get { return _antibiotics; } - } - /// - /// 是否皮试 - /// - public int IsSkintest - { - set { _isskintest = value; } - get { return _isskintest; } - } - /// - /// 剂量 - /// - public decimal Dosage - { - set { _dosage = value; } - get { return _dosage; } - } - /// - /// 剂量单位 - /// - public string DosageUnit - { - set { _dosageunit = value; } - get { return _dosageunit; } - } - /// - /// 包装单位 - /// - public string PackingUnit - { - set { _packingunit = value; } - get { return _packingunit; } - } - /// - /// 拆分单位 - /// - public string SplitUnit - { - set { _splitunit = value; } - get { return _splitunit; } - } - /// - /// 转换系数 - /// - public int Quotiety - { - set { _quotiety = value; } - get { return _quotiety; } - } - /// - /// 是否有效 - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// 备注 - /// - public string Remark - { - set { _remark = value; } - get { return _remark; } - } - /// - /// 操作员工号 - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// 操作员姓名 - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// 操作日期 - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - - } -} diff --git a/AIMSEntity/OldEntity/Model/MedicalItemKind.cs b/AIMSEntity/OldEntity/Model/MedicalItemKind.cs deleted file mode 100644 index e0ff0c3..0000000 --- a/AIMSEntity/OldEntity/Model/MedicalItemKind.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class MedicalItemKind - { - private int id; - private string name; - private string ismed; - private int isvalid; - private string operatorno; - private string operatorname; - private DateTime operatedate; - /// - /// - /// - public int Id - { - set { id = value; } - get { return id; } - } - /// - /// - /// - public string Name - { - set { name = value; } - get { return name; } - } - /// - /// - /// - public string IsMed - { - set { ismed = value; } - get { return ismed; } - } - /// - /// - /// - public int IsValid - { - set { isvalid = value; } - get { return isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { operatorno = value; } - get { return operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { operatorname = value; } - get { return operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { operatedate = value; } - get { return operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/MedicamentPrice.cs b/AIMSEntity/OldEntity/Model/MedicamentPrice.cs deleted file mode 100644 index 8a662b0..0000000 --- a/AIMSEntity/OldEntity/Model/MedicamentPrice.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class MedicamentPrice - { - private int _id; - private int _drugmanufacturerid; - private int _medicalitemid; - private decimal _purchaseprice; - private decimal _tradeprice; - private decimal _retailprice; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int DrugManufacturerId - { - set { _drugmanufacturerid = value; } - get { return _drugmanufacturerid; } - } - /// - /// - /// - public int MedicalItemId - { - set { _medicalitemid = value; } - get { return _medicalitemid; } - } - /// - /// - /// - public decimal PurchasePrice - { - set { _purchaseprice = value; } - get { return _purchaseprice; } - } - /// - /// - /// - public decimal TradePrice - { - set { _tradeprice = value; } - get { return _tradeprice; } - } - /// - /// - /// - public decimal RetailPrice - { - set { _retailprice = value; } - get { return _retailprice; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/Menu.cs b/AIMSEntity/OldEntity/Model/Menu.cs deleted file mode 100644 index dda2d2e..0000000 --- a/AIMSEntity/OldEntity/Model/Menu.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - [Serializable] - public class Menu - { - private int _id; - private string _name; - private string _path; - private int _parentid; - private int _isvalid; - private int _menuorder; - private int _isaloneopen; - private string _ImgPath; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - private List _children = new List(); - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string Path - { - set { _path = value; } - get { return _path; } - } - /// - /// - /// - public int ParentId - { - set { _parentid = value; } - get { return _parentid; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public int MenuOrder - { - set { _menuorder = value; } - get { return _menuorder; } - } - /// - /// - /// - public int IsAloneOpen - { - set { _isaloneopen = value; } - get { return _isaloneopen; } - } - /// - /// - /// - public string ImgPath - { - set { _ImgPath = value; } - get { return _ImgPath; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - - public List Children - { - get { return this._children; } - set { this._children = value; } - } - - - } -} diff --git a/AIMSEntity/OldEntity/Model/Notice.cs b/AIMSEntity/OldEntity/Model/Notice.cs deleted file mode 100644 index da27753..0000000 --- a/AIMSEntity/OldEntity/Model/Notice.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - public class Notice - { - public int Id { get; set; } - public string Contents { get; set; } - public string SendState { get; set; } - public string OperatorNo { get; set; } - public string OperatorName { get; set; } - public DateTime OperateDate { get; set; } - } -} diff --git a/AIMSEntity/OldEntity/Model/Operation.cs b/AIMSEntity/OldEntity/Model/Operation.cs deleted file mode 100644 index 5026481..0000000 --- a/AIMSEntity/OldEntity/Model/Operation.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class Operation - { - private int _id; - private string _icdcode; - private string _name; - private string _helpcode; - private int _userate; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string IcdCode - { - set { _icdcode = value; } - get { return _icdcode; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int UseRate - { - set { _userate = value; } - get { return _userate; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/OperationBodyPosition.cs b/AIMSEntity/OldEntity/Model/OperationBodyPosition.cs deleted file mode 100644 index f72125f..0000000 --- a/AIMSEntity/OldEntity/Model/OperationBodyPosition.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class OperationBodyPosition - { - private int _id; - private string _name; - private string _helpcode; - private string _explain; - private int _positionorder; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public string Explain - { - set { _explain = value; } - get { return _explain; } - } - /// - /// - /// - public int PositionOrder - { - set { _positionorder = value; } - get { return _positionorder; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/OperationCutType.cs b/AIMSEntity/OldEntity/Model/OperationCutType.cs deleted file mode 100644 index 0aef922..0000000 --- a/AIMSEntity/OldEntity/Model/OperationCutType.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class OperationCutType - { - private int _id; - private string _name; - private string _helpcode; - private string _explain; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - - public int Id - { - set { _id = value; } - get { return _id; } - } - public string Name - { - set { _name = value; } - get { return _name; } - } - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - public string Explain - { - set { _explain = value; } - get { return _explain; } - } - - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/OperationLevel.cs b/AIMSEntity/OldEntity/Model/OperationLevel.cs deleted file mode 100644 index 0ce3262..0000000 --- a/AIMSEntity/OldEntity/Model/OperationLevel.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class OperationLevel - { - #region Model - private int _id; - private string _name; - private string _helpcode; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - #endregion Model - } -} diff --git a/AIMSEntity/OldEntity/Model/OperationPosition.cs b/AIMSEntity/OldEntity/Model/OperationPosition.cs deleted file mode 100644 index d50fbea..0000000 --- a/AIMSEntity/OldEntity/Model/OperationPosition.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class OperationPosition - { - private int _id; - private string _name; - private string _helpcode; - private string _explain; - private int _positionorder; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public string Explain - { - set { _explain = value; } - get { return _explain; } - } - /// - /// - /// - public int PositionOrder - { - set { _positionorder = value; } - get { return _positionorder; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/OperationRecoverRoom.cs b/AIMSEntity/OldEntity/Model/OperationRecoverRoom.cs deleted file mode 100644 index 2c0e07e..0000000 --- a/AIMSEntity/OldEntity/Model/OperationRecoverRoom.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class OperationRecoverRoom - { - private int _id; - private string _name; - private string _helpcode; - private string _ip; - private int _roomorder; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public string Ip - { - set { _ip = value; } - get { return _ip; } - } - /// - /// - /// - public int RoomOrder - { - set { _roomorder = value; } - get { return _roomorder; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/OperationRoom.cs b/AIMSEntity/OldEntity/Model/OperationRoom.cs deleted file mode 100644 index fcdb3cd..0000000 --- a/AIMSEntity/OldEntity/Model/OperationRoom.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class OperationRoom - { - private int _id; - private string _name; - private string _helpcode; - private string _ip; - private int _roomorder; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public string Ip - { - set { _ip = value; } - get { return _ip; } - } - /// - /// - /// - public int RoomOrder - { - set { _roomorder = value; } - get { return _roomorder; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/OperationTemplate.cs b/AIMSEntity/OldEntity/Model/OperationTemplate.cs deleted file mode 100644 index 2dc9d4f..0000000 --- a/AIMSEntity/OldEntity/Model/OperationTemplate.cs +++ /dev/null @@ -1,188 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - public class OperationTemplate - { - public OperationTemplate() - { } - #region Model - private int _id; - private string _templatename; - private int _typeid; - private string _itemkindname; - private DateTime _inroomtime; - private int _itemid; - private DateTime _begintime; - private DateTime _endtime; - private decimal _value; - private string _dosageunit; - private string _drugchannel; - private string _givedrugtype; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - - private int _isPublic; - private string _spare1; - private string _spare2; - private string _spare3; - private string _spare4; - private string _spare5; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string TemplateName - { - set { _templatename = value; } - get { return _templatename; } - } - /// - /// - /// - public int TypeId - { - set { _typeid = value; } - get { return _typeid; } - } - /// - /// - /// - public string ItemKindName - { - set { _itemkindname = value; } - get { return _itemkindname; } - } - public DateTime InRoomTime - { - set { _inroomtime = value; } - get { return _inroomtime; } - } - /// - /// - /// - public int ItemId - { - set { _itemid = value; } - get { return _itemid; } - } - /// - /// - /// - public DateTime BeginTime - { - set { _begintime = value; } - get { return _begintime; } - } - /// - /// - /// - public DateTime EndTime - { - set { _endtime = value; } - get { return _endtime; } - } - /// - /// - /// - public decimal Value - { - set { _value = value; } - get { return _value; } - } - /// - /// - /// - public string DosageUnit - { - set { _dosageunit = value; } - get { return _dosageunit; } - } - /// - /// - /// - public string DrugChannel - { - set { _drugchannel = value; } - get { return _drugchannel; } - } - /// - /// - /// - public string GiveDrugType - { - set { _givedrugtype = value; } - get { return _givedrugtype; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - /// - /// - /// - public int IsPublic - { - set { _isPublic = value; } - get { return _isPublic; } - } - public string Spare1 - { - set { _spare1 = value; } - get { return _spare1; } - } - public string Spare2 - { - set { _spare2 = value; } - get { return _spare2; } - } - public string Spare3 - { - set { _spare3 = value; } - get { return _spare3; } - } - public string Spare4 - { - set { _spare4 = value; } - get { return _spare4; } - } - public string Spare5 - { - set { _spare5 = value; } - get { return _spare5; } - } - #endregion Model - - } -} diff --git a/AIMSEntity/OldEntity/Model/OutputLiquids.cs b/AIMSEntity/OldEntity/Model/OutputLiquids.cs deleted file mode 100644 index 3bd76fb..0000000 --- a/AIMSEntity/OldEntity/Model/OutputLiquids.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class OutputLiquids - { - public OutputLiquids() - { } - #region Model - private int _id; - private string _name; - private string _helpcode; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - #endregion Model - } -} diff --git a/AIMSEntity/OldEntity/Model/PatientKind.cs b/AIMSEntity/OldEntity/Model/PatientKind.cs deleted file mode 100644 index 51d6055..0000000 --- a/AIMSEntity/OldEntity/Model/PatientKind.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class PatientKind - { - private int _id; - private string _no; - private string _name; - private string _helpcode; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string No - { - set { _no = value; } - get { return _no; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/Person.cs b/AIMSEntity/OldEntity/Model/Person.cs deleted file mode 100644 index 7fd15db..0000000 --- a/AIMSEntity/OldEntity/Model/Person.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - public class Person - { - private int _id; - private string _no; - private string _name; - private string _helpcode; - private string _sex; - private string _password; - private int _depid; - private int _roleid; - private string _birthday; - private string _timetowork; - private string _diploma; - private string _jobtitle; - private string _persontype; - private int _personorder; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string No - { - set { _no = value; } - get { return _no; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public string Sex - { - set { _sex = value; } - get { return _sex; } - } - /// - /// - /// - public string PassWord - { - set { _password = value; } - get { return _password; } - } - /// - /// - /// - public int DepId - { - set { _depid = value; } - get { return _depid; } - } - /// - /// - /// - public int RoleId - { - set { _roleid = value; } - get { return _roleid; } - } - /// - /// - /// - public string BirthDay - { - set { _birthday = value; } - get { return _birthday; } - } - /// - /// - /// - public string TimeToWork - { - set { _timetowork = value; } - get { return _timetowork; } - } - /// - /// 学历 - /// - public string Diploma - { - set { _diploma = value; } - get { return _diploma; } - } - /// - /// 职称 - /// - public string JobTitle - { - set { _jobtitle = value; } - get { return _jobtitle; } - } - public string PersonType - { - set { _persontype = value; } - get { return _persontype; } - } - /// - /// - /// - public int PersonOrder - { - set { _personorder = value; } - get { return _personorder; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/PharmaCology.cs b/AIMSEntity/OldEntity/Model/PharmaCology.cs deleted file mode 100644 index 361e89f..0000000 --- a/AIMSEntity/OldEntity/Model/PharmaCology.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DrugManagement.Model -{ - public class PharmaCology - { - private int id; - private string name; - private string _helpcode; - private int isvalid; - private string operatorno; - private string operatorname; - private DateTime operatedate; - /// - /// - /// - public int Id - { - set { id = value; } - get { return id; } - } - /// - /// - /// - public string Name - { - set { name = value; } - get { return name; } - } - /// - /// - /// - public string HelpCode - { - set { _helpcode = value; } - get { return _helpcode; } - } - /// - /// - /// - public int IsValid - { - set { isvalid = value; } - get { return isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { operatorno = value; } - get { return operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { operatorname = value; } - get { return operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { operatedate = value; } - get { return operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/PrintDoc.cs b/AIMSEntity/OldEntity/Model/PrintDoc.cs deleted file mode 100644 index 1435b7e..0000000 --- a/AIMSEntity/OldEntity/Model/PrintDoc.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - public class PrintDoc - { - private int _id; - private string _printname; - private int _applyid; - private string _textdata; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string PrintName - { - set { _printname = value; } - get { return _printname; } - } - /// - /// - /// - public int ApplyId - { - set { _applyid = value; } - get { return _applyid; } - } - /// - /// - /// - public string TextData - { - set { _textdata = value; } - get { return _textdata; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} diff --git a/AIMSEntity/OldEntity/Model/Role.cs b/AIMSEntity/OldEntity/Model/Role.cs deleted file mode 100644 index 0cd4ccf..0000000 --- a/AIMSEntity/OldEntity/Model/Role.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - public class Role - { - #region Model - private int _id; - private string _rolename; - private int _PermissionLevel; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string RoleName - { - set { _rolename = value; } - get { return _rolename; } - } - public int PermissionLevel - { - set { _PermissionLevel = value; } - get { return _PermissionLevel; } - } - - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - #endregion Model - } -} diff --git a/AIMSEntity/OldEntity/Model/SysConfig.cs b/AIMSEntity/OldEntity/Model/SysConfig.cs deleted file mode 100644 index 8d343d8..0000000 --- a/AIMSEntity/OldEntity/Model/SysConfig.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace DataDictionary.Model -{ - public class SysConfig - { - private int _id; - private string _name; - private string _Value; - private string _Note; - private int _isvalid; - private string _operatorno; - private string _operatorname; - private DateTime _operatedate; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public string Name - { - set { _name = value; } - get { return _name; } - } - public string Value - { - set { _Value = value;} - get { return _Value; } - } - /// - /// - /// - public string Note - { - set { _Note = value; } - get { return _Note; } - } - /// - /// - /// - public int IsValid - { - set { _isvalid = value; } - get { return _isvalid; } - } - /// - /// - /// - public string OperatorNo - { - set { _operatorno = value; } - get { return _operatorno; } - } - /// - /// - /// - public string OperatorName - { - set { _operatorname = value; } - get { return _operatorname; } - } - /// - /// - /// - public DateTime OperateDate - { - set { _operatedate = value; } - get { return _operatedate; } - } - } -} - - - diff --git a/AIMSEntity/OldEntity/Model/UserPurview.cs b/AIMSEntity/OldEntity/Model/UserPurview.cs deleted file mode 100644 index 76405fa..0000000 --- a/AIMSEntity/OldEntity/Model/UserPurview.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace AIMS.PublicUI.Model -{ - public class UserPurview - { - public UserPurview() - { } - #region Model - private int _id; - private int _menuid; - private int _roleid; - /// - /// - /// - public int Id - { - set { _id = value; } - get { return _id; } - } - /// - /// - /// - public int MenuId - { - set { _menuid = value; } - get { return _menuid; } - } - /// - /// - /// - public int RoleId - { - set { _roleid = value; } - get { return _roleid; } - } - #endregion Model - } -} diff --git a/DocumentManagement/AppStartOptions.cs b/DocumentManagement/DocumentEntity/AppStartOptions.cs similarity index 100% rename from DocumentManagement/AppStartOptions.cs rename to DocumentManagement/DocumentEntity/AppStartOptions.cs diff --git a/DocumentManagement/DAL/DocumentDAL.cs b/DocumentManagement/DocumentEntity/DocumentDAL.cs similarity index 100% rename from DocumentManagement/DAL/DocumentDAL.cs rename to DocumentManagement/DocumentEntity/DocumentDAL.cs diff --git a/DocumentManagement/EventCodeCompiler.cs b/DocumentManagement/DocumentEntity/EventCodeCompiler.cs similarity index 100% rename from DocumentManagement/EventCodeCompiler.cs rename to DocumentManagement/DocumentEntity/EventCodeCompiler.cs diff --git a/DocumentManagement/MyCommandNames.cs b/DocumentManagement/DocumentEntity/MyCommandNames.cs similarity index 100% rename from DocumentManagement/MyCommandNames.cs rename to DocumentManagement/DocumentEntity/MyCommandNames.cs diff --git a/DocumentManagement/MyListItemsProvider.cs b/DocumentManagement/DocumentEntity/MyListItemsProvider.cs similarity index 100% rename from DocumentManagement/MyListItemsProvider.cs rename to DocumentManagement/DocumentEntity/MyListItemsProvider.cs diff --git a/DocumentManagement/Model/PrintTemplate.cs b/DocumentManagement/DocumentEntity/PrintTemplate.cs similarity index 100% rename from DocumentManagement/Model/PrintTemplate.cs rename to DocumentManagement/DocumentEntity/PrintTemplate.cs diff --git a/DocumentManagement/DAL/PrintTemplateDB.cs b/DocumentManagement/DocumentEntity/PrintTemplateDB.cs similarity index 100% rename from DocumentManagement/DAL/PrintTemplateDB.cs rename to DocumentManagement/DocumentEntity/PrintTemplateDB.cs diff --git a/DocumentManagement/Model/UserTempPurview.cs b/DocumentManagement/DocumentEntity/UserTempPurview.cs similarity index 100% rename from DocumentManagement/Model/UserTempPurview.cs rename to DocumentManagement/DocumentEntity/UserTempPurview.cs diff --git a/DocumentManagement/DAL/UserTempPurviewDB.cs b/DocumentManagement/DocumentEntity/UserTempPurviewDB.cs similarity index 100% rename from DocumentManagement/DAL/UserTempPurviewDB.cs rename to DocumentManagement/DocumentEntity/UserTempPurviewDB.cs diff --git a/DocumentManagement/DocumentManagement.csproj b/DocumentManagement/DocumentManagement.csproj index d2de60a..261e6e3 100644 --- a/DocumentManagement/DocumentManagement.csproj +++ b/DocumentManagement/DocumentManagement.csproj @@ -53,15 +53,15 @@ - - - - - - - - - + + + + + + + + + True