public FrmMediApplyController(IFrmMediApplyView _view, HIS.ZYDoc_BLL.MediApply.MediType meditype) { view = _view; _dataSet = new DataSet(); zy_Patlist = view.zy_patlist_get; applyop = new HIS.ZYDoc_BLL.MediApply.ApplyOP(); applybase = new HIS.ZYDoc_BLL.BaseInfo.MediApplyBase(); LoadINFO(meditype); }
/// <summary> /// 删除一条医嘱 /// </summary> /// <param name="dt"></param> /// <param name="rowindex"></param> private static List <HIS.Model.ZY_DOC_ORDERRECORD> DeleteOneOrder(List <HIS.Model.zy_doc_orderrecord_son> records, HIS.Model.ZY_PatList zy_Patlist, int rowindex) { List <HIS.Model.ZY_DOC_ORDERRECORD> Drecoreds = new List <HIS.Model.ZY_DOC_ORDERRECORD>(); TempOperation tempop = new TempOperation(); #region 皮试医嘱的处理 if (records[rowindex].ORDER_USAGE == "皮试" && records[rowindex].PS_ORDERID > 0) { TempOperation temp = new TempOperation(); if (temp.DelPs(zy_Patlist.PatListID, records[rowindex].PS_ORDERID)) { records[rowindex].DELETE_FLAG = 1; } return(null); } #endregion records[rowindex].DELETE_FLAG = 1; //如果删除的是一组医嘱中的第一条,要将第一条的开始时间付值给第二条 if (rowindex < records.Count - 1 && IsGroupFirstRow(records, rowindex)) { if ((rowindex + 1) < records.Count) { if ((rowindex + 1) < records.Count) { if (records[rowindex + 1].GROUP_ID == records[rowindex].GROUP_ID) { records[rowindex + 1].BeginTime = records[rowindex].BeginTime; records[rowindex + 1].Usage = records[rowindex].Usage; records[rowindex + 1].Frency = records[rowindex].Frency; records[rowindex + 1].First = records[rowindex].First; records[rowindex + 1].PresNum = records[rowindex].PresNum; } } } } Drecoreds.Add(records[rowindex]); //医技申请的要取消申请表中的内容 #region if (records[rowindex].ITEM_TYPE == 5) { HIS.ZYDoc_BLL.BaseInfo.MediApplyBase applybase = new HIS.ZYDoc_BLL.BaseInfo.MediApplyBase(); int type = applybase.GetApplyType(records[rowindex].ORDITEM_ID); HIS.ZYDoc_BLL.MediApply.IMediApply applyop = new HIS.ZYDoc_BLL.MediApply.ApplyOP(); if (type == 0) //检查申请 { applyop.DelApply(HIS.ZYDoc_BLL.MediApply.MediType.检查, records[rowindex]); } if (type == 1)//检验申请 { applyop.DelApply(HIS.ZYDoc_BLL.MediApply.MediType.检验, records[rowindex]); } } #endregion return(Drecoreds); }