protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); switch (this.RequestAction) { default: DoSelect(); break; } DataTable dt = DataHelper.QueryDataTable("select * from NCRL_SP..Project where id='" + id + "'"); this.PageState.Add("pro", dt); if (op != "c" && op != "cs") { dt = DataHelper.QueryDataTable("select Id from NCRL_SP..ShenChaReport where ProjectId='" + id + "'"); if (dt.Rows.Count != 0) { string sid = dt.Rows[0]["Id"].ToString(); if (!String.IsNullOrEmpty(sid)) { ent = ShenChaReport.Find(sid); } this.SetFormData(ent); } } }
private void DoSelect() { if (!string.IsNullOrEmpty(id)) { ent = ShenChaReport.Find(id); Project pEnt = Project.Find(ent.ProjectId); PageState.Add("ProjectInfo", pEnt); PageState.Add("ReportInfo", ent); } }
string type = String.Empty; // 对象类型 #endregion #region ASP.NET 事件 protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); type = RequestData.Get <string>("type"); ShenChaReport ent = null; switch (this.RequestAction) { case RequestActionEnum.Update: ent = this.GetMergedData <ShenChaReport>(); ent.DoUpdate(); this.SetMessage("修改成功!"); break; case RequestActionEnum.Insert: case RequestActionEnum.Create: ent = this.GetPostedData <ShenChaReport>(); ent.DoCreate(); this.SetMessage("新建成功!"); break; case RequestActionEnum.Delete: ent = this.GetTargetData <ShenChaReport>(); ent.DoDelete(); this.SetMessage("删除成功!"); return; } DataTable dt = DataHelper.QueryDataTable("select * from NCRL_SP..Project where id='" + id + "'"); this.PageState.Add("pro", dt); if (op != "c" && op != "cs") { dt = DataHelper.QueryDataTable("select Id from NCRL_SP..ShenChaReport where ProjectId='" + id + "'"); if (dt.Rows.Count != 0) { string sid = dt.Rows[0]["Id"].ToString(); if (!String.IsNullOrEmpty(sid)) { ent = ShenChaReport.Find(sid); } this.SetFormData(ent); } } }
protected void Page_Load(object sender, EventArgs e) { try { Aim.Portal.Web.WebPortalService.CheckLogon(); } catch { Response.Write("<script> window.parent.location.href = '/Login.aspx';</script>"); Response.End(); } string templatepath = ConfigurationManager.AppSettings["TemplatePath"].ToString(); string action = Request["action"]; string id = Request["id"]; Document srcDoc = null; BookmarkCollection marks = null; IList <EasyDictionary> dics = null; string filename = ""; if (!string.IsNullOrEmpty(id)) { pEnt = Project.Find(id); } switch (action) { case "loadproject": string ProjectName = Request["ProjectName"]; if (!string.IsNullOrEmpty(ProjectName)) { where = "and ProjectName like '%" + ProjectName + "%' "; } sql = @"select * from NCRL_SP..Project where BelongCmp = 'ZX' " + where; dt = DataHelper.QueryDataTable(GetPageSql(sql)); Response.Write("{rows:" + JsonHelper.GetJsonStringFromDataTable(dt) + ",total:" + totalProperty + "}"); Response.End(); break; case "delete": Delete(); break; case "Recycle": Recycle(); break; case "loadexportfile": sql = "select Id,Name,CreateTime from FileItem where ProjectId='" + id + "' and Path='导出' order by CreateTime asc"; dt = DataHelper.QueryDataTable(sql); Response.Write("{innerrows:" + JsonHelper.GetJsonStringFromDataTable(dt) + "}"); Response.End(); break; case "export_opinioncover": //意见封面 try { srcDoc = new Document(templatepath + "审查意见封面.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty(pEnt, mark.Name)) { mark.Text = pEnt.GetValue(mark.Name) + ""; } } filename = pEnt.ProjectName.Replace("#", "") + "_审查意见封面.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch { Response.Write("{success:false}"); } Response.End(); break; case "exporthegeshu": srcDoc = new Document(templatepath + "审查合格书_市政工程_房屋建筑.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty(pEnt, mark.Name)) { mark.Text = pEnt.GetValue(mark.Name) + ""; } } sql = @"select a.MajorName,(select top 1 SortIndex from SysEnumeration where ParentId='b640c40c-e2a9-41a8-bd28-d8ff9d71ff94' and Name=a.MajorName) as SortIndex from NCRL_SP..ProjectUser a where a.ProjectId='" + pEnt.Id + "' order by SortIndex asc"; dics = DataHelper.QueryDictList(sql); int i = 1; foreach (EasyDictionary dic in dics) { if (dic.Get <string>("MajorName") != "勘察") { if (marks["Major" + i] != null) { marks["Major" + i].Text = dic.Get <string>("MajorName"); } i++; } } filename = pEnt.ProjectName.Replace("#", "") + "_审查合格书.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); break; case "export_beiandengjibiao": try { srcDoc = new Document(templatepath + "附件10施工图设计文件审查备案登记表.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty(pEnt, mark.Name)) { mark.Text = pEnt.GetValue(mark.Name) + ""; } } if (marks["Layer"] != null) { marks["Layer"].Text = "地上层数:" + pEnt.UpperLayers + (string.IsNullOrEmpty(pEnt.DownLayers) ? "" : "地下层数:" + pEnt.DownLayers); } if (marks["KanChaIfBeiAn"] != null) { marks["KanChaIfBeiAn"].Text = string.IsNullOrEmpty(pEnt.KanChaUnitBeiAnNo) ? "否" : "是"; } if (marks["SheJiIfBeiAn"] != null) { marks["SheJiIfBeiAn"].Text = string.IsNullOrEmpty(pEnt.SheJiUnitBeiAnNo) ? "否" : "是"; } sql = @"select a.*,(select top 1 SortIndex from NCRL_Portal..SysEnumeration where Name=a.MajorName and ParentId='b640c40c-e2a9-41a8-bd28-d8ff9d71ff94') as SortIndex from NCRL_SP..KanChaSheJi a where a.ProjectId='" + pEnt.Id + "' order by SortIndex asc"; dics = DataHelper.QueryDictList(sql); //勘察设计人员 int index = 1; foreach (EasyDictionary dic in dics) { if (dic.Get <string>("Position") == "注册土木工程师(岩土)") { if (marks["ZhuCeYanTuName"] != null) { marks["ZhuCeYanTuName"].Text = dic.Get <string>("UserName"); } if (marks["ZhuCeYanTuSealNo"] != null) { marks["ZhuCeYanTuSealNo"].Text = dic.Get <string>("SealNo"); } if (marks["ZhuCeYanTuShenFenZheng"] != null) { marks["ZhuCeYanTuShenFenZheng"].Text = dic.Get <string>("ShenFenZhengNo"); } } else if (dic.Get <string>("Position") == "一级注册建筑师") { if (marks["ZhuCeJianZaoShiName"] != null) { marks["ZhuCeJianZaoShiName"].Text = dic.Get <string>("UserName"); } if (marks["ZhuCeJianZaoShiSealNo"] != null) { marks["ZhuCeJianZaoShiSealNo"].Text = dic.Get <string>("SealNo"); } if (marks["ZhuCeJianZaoShiShenFenZheng"] != null) { marks["ZhuCeJianZaoShiShenFenZheng"].Text = dic.Get <string>("ShenFenZhengNo"); } } else if (dic.Get <string>("Position") == "一级注册结构师") { if (marks["ZhuCeJieGouShiName"] != null) { marks["ZhuCeJieGouShiName"].Text = dic.Get <string>("UserName"); } if (marks["ZhuCeJieGouShiSealNo"] != null) { marks["ZhuCeJieGouShiSealNo"].Text = dic.Get <string>("SealNo"); } if (marks["ZhuCeJieGouShiShenFenZheng"] != null) { marks["ZhuCeJieGouShiShenFenZheng"].Text = dic.Get <string>("ShenFenZhengNo"); } } else { if (marks["SheJi_MajorName" + index] != null) { marks["SheJi_MajorName" + index].Text = dic.Get <string>("MajorName"); } if (marks["SheJi_UserName" + index] != null) { marks["SheJi_UserName" + index].Text = dic.Get <string>("UserName"); } index++; } } sql = @"select a.*,(select top 1 SortIndex from NCRL_Portal..SysEnumeration where Name=a.MajorName and ParentId='b640c40c-e2a9-41a8-bd28-d8ff9d71ff94') as SortIndex ,b.StampNo as QianZhangStampNo,c.StampNo as ShenHeStampNo from NCRL_SP..ProjectUser a left join NCRL_SP..Expert b on b.Id=a.QianZhangId left join NCRL_SP..Expert c on c.Id=a.ShenHeId where a.ProjectId='" + pEnt.Id + "' order by SortIndex asc"; dics = DataHelper.QueryDictList(sql); index = 1; foreach (EasyDictionary dic in dics) { if (marks["ShenTu_MajorName" + index] != null) { marks["ShenTu_MajorName" + index].Text = dic.Get <string>("MajorName"); } if (marks["ShenTu_UserName" + index] != null) { marks["ShenTu_UserName" + index].Text = dic.Get <string>("QianZhangName"); } if (marks["ShenTu_SealNo" + index] != null) { marks["ShenTu_SealNo" + index].Text = dic.Get <string>("QianZhangStampNo"); } if (marks["FuHe_UserName" + index] != null) { marks["FuHe_UserName" + index].Text = dic.Get <string>("ShenHeName"); } if (marks["FuHe_SealNo" + index] != null) { marks["FuHe_SealNo" + index].Text = dic.Get <string>("ShenHeStampNo"); } index++; } //写入备案登记表信息 IList <BeiAn_Project> bapEnts = BeiAn_Project.FindAllByProperty(BeiAn_Project.Prop_ProjectId, pEnt.Id); if (bapEnts.Count > 0) { for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty_Object(bapEnts[0], mark.Name)) { mark.Text = bapEnts[0].GetValue(mark.Name) + ""; } } } filename = pEnt.ProjectName.Replace("#", "") + "_审查备案登记表.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch { Response.Write("{success:false}"); } Response.End(); break; case "export_shenchabaogao": try { if (pEnt.ProjectType == "房屋建筑") { srcDoc = new Document(templatepath + "房屋建筑_审查报告.doc"); } if (pEnt.ProjectType == "市政工程") { srcDoc = new Document(templatepath + "市政工程_审查报告.doc"); } if (pEnt.ProjectType == "基坑支护") { srcDoc = new Document(templatepath + "基坑支护_审查报告.doc"); } marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty(pEnt, mark.Name)) { mark.Text = pEnt.GetValue(mark.Name) + ""; } } IList <ShenChaReport> scrEnts = ShenChaReport.FindAllByProperty(ShenChaReport.Prop_ProjectId, pEnt.Id); if (scrEnts.Count > 0) { for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty_Object(scrEnts[0], mark.Name)) { mark.Text = scrEnts[0].GetValue(mark.Name) + ""; } } } if (marks["Layer"] != null) { marks["Layer"].Text = "地上层数:" + pEnt.UpperLayers + (string.IsNullOrEmpty(pEnt.DownLayers) ? "" : "地下层数:" + pEnt.DownLayers); } if (marks["ProjectName1"] != null) { marks["ProjectName1"].Text = pEnt.ProjectName; } if (marks["JianSheUnit1"] != null) { marks["JianSheUnit1"].Text = pEnt.JianSheUnit; } filename = pEnt.ProjectName.Replace("#", "") + "_审查报告.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; case "export_kanchashenchabaogao": try { srcDoc = new Document(templatepath + "江西省工程勘察审查报告书.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty(pEnt, mark.Name)) { mark.Text = pEnt.GetValue(mark.Name) + ""; } } IList <ShenChaReport_KanCha> scrkEnts = ShenChaReport_KanCha.FindAllByProperty(ShenChaReport_KanCha.Prop_ProjectId, pEnt.Id); if (scrkEnts.Count > 0) { for (int j = 0; j < marks.Count; j++) { if (ContainProperty_Object(scrkEnts[0], marks[j].Name)) { marks[j].Text = scrkEnts[0].GetValue(marks[j].Name) + ""; } } } if (marks["ProjectName2"] != null) { marks["ProjectName2"].Text = pEnt.ProjectName; } if (marks["JianSheUnit2"] != null) { marks["JianSheUnit2"].Text = pEnt.JianSheUnit; } filename = pEnt.ProjectName.Replace("#", "") + "_工程勘察审查报告.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; case "exportqingkuangjilu": try { srcDoc = new Document(templatepath + "附件6房屋建筑和市政基础设施工程施工图设计文件审查情况记录.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty(pEnt, mark.Name)) { mark.Text = pEnt.GetValue(mark.Name) + ""; } } filename = pEnt.ProjectName.Replace("#", "") + "_审查情况记录.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; case "export_shenchahuizong": try { srcDoc = new Document(templatepath + "审查情况汇总.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { Bookmark mark = marks[j]; if (ContainProperty(pEnt, mark.Name)) { mark.Text = pEnt.GetValue(mark.Name) + ""; } } if (marks["ProjectType2"] != null) { marks["ProjectType2"].Text = pEnt.ProjectType; } if (marks["Layer"] != null) { marks["Layer"].Text = "地上层数:" + pEnt.UpperLayers + (string.IsNullOrEmpty(pEnt.DownLayers) ? "" : "地下层数:" + pEnt.DownLayers); } //找到项目人员 排除勘察专业的 sql = @"select a.*,(select top 1 SortIndex from NCRL_Portal..SysEnumeration where Name=a.MajorName and ParentId='b640c40c-e2a9-41a8-bd28-d8ff9d71ff94') as SortIndex from NCRL_SP..ProjectUser a where a.ProjectId='" + pEnt.Id + "' order by SortIndex asc"; dics = DataHelper.QueryDictList(sql); int index = 1; foreach (EasyDictionary dic in dics) { if (dic.Get <string>("MajorName") != "勘察") { if (marks["MajorName" + index] != null) { marks["MajorName" + index].Text = dic.Get <string>("MajorName"); } if (marks["QianZhangName" + index] != null) { marks["QianZhangName" + index].Text = dic.Get <string>("QianZhangName"); } index++; } } sql = @"select isnull(sum(QiangTiao),0) from NCRL_SP..ExamineOpinion where ExamineTaskId in ( select Id from NCRL_SP..ExamineTask where ProjectId='" + pEnt.Id + "')"; if (marks["QiangTiao"] != null) { marks["QiangTiao"].Text = DataHelper.QueryValue(sql) + ""; } filename = pEnt.ProjectName.Replace("#", "") + "_审查情况汇总.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; case "export_shenchahuizong_kancha": //审查情况汇总表_工程勘察 try { srcDoc = new Document(templatepath + "审查情况汇总表_工程勘察.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { if (ContainProperty(pEnt, marks[j].Name)) { marks[j].Text = pEnt.GetValue(marks[j].Name) + ""; } } if (marks["QianZhangName"] != null) //找到勘察专业的签章专家 { IList <ProjectUser> puEnts = ProjectUser.FindAllByProperties(ProjectUser.Prop_ProjectId, pEnt.Id, ProjectUser.Prop_MajorName, "勘察"); if (puEnts.Count > 0) { marks["QianZhangName"].Text = puEnts[0].QianZhangName; } } if (marks["QiangTiao"] != null) //找到勘察专业的强条 { IList <ExamineTask> etEnts = ExamineTask.FindAllByProperties(ExamineTask.Prop_MajorName, "勘察", ExamineTask.Prop_ProjectId, pEnt.Id); if (etEnts.Count > 0) { sql = "select isnull(sum(QiangTiao),0) from NCRL_SP..ExamineOpinion where ExamineTaskId='" + etEnts[0].Id + "'"; marks["QiangTiao"].Text = DataHelper.QueryValue <Int32>(sql) + ""; } } filename = pEnt.ProjectName.Replace("#", "") + "_工程勘察审查情况汇总表.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; case "export_kangzhen": try { srcDoc = new Document(templatepath + "抗震设防监管表.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { if (ContainProperty(pEnt, marks[j].Name)) { marks[j].Text = pEnt.GetValue(marks[j].Name) + ""; } } IList <KangZhen_Project> kzpEnts = KangZhen_Project.FindAllByProperty(KangZhen_Project.Prop_ProjectId, pEnt.Id); if (kzpEnts.Count > 0) { for (int j = 0; j < marks.Count; j++) { if (ContainProperty_Object(kzpEnts[0], marks[j].Name)) { marks[j].Text = kzpEnts[0].GetValue <string>(marks[j].Name); } } } if (pEnt.Property == "新建" && marks["XinJian"] != null) { marks["XinJian"].Text = "√"; } if (pEnt.Property == "改建" && marks["GaiJian"] != null) { marks["GaiJian"].Text = "√"; } if (pEnt.Property == "扩建" && marks["KuoJian"] != null) { marks["KuoJian"].Text = "√"; } filename = pEnt.ProjectName.Replace("#", "") + "_抗震设防专项审查监管表.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; case "export_zhongshenyijianbiao": try { srcDoc = new Document(templatepath + "附件5_终审意见表.doc"); marks = srcDoc.Range.Bookmarks; for (int j = 0; j < marks.Count; j++) { if (ContainProperty(pEnt, marks[j].Name)) { marks[j].Text = pEnt.GetValue(marks[j].Name) + ""; } } IList <ZhongShenOpinion_Project> zsopEnts = ZhongShenOpinion_Project.FindAllByProperty(ZhongShenOpinion_Project.Prop_ProjectId, pEnt.Id); if (zsopEnts.Count > 0) { for (int j = 0; j < marks.Count; j++) { if (ContainProperty_Object(zsopEnts[0], marks[j].Name)) { marks[j].Text = zsopEnts[0].GetValue(marks[j].Name) + ""; } } } filename = pEnt.ProjectName.Replace("#", "") + "_终审意见表.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; case "export_subproject": //导出子项 try { srcDoc = new Document(templatepath + "子项目明细表.doc"); marks = srcDoc.Range.Bookmarks; IList <SubProject> suEnts = SubProject.FindAllByProperty(SubProject.Prop_ProjectId, pEnt.Id); for (int j = 0; j < suEnts.Count; j++) { foreach (PropertyInfo pi in SubProject.AllProperties) { if (marks[pi.Name + (j + 1)] != null) { marks[pi.Name + (j + 1)].Text = suEnts[j].GetValue(pi.Name) + ""; } } } if (marks["ProjectName"] != null) { marks["ProjectName"].Text = pEnt.ProjectName; } filename = pEnt.ProjectName.Replace("#", "") + "_子项目明细表.doc"; srcDoc.Save(@"D:\RW\Files\AppFiles\Portal\Default\" + filename); UpdateFileItem(filename); Response.Write("{success:true}"); } catch (Exception ex) { Response.Write("{success:false}"); } Response.End(); break; } }
protected void Page_Load(object sender, EventArgs e) { string action = Request["action"]; ProjectId = Request["ProjectId"]; string obj = ""; if (!string.IsNullOrEmpty(action)) { switch (action) { case "SelectEdit": sql = @"select P.ProjectName ,P.Investment,P.DetailLocation,P.EngineeringLevel,P.Height, P.UpperLayers,P.DownLayers,P.BuildingArea,P.JianSheUnit,P.JianSheUnitHead,P.KanChaUnit, P.KanChaUnitHead,P.KanChaZZLevel,P.KanChaUnitZSNo, P.SheJiUnit, P.SheJiUnitHead, P.SheJiUnitGrade, P.SheJiUnitZSNo, P.IfChaoGao,P.GongChenLiang, S.Id, S.ShenChaNo,S.ProjectId,S.Opinion1 ,S.Opinion1ShenChaName,S.Opinion1CreateTime, S.Opinion2, S.Opinion2ShenChaName,S.Opinion2CreateTime, S.Opinion3, S.Opinion3ShenChaName,S.Opinion3CreateTime, S.Opinion4, S.Opinion4ShenChaName,S.Opinion4CreateTime,S.Opinion5, S.Opinion5ShenChaName,S.Opinion5CreateTime, S.Opinion6, S.Opinion6ShenChaName,S.Opinion6CreateTime,S.Opinion7, S.Opinion7ShenChaName,S.Opinion7CreateTime from NCRL_SP..Project as P left join NCRL_SP..ShenChaReport as S on P.ID =S.ProjectId where P.Id='" + ProjectId + "'"; IList <EasyDictionary> dics = DataHelper.QueryDictList(sql); if (!string.IsNullOrEmpty(dics[0].Get <string>("Opinion1CreateTime"))) { dics[0].Set("Opinion1CreateTime", dics[0].Get <DateTime>("Opinion1CreateTime").ToString("yyyy-MM-dd")); } if (!string.IsNullOrEmpty(dics[0].Get <string>("Opinion2CreateTime"))) { dics[0].Set("Opinion2CreateTime", dics[0].Get <DateTime>("Opinion2CreateTime").ToString("yyyy-MM-dd")); } if (!string.IsNullOrEmpty(dics[0].Get <string>("Opinion3CreateTime"))) { dics[0].Set("Opinion3CreateTime", dics[0].Get <DateTime>("Opinion3CreateTime").ToString("yyyy-MM-dd")); } if (!string.IsNullOrEmpty(dics[0].Get <string>("Opinion4CreateTime"))) { dics[0].Set("Opinion4CreateTime", dics[0].Get <DateTime>("Opinion4CreateTime").ToString("yyyy-MM-dd")); } if (!string.IsNullOrEmpty(dics[0].Get <string>("Opinion5CreateTime"))) { dics[0].Set("Opinion5CreateTime", dics[0].Get <DateTime>("Opinion5CreateTime").ToString("yyyy-MM-dd")); } if (!string.IsNullOrEmpty(dics[0].Get <string>("Opinion6CreateTime"))) { dics[0].Set("Opinion6CreateTime", dics[0].Get <DateTime>("Opinion6CreateTime").ToString("yyyy-MM-dd")); } if (!string.IsNullOrEmpty(dics[0].Get <string>("Opinion7CreateTime"))) { dics[0].Set("Opinion7CreateTime", dics[0].Get <DateTime>("Opinion7CreateTime").ToString("yyyy-MM-dd")); } Response.Write("{success: true,data:" + JsonHelper.GetJsonString(dics[0]) + "}"); Response.End(); break; case "Create": obj = Request["json"]; ent = JsonHelper.GetObject <ShenChaReport>(obj); ent.ProjectId = ProjectId; ent.CreateId = WebPortalService.CurrentUserInfo.UserID; ent.CreateName = WebPortalService.CurrentUserInfo.Name; ent.CreateTime = DateTime.Now; ent.DoCreate(); Response.Write("{ShenChaId:'" + ent.Id + "'}"); Response.End(); break; case "Update": obj = Request["json"]; ent = JsonHelper.GetObject <ShenChaReport>(obj); ShenChaReport Oent = ShenChaReport.Find(ent.Id); EasyDictionary dic = JsonHelper.GetObject <EasyDictionary>(obj); ent = DataHelper.MergeData <ShenChaReport>(Oent, ent, dic.Keys); ent.DoUpdate(); Response.Write("{ShenChaId:'" + ent.Id + "'}"); Response.End(); break; case "check": DoCheck(); break; } } }
protected void Page_Load(object sender, EventArgs e) { string projectid = Request["ProjectId"]; Project pEnt = Project.Find(projectid); lbProjectName.InnerHtml = pEnt.ProjectName; lbShenChaJiGou.InnerHtml = "江西瑞林工程咨询有限公司"; lbGongChengName.InnerHtml = pEnt.ProjectName; lbDetailLocation.InnerHtml = pEnt.DetailLocation; lbJianSheUnit.InnerHtml = pEnt.JianSheUnit; lbBuildingArea.InnerHtml = pEnt.BuildingArea; lbInvestment.InnerHtml = pEnt.Investment + ""; lbHeight.InnerHtml = pEnt.Height; lbLayer.InnerHtml = "地上层数:" + pEnt.UpperLayers + (string.IsNullOrEmpty(pEnt.DownLayers) ? "" : "地下层数:" + pEnt.DownLayers); lbStructureType.InnerHtml = pEnt.StructureType; lbFoundationType.InnerHtml = pEnt.FoundationType; lbKanChaGCLevel.InnerHtml = pEnt.KanChaGCLevel; //pEnt.EngineeringLevel lbJianZhuLeiXing.InnerHtml = pEnt.GongChengLeiXing; lbKanChaUnit.InnerHtml = pEnt.KanChaUnit; lbKanChaUnitHead.InnerHtml = pEnt.KanChaUnitHead; lbKanChaZZLevel.InnerHtml = pEnt.KanChaZZLevel; lbKanChaUnitZSNo.InnerHtml = pEnt.KanChaUnitZSNo; lbKanChaIfBeiAn.InnerHtml = "否"; if (!string.IsNullOrEmpty(pEnt.KanChaUnitBeiAnNo)) { lbKanChaIfBeiAn.InnerHtml = "是"; } lbKanChaUnitBeiAnNo.InnerHtml = pEnt.KanChaUnitBeiAnNo; lbSheJiUnit.InnerHtml = pEnt.SheJiUnit; lbSheJiUnitHead.InnerHtml = pEnt.SheJiUnitHead; lbSheJiUnitGrade.InnerHtml = pEnt.SheJiUnitGrade; lbSheJiUnitZSNo.InnerHtml = pEnt.SheJiUnitZSNo; lbSheJiIfBeiAn.InnerHtml = "否"; if (!string.IsNullOrEmpty(pEnt.SheJiUnitBeiAnNo)) { lbSheJiIfBeiAn.InnerHtml = "是"; } lbSheJiUnitBeiAnNo.InnerHtml = pEnt.SheJiUnitBeiAnNo; literalSheJiUsers.Text = ""; IList <KanChaSheJi> kcsjEnts = KanChaSheJi.FindAllByProperty(KanChaSheJi.Prop_ProjectId, projectid); literalSheJiUsers.Text += "<tr><td rowspan='" + kcsjEnts.Count + 1 + "' style='width:40px'>项</br>目</br>设</br>计</br>人</br>员</br>情</br>况</td><td style='width:150px'>专业</td><td style='width:190px'>姓名</td><td style='width:130px'>执业印章号码</td><td>身份证号码(外省单位)</td></tr>"; foreach (KanChaSheJi kcsjEnt in kcsjEnts) { if (kcsjEnt.Position == "注册土木工程师(岩土)") { lbKanChaUserName.InnerHtml = kcsjEnt.UserName; lbKanChaYinZhangHao.InnerHtml = kcsjEnt.SealNo; lbKanChaShenFenZheng.InnerHtml = kcsjEnt.ShenFenZhengNo; } else { literalSheJiUsers.Text += "<tr><td>" + kcsjEnt.MajorName + "</td><td>" + kcsjEnt.UserName + "</td><td>" + kcsjEnt.SealNo + "</td><td>" + kcsjEnt.ShenFenZhengNo + "</td></tr>"; } } string sql = @"select count(QiangTiao) from NCRL_SP..ExamineOpinion where ExamineTaskId in (select Id from NCRL_SP..ExamineTask where ProjectId='" + projectid + "')"; lbIfYiCiPass.InnerHtml = "是"; if (DataHelper.QueryValue <int>(sql) > 0) { lbIfYiCiPass.InnerHtml = "否"; } sql = @"select a.*,b.StampNo ShenChaYinZhangHao,c.StampNo as ShenHeYinZhangHao, (select top 1 SortIndex from NCRL_Portal..SysEnumeration where ParentId='b640c40c-e2a9-41a8-bd28-d8ff9d71ff94' and Name=a.MajorName) as SortIndex from NCRL_SP..ProjectUser a left join NCRL_SP..Expert b on a.QianZhangId=b.Id left join NCRL_SP..Expert c on a.ShenHeId=c.Id where a.ProjectId='" + projectid + "' order by SortIndex asc "; literal_shencha.Text = ""; IList <EasyDictionary> dics = DataHelper.QueryDictList(sql); literal_shencha.Text += "<tr><td rowspan='" + (dics.Count + 1) + "' style='width:40px'>项<br />目<br />审<br />查<br />人<br />员<br />情<br />况</td><td style='width:95px'>专业</td><td style='width:110px'>审查人员姓名</td><td style='width:110px'>审查印章号码</td><td style='width:60px'>签名</td><td style='width:110px'>复核人员姓名</td><td style='width:110px'>审查印章号码</td><td style='width:60px'>签名</td></tr>"; foreach (EasyDictionary dic in dics) { if (dic.Get <string>("MajorName") != "勘察") { literal_shencha.Text += "<tr><td>" + dic.Get <string>("MajorName") + "</td><td>" + dic.Get <string>("QianZhangName") + "</td><td>" + dic.Get <string>("ShenChaYinZhangHao") + "</td><td></td><td>" + dic.Get <string>("ShenHeName") + "</td><td>" + dic.Get <string>("ShenHeYinZhangHao") + "</td><td></td></tr>"; } } IList <ShenChaReport> scrEnts = ShenChaReport.FindAllByProperty(ShenChaReport.Prop_ProjectId, projectid); if (scrEnts.Count > 0) { lbJingBanYiJian.InnerHtml = scrEnts[0].Opinion7; } }