/// <summary> /// 获取房屋专业记载MODEL /// </summary> /// <param name="tSingleProjectID">工程ID</param> /// <returns></returns> public b_single_project_MDL GetModule(int tSingleProjectID) { b_single_project_BLL bll = new b_single_project_BLL(); b_single_project_MDL mdl = new b_single_project_MDL(); if (tSingleProjectID > 0) { List <b_single_project_MDL> projectmdl = bll.GetModelList("SingleProjectID=" + tSingleProjectID); if (projectmdl.Count > 0) { mdl = bll.GetModel(projectmdl[0].SingleProjectID); } } object obj = Comm.GetValueToObject(mdl, tabledetail); return((b_single_project_MDL)obj); }
private void DataBindEx() { T_SingleProject_MDL projectmdl = singleProjectBLL.GetModel(ConvertEx.ToInt(HSingleProjectID.Value)); b_single_project_MDL a_projectmdl = bsingleProjectBLL.GetModel(ConvertEx.ToInt(HSingleProjectID.Value)); if (projectmdl != null && a_projectmdl != null) { projectmdl.fz = a_projectmdl.fz; StringBuilder singlePoint = new StringBuilder(); StringBuilder ghxkz = new StringBuilder(); StringBuilder sgxkz = new StringBuilder(); StringBuilder other = new StringBuilder(); StringBuilder allStr = new StringBuilder(); #region 获取显示工程所有的坐标信息,按OrderIndex排序 List <T_SingleProject_Point_MDL> ltPoint = new T_SingleProject_Point_BLL().GetModelList("SingleProjectID=" + projectmdl.SingleProjectID); if (ltPoint != null && ltPoint.Count > 0) { singlePoint.Append("<table class=\"zpxxxj\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> "); singlePoint.Append("<tr>"); singlePoint.Append(" <td colspan=\"4\" style=\"height: 10px\"><strong>工程坐标信息预览</strong></td>"); singlePoint.Append("</tr>"); int index = 0; foreach (T_SingleProject_Point_MDL pintMDL in ltPoint) { index++; singlePoint.Append(" <tr>"); singlePoint.Append(" <td class=\"ww\">X" + index + "坐标:</td>"); singlePoint.Append(" <td>"); singlePoint.Append(" <input type=\"text\" readonly=\"readonly\" value=\"" + pintMDL.X + "\" title=\"" + pintMDL.X + "\" class=\"dd\" />"); singlePoint.Append(" </td>"); singlePoint.Append(" <td class=\"ww\">Y" + index + "坐标:</td>"); singlePoint.Append(" <td>"); singlePoint.Append(" <input type=\"text\" readonly=\"readonly\" value=\"" + pintMDL.Y + "\" title=\"" + pintMDL.Y + "\" class=\"dd\" />"); singlePoint.Append(" </td>"); singlePoint.Append(" </tr> "); } singlePoint.Append("</table>"); ltPointHtml.Text = singlePoint.ToString(); } #endregion #region 获取工程对应的所有上传证件的附件 List <T_FileAttach_MDL> lt_ftMdl = new T_FileAttach_BLL().GetModelList("PriKeyValue=" + projectmdl.SingleProjectID); foreach (T_FileAttach_MDL ftMdl in lt_ftMdl) { if (ftMdl.AttachCode == "ghxkz") { ghxkz.Append(" <a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a> "); } else if (ftMdl.AttachCode == "sgxkz") { sgxkz.Append(" <a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a> "); } else if (ftMdl.AttachCode == "other") { other.Append(" <a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a> "); } } if (ghxkz.Length > 0 || sgxkz.Length > 0 || other.Length > 0) { allStr.Append("<table class=\"zpxxxj\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); allStr.Append("<tr>"); allStr.Append("<td colspan=\"4\" style=\"height: 10px\">"); allStr.Append("<strong>文号项扫描件预览</strong>"); allStr.Append("</td>"); allStr.Append("</tr>"); } if (ghxkz.Length > 0 || sgxkz.Length > 0) { allStr.Append("<tr>"); if (ghxkz.Length > 0) { allStr.Append("<td class=\"ww\">规划许可证号:</td>"); allStr.Append("<td>"); allStr.Append(ghxkz.ToString()); allStr.Append("</td>"); } if (sgxkz.Length > 0) { allStr.Append("<td class=\"ww\">施工许可证号:</td>"); allStr.Append("<td>"); allStr.Append(sgxkz.ToString()); allStr.Append("</td>"); } allStr.Append("</tr>"); } if (other.Length > 0) { allStr.Append("<tr>"); allStr.Append(" <td class=\"ww\">其它证件附件:"); allStr.Append("</td>"); allStr.Append(" <td colspan=\"3\" style=\"word-break: break-all;\">"); allStr.Append(other.ToString()); allStr.Append(" </td>"); allStr.Append("</tr>"); } allStr.Append("</table>"); ltImage.Text = allStr.ToString(); #endregion } Comm.SetValueToPage(projectmdl, tablemain); if (jsdw.Text == "") { jsdw.Text = Common.Session.GetSession("CompanyName"); } }