void xapFormControl1_ModelFilled(object sender, EventArgs e) { EmsHeadDO.Emsdrugs.EmsOrDrug = cof.MmSortList(EmsHeadDO.Emsdrugs.EmsOrDrug); gv.DataTable.DataSource = EmsHeadDO.Emsdrugs.EmsOrDrugList; drugBindPropertyEventAndCacheUnimed(EmsHeadDO.Emsdrugs.EmsOrDrugList); SetGridPolicy(!IsReadOnly); if (cof.IsAntDrug(EmsHeadDO.Emsdrugs.Id_srv)) { getControlByName("drugsUse", "fg_treat").Visible = true; //治疗用药 getControlByName("drugsUse", "fg_propc").Visible = true; //预防用药 } else { getControlByName("drugsUse", "fg_treat").Visible = false; //治疗用药 getControlByName("drugsUse", "fg_propc").Visible = false; //预防用药 } //自定义服务处理 if (EmsHeadDO.Emsdrugs.EmsOrDrugList[0] != null && (EmsHeadDO.Emsdrugs.EmsOrDrugList[0].Fg_ctm == null || EmsHeadDO.Emsdrugs.EmsOrDrugList[0].Fg_ctm == false)) { gv.DataTable.Columns[0].ReadOnly = true; } else { gv.DataTable.Columns[0].ReadOnly = false; } if (gv != null) { gv.DataTable.DataSource = EmsHeadDO.Emsdrugs.EmsOrDrugList; //加载时为自定义服务药品列表绑定事件,并缓存自定义服务的剂量单位 zwq 2016-07-18 drugBindPropertyEventAndCacheUnimed(EmsHeadDO.Emsdrugs.EmsOrDrugList); cof.threadSetMaterialInfoOfDrug(EmsHeadDO.Emsdrugs.EmsOrDrug, middle); } bEdit_Note_or = !this.EmsHeadDO.IsNEW; if (EmsHeadDO.IsNEW) { cof.SetNoteOr(this.EmsHeadDO); this.setTime_cur(); setQauntum(this.EmsHeadDO.Emsdrugs.Times_cur); if (EmsHeadDO.Emsdrugs.EmsOrDrugList[0].Fg_ctm == true) { return; } if (EmsHeadDO.Emsdrugs.EmsOrDrugList[0].Fg_skintest != null && EmsHeadDO.Emsdrugs.EmsOrDrugList[0].Fg_skintest == true) { SkinTestLogic logic = new SkinTestLogic(EmsHeadDO.PatInfo); logic.skinTestLogic(EmsHeadDO.Emsdrugs.EmsOrDrugList[0]); } //设置结束时间和停止标志 setEndTime(); } updateTableCustomerComtrol(); }