/// <summary> /// 保存 /// </summary> /// <param name="vo"></param> /// <param name="hId"></param> /// <returns></returns> public int SaveHazards(EntityDicHazards vo, out decimal hId) { using (Biz209 biz = new Biz209()) { return(biz.SaveHazards(vo, out hId)); } }
/// <summary> /// 删除 /// </summary> /// <param name="hId"></param> /// <returns></returns> public int DeleteHazards(decimal hId) { using (Biz209 biz = new Biz209()) { return(biz.DeleteHazards(hId)); } }
/// <summary> /// GetTopics /// </summary> /// <returns></returns> public List <EntityDicQnSetting> GetTopics() { using (Biz209 biz = new Biz209()) { return(biz.GetTopics()); } }
/// <summary> /// GetTopicItems /// </summary> /// <param name="fieldId"></param> /// <returns></returns> public List <EntityDicQnSummary> GetTopicItems(string fieldId) { using (Biz209 biz = new Biz209()) { return(biz.GetTopicItems(fieldId)); } }
/// <summary> /// DeleteQnTopic /// </summary> /// <param name="fieldId"></param> /// <returns></returns> public int DeleteQnTopic(string fieldId) { using (Biz209 biz = new Biz209()) { return(biz.DeleteQnTopic(fieldId)); } }
/// <summary> /// SaveQnTopic /// </summary> /// <param name="mainVo"></param> /// <param name="lstSub"></param> /// <param name="fieldId"></param> /// <returns></returns> public int SaveQnTopic(EntityDicQnSummary mainVo, List <EntityDicQnSummary> lstSub, out string fieldId) { using (Biz209 biz = new Biz209()) { return(biz.SaveQnTopic(mainVo, lstSub, out fieldId)); } }
/// <summary> /// GetQnCustom /// </summary> /// <param name="qnId"></param> /// <param name="lstTopic"></param> /// <param name="lstItems"></param> public void GetQnCustom(decimal qnId, out List <EntityDicQnSetting> lstTopic, out List <EntityDicQnSetting> lstItems) { using (Biz209 biz = new Biz209()) { biz.GetQnCustom(qnId, out lstTopic, out lstItems); } }
/// <summary> /// GetDicQnSummary /// </summary> /// <returns></returns> public List <EntityDicQnSummary> GetDicQnSummary() { using (Biz209 biz = new Biz209()) { return(biz.GetDicQnSummary()); } }
/// <summary> /// GetQnSetting /// </summary> /// <returns></returns> public List <EntityQnSetting> GetQnSetting(decimal qnId) { using (Biz209 biz = new Biz209()) { return(biz.GetQnSetting(qnId)); } }
/// <summary> /// GetQnSettingFromSummary /// </summary> /// <returns></returns> public List <EntityQnSetting> GetQnSettingFromSummary() { using (Biz209 biz = new Biz209()) { return(biz.GetQnSettingFromSummary()); } }
/// <summary> /// GetQnDetail /// </summary> /// <param name="qnId"></param> /// <returns></returns> public List <EntityDicQnDetail> GetQnDetail(decimal qnId) { using (Biz209 biz = new Biz209()) { return(biz.GetQnDetail(qnId)); } }
/// <summary> /// 删除 /// </summary> /// <param name="qnId"></param> /// <returns></returns> public int DeleteQNnormal(decimal qnId) { using (Biz209 biz = new Biz209()) { return(biz.DeleteQNnormal(qnId)); } }
/// <summary> /// 保存 /// </summary> /// <param name="vo"></param> /// <param name="lstDet"></param> /// <param name="qnId"></param> /// <returns></returns> public int SaveQNnormal(EntityDicQnMain vo, List <EntityDicQnDetail> lstDet, out decimal qnId, List <EntityDicQnCtlLocation> lstLaction = null, List <EntityDicQnSetting> lstSettings = null) { using (Biz209 biz = new Biz209()) { return(biz.SaveQNnormal(vo, lstDet, out qnId, lstLaction, lstSettings)); } }
/// <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 { } }