public override int Print(object sender, object neuObject) { Neusoft.HISFC.BizLogic.Pharmacy.DrugStore drugManager = new Neusoft.HISFC.BizLogic.Pharmacy.DrugStore(); if (this.neuSpread1_Sheet1.ActiveCell == null) { MessageBox.Show("没有查询出相关数据,打印无效!..."); return(1); } else { Neusoft.HISFC.Models.Pharmacy.DrugRecipe info = drugManager.GetDrugRecipe(this.operDept.ID, this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRow.Index, 0].Text); string detailState = "0"; if (info.RecipeState == "0" || info.RecipeState == "1") { detailState = "0"; } else if (info.RecipeState == "2") { detailState = "1"; } else { detailState = "2"; } ArrayList alInfo = new ArrayList(); alInfo = this.itemManager.QueryApplyOutListForClinic(this.operDept.ID, "M1", detailState, info.RecipeNO); Print(info, alInfo); return(base.Print(sender, neuObject)); } }
public override int Print(object sender, object neuObject) { Neusoft.HISFC.BizLogic.Pharmacy.DrugStore drugManager = new Neusoft.HISFC.BizLogic.Pharmacy.DrugStore(); Neusoft.HISFC.Models.Pharmacy.DrugRecipe info = drugManager.GetDrugRecipe(this.operDept.ID, this.neuSpread1_Sheet1.Cells[this.neuSpread1_Sheet1.ActiveRow.Index, 0].Text); string detailState = "0"; if (info.RecipeState == "0" || info.RecipeState == "1") { detailState = "0"; } else if (info.RecipeState == "2") { detailState = "1"; } else { detailState = "2"; } ArrayList alInfo = new ArrayList(); alInfo = this.itemManager.QueryApplyOutListForClinic(this.operDept.ID, "M1", detailState, info.RecipeNO); if (alInfo == null) { MessageBox.Show(itemManager.Err); return(-1); } //{9FA792B0-A60F-48d8-A3F5-1C52450C44A5} 获取打印类型 Neusoft.HISFC.Models.Pharmacy.DrugTerminal terminal = drugManager.GetDrugTerminal(info.DrugTerminal.ID); if (terminal == null) { MessageBox.Show("获取配药终端信息发生错误" + drugManager.Err); return(-1); } if (terminal.TerimalPrintType == Neusoft.HISFC.Models.Pharmacy.EnumClinicPrintType.标签) { this.isSendAllData = false; } else { this.isSendAllData = true; } if (this.factory == null) { MessageBox.Show("未设置配药台补打单据方式,无法进行打印", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return(-1); } Neusoft.HISFC.Components.DrugStore.Function.IDrugPrint = factory.GetInstance(terminal); if (Neusoft.HISFC.Components.DrugStore.Function.IDrugPrint == null) { MessageBox.Show("未设置当前选择配药台的打印方式,无法进行打印", "", MessageBoxButtons.OK, MessageBoxIcon.Information); return(-1); } //{F1C6EB10-A23D-4249-BD0C-47329421B78B} 发药窗口号赋值 string sendWindow = ""; Neusoft.HISFC.Models.Pharmacy.DrugTerminal sendTerminal = drugManager.GetDrugTerminal(info.SendTerminal.ID); if (sendTerminal != null) { sendWindow = sendTerminal.Name; } ////{9FA792B0-A60F-48d8-A3F5-1C52450C44A5} 获取打印类型 Print(info, alInfo, sendWindow); return(base.Print(sender, neuObject)); }