/// <summary> /// /// </summary> /// <param name="parms"></param> /// <returns></returns> public List <EntitySetQnControl> GetQnControl(List <EntityParm> parms = null) { using (Biz202 biz = new Biz202()) { return(biz.GetQnControl(parms)); } }
/// <summary> /// 体检报告 /// </summary> /// <param name="parms"></param> /// <returns></returns> public List <EntityDisplayClientRpt> GetTjReports(List <EntityParm> parms = null) { using (Biz202 biz = new Biz202()) { return(biz.GetTjReports(parms)); } }
/// <summary> /// 体检报告结果 /// </summary> /// <param name="regNo"></param> /// <param name="deptName"></param> /// <returns></returns> public Dictionary <string, List <EntityTjResult> > GetTjResult(string regNo, out List <EntityTjResult> dataResult, out List <EntityTjResult> xjResult, out EntityTjjljy tjjljyVo) { using (Biz202 biz = new Biz202()) { return(biz.GetTjResult(regNo, out dataResult, out xjResult, out tjjljyVo)); } }
/// <summary> /// 常规问卷--删除 /// </summary> /// <param name="qnRecords"></param> /// <returns></returns> public int DelQnRecord(List <EntityQnRecord> qnRecords) { using (Biz202 biz = new Biz202()) { return(biz.DelQnRecord(qnRecords)); } }
/// <summary> /// 获取自定义问卷 /// </summary> /// <param name="parms"></param> /// <returns></returns> public List <EntityDicQnMain> GetQnMain(List <EntityParm> parms) { using (Biz202 biz = new Biz202()) { return(biz.GetQnMain(parms)); } }
/// <summary> /// 常规问卷记录 /// </summary> /// <param name="parms"></param> /// <returns></returns> public List <EntityQnRecord> GetQnRecords(List <EntityParm> parms) { using (Biz202 biz = new Biz202()) { return(biz.GetQnRecords(parms)); } }
/// <summary> /// 常规问卷--保存 /// </summary> /// <param name="qnRecord"></param> /// <param name="qnData"></param> /// <param name="recId"></param> /// <returns></returns> public int SaveQnRecord(EntityQnRecord qnRecord, EntityQnData qnData, out decimal recId) { using (Biz202 biz = new Biz202()) { return(biz.SaveQnRecord(qnRecord, qnData, out recId)); } }
/// <summary> /// 原始表单位置 /// </summary> /// <param name="parms"></param> /// <returns></returns> public List <EntityCtrlLocation> GetQnCtrlLocation(string qnCtlFiledId, decimal qnId) { using (Biz202 biz = new Biz202()) { return(biz.GetQnCtrlLocation(qnCtlFiledId, qnId)); } }
/// <summary> /// AddQuestCtrl /// </summary> void AddQuestCtrl(EntityQnRecord qnRecord) { try { if (qnRecord != null) { if (!string.IsNullOrEmpty(qnRecord.xmlData)) { XmlDocument document = new XmlDocument(); document.LoadXml(qnRecord.xmlData); XmlNodeList list = document["FormData"].ChildNodes; xmlData = list[1].OuterXml; dicData = Function.ReadXML(xmlData); } } using (Biz202 biz = new Biz202()) { lstCtrlLocation = biz.GetQnCtrlLocation(lstQuest[1]); } using (Biz209 biz = new Biz209()) { lstTopic = new List <EntityDicQnSetting>(); lstItems = new List <EntityDicQnSetting>(); biz.GetQnCustom(1, out lstTopic, out lstItems); } int locationX = 0; int locationY = 0; int F35Count = 0; int F35Row = (lstTopic.FindAll(r => r.fieldId.Contains("F035")).Count) / 6; int F35Y = 0; List <EntityDicQnSetting> lstChildSettings = new List <EntityDicQnSetting>(); if (lstTopic != null && lstTopic.Count > 0) { for (int i = 0; i < lstTopic.Count; i++) { EntityDicQnSetting item = lstTopic[i]; if (item.questName == lstQuest[1]) { if (item.fieldId.Contains("F035")) { DevExpress.XtraReports.UI.XRCheckBox chkAns = new DevExpress.XtraReports.UI.XRCheckBox(); chkAns.Text = item.fieldName; chkAns.Font = new System.Drawing.Font("宋体", 9.5F); chkAns.Name = item.fieldId; EntityCtrlLocation ctrLocat = lstCtrlLocation.FindAll(r => r.name.Contains("F035"))[F35Count]; locationX = ctrLocat.locationX; locationY = ctrLocat.locationY; F35Y += locationY; chkAns.Width = ctrLocat.width; chkAns.Height = ctrLocat.height; chkAns.Location = new System.Drawing.Point(locationX, locationY); if (dicData.ContainsKey(item.fieldId)) { string value = dicData[item.fieldId]; chkAns.Checked = value == "0" ? false : true; } this.Detail.Controls.Add(chkAns); F35Count++; } } } F35Y -= 80; for (int i2 = 0; i2 < lstTopic.Count; i2++) { EntityDicQnSetting itemVo = lstTopic[i2]; if (itemVo.questName == lstQuest[1]) { if (string.IsNullOrEmpty(itemVo.parentFieldId) && !itemVo.fieldId.Contains("F035")) { DevExpress.XtraReports.UI.XRLabel lblTopic = new DevExpress.XtraReports.UI.XRLabel(); lblTopic.Name = itemVo.fieldId; lblTopic.Text = itemVo.fieldName; lblTopic.Font = new System.Drawing.Font("宋体", 9.5F); EntityCtrlLocation ctrLocat = lstCtrlLocation.Find(r => r.name == itemVo.fieldId); locationX = ctrLocat.locationX; locationY = ctrLocat.locationY - F35Y; lblTopic.Location = new System.Drawing.Point(locationX, locationY); this.Detail.Controls.Add(lblTopic); lstChildSettings = lstTopic.FindAll(r => r.parentFieldId == itemVo.fieldId); if (lstChildSettings.Count > 0) { foreach (var childVo in lstChildSettings) { DevExpress.XtraReports.UI.XRCheckBox chkAns = new DevExpress.XtraReports.UI.XRCheckBox(); string strEndWith = childVo.fieldId.Substring(4, 2); chkAns.Text = childVo.fieldName; chkAns.Font = new System.Drawing.Font("宋体", 9.5F); chkAns.Name = childVo.fieldId; EntityCtrlLocation ctrLocatChild = lstCtrlLocation.Find(r => r.name == childVo.fieldId); locationX = ctrLocatChild.locationX; locationY = ctrLocatChild.locationY - F35Y; chkAns.Width = ctrLocatChild.width; chkAns.Height = ctrLocatChild.height; chkAns.Location = new System.Drawing.Point(locationX, locationY); if (dicData.ContainsKey(childVo.fieldId)) { string value = dicData[childVo.fieldId]; chkAns.Checked = value == "0" ? false : true; } this.Detail.Controls.Add(chkAns); } } } } } } if (lstCtrlLocation != null && lstCtrlLocation.Count > 0) { foreach (var clVo in lstCtrlLocation) { DevExpress.XtraReports.UI.XRLabel lblTopic = new DevExpress.XtraReports.UI.XRLabel(); lblTopic.Name = clVo.name; lblTopic.Text = clVo.text; lblTopic.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold); locationX = clVo.locationX; if (clVo.name == "FM0201") { locationY = clVo.locationY; } else if (clVo.name.Contains("FM")) { locationY = clVo.locationY - F35Y; } else { continue; } lblTopic.Location = new System.Drawing.Point(locationX, locationY); this.Detail.Controls.Add(lblTopic); } } } catch (Exception ex) { ExceptionLog.OutPutException(ex); } finally { } }
/// <summary> /// AddQuestCtrl /// </summary> void AddQuestCtrl(EntityQnRecord qnRecord) { try { if (qnRecord != null) { if (!string.IsNullOrEmpty(qnRecord.xmlData)) { XmlDocument document = new XmlDocument(); document.LoadXml(qnRecord.xmlData); XmlNodeList list = document["FormData"].ChildNodes; xmlData = list[1].OuterXml; dicData = Function.ReadXML(xmlData); } } using (Biz202 biz = new Biz202()) { lstCtrlLocation = biz.GetQnCtrlLocation(lstQuest[0]); } using (Biz209 biz = new Biz209()) { lstTopic = new List <EntityDicQnSetting>(); lstItems = new List <EntityDicQnSetting>(); biz.GetQnCustom(1, out lstTopic, out lstItems); } int locationX = 0; int locationY = 0; if (lstCtrlLocation != null && lstCtrlLocation.Count > 0) { foreach (var clVo in lstCtrlLocation) { if (clVo.name.Contains("FT")) { DevExpress.XtraReports.UI.XRLabel lblTopic = new DevExpress.XtraReports.UI.XRLabel(); lblTopic.Name = clVo.name; lblTopic.Text = clVo.text; lblTopic.Font = new System.Drawing.Font("宋体", 9.5F); locationX = clVo.locationX; locationY = clVo.locationY; lblTopic.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY); this.Detail.Controls.Add(lblTopic); } if (clVo.name.Contains("FM")) { DevExpress.XtraReports.UI.XRLabel lblTopic = new DevExpress.XtraReports.UI.XRLabel(); lblTopic.Name = clVo.name; lblTopic.Text = clVo.text; lblTopic.Font = new System.Drawing.Font("宋体", 9.75F, System.Drawing.FontStyle.Bold); locationX = clVo.locationX; locationY = clVo.locationY; lblTopic.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY); this.Detail.Controls.Add(lblTopic); } } } int parentCount = 0; List <EntityDicQnSetting> lstChildSettings = new List <EntityDicQnSetting>(); if (lstTopic != null && lstTopic.Count > 0) { for (int i = 0; i < lstTopic.Count; i++) { EntityDicQnSetting item = lstTopic[i]; if (item.questName == lstQuest[0]) { if (string.IsNullOrEmpty(item.parentFieldId)) { DevExpress.XtraReports.UI.XRLabel lblTopic = new DevExpress.XtraReports.UI.XRLabel(); lblTopic.Name = item.fieldId; lblTopic.Text = lstTopic.Find(r => r.fieldId == item.fieldId).fieldName; lblTopic.Font = new System.Drawing.Font("宋体", 9.5F); EntityCtrlLocation ctrLocat = lstCtrlLocation.FindAll(r => r.type == 1)[parentCount]; locationX = ctrLocat.locationX; locationY = ctrLocat.locationY; lblTopic.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY); this.Detail.Controls.Add(lblTopic); lstChildSettings = lstTopic.FindAll(r => r.parentFieldId == item.fieldId); if (lstChildSettings.Count > 0) { foreach (var childVo in lstChildSettings) { DevExpress.XtraReports.UI.XRCheckBox chkAns = new DevExpress.XtraReports.UI.XRCheckBox(); string strEndWith = childVo.fieldId.Substring(4, 2); chkAns.Text = ""; chkAns.Font = new System.Drawing.Font("宋体", 9.5F); chkAns.Name = childVo.fieldId; EntityCtrlLocation ctrLocatChild = lstCtrlLocation.Find(r => r.name.Contains(ctrLocat.name) && r.type == 2 && r.name.EndsWith(strEndWith)); locationX = ctrLocatChild.locationX; locationY = ctrLocatChild.locationY; chkAns.Dpi = 100F; chkAns.LocationFloat = new DevExpress.Utils.PointFloat(locationX, locationY); chkAns.SizeF = new System.Drawing.SizeF(15.625F, 23F); if (dicData.ContainsKey(childVo.fieldId)) { string value = dicData[childVo.fieldId]; chkAns.Checked = value == "0" ? false : true; } this.Detail.Controls.Add(chkAns); } } parentCount++; } } } } } catch (Exception ex) { ExceptionLog.OutPutException(ex); } finally { } }