修改质量月报、周报,报错问题

This commit is contained in:
潘鸿锋 2024-12-30 10:21:46 +08:00
parent 7083f10e59
commit 8a897b5df7
4 changed files with 85 additions and 77 deletions

View File

@ -1110,7 +1110,7 @@
<Version>4.7.0</Version> <Version>4.7.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="System.Security.Permissions"> <PackageReference Include="System.Security.Permissions">
<Version>4.7.0</Version> <Version>6.0.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="System.Security.Principal.Windows"> <PackageReference Include="System.Security.Principal.Windows">
<Version>4.7.0</Version> <Version>4.7.0</Version>

View File

@ -244,63 +244,68 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region #region
var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList(); var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
if (txtReportList.FirstOrDefault(x => x.ContentType == "0") != null) if (txtReportList.Count>0)
{ {
txtAre0.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText; if (txtReportList.FirstOrDefault(x => x.ContentType == "0") != null)
} {
if (txtReportList.FirstOrDefault(x => x.ContentType == "1") != null) txtAre0.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText;
{ }
txtAre1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "1").ContentText; if (txtReportList.FirstOrDefault(x => x.ContentType == "1") != null)
} {
if (txtReportList.FirstOrDefault(x => x.ContentType == "2") != null) txtAre1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "1").ContentText;
{ }
txtAre2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "2").ContentText; if (txtReportList.FirstOrDefault(x => x.ContentType == "2") != null)
} {
if (txtReportList.FirstOrDefault(x => x.ContentType == "20") != null) txtAre2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "2").ContentText;
{ }
txtAre20.Text = txtReportList.FirstOrDefault(x => x.ContentType == "20").ContentText; if (txtReportList.FirstOrDefault(x => x.ContentType == "20") != null)
} {
if (txtReportList.FirstOrDefault(x => x.ContentType == "21") != null) txtAre20.Text = txtReportList.FirstOrDefault(x => x.ContentType == "20").ContentText;
{ }
txtAre21.Text = txtReportList.FirstOrDefault(x => x.ContentType == "21").ContentText; if (txtReportList.FirstOrDefault(x => x.ContentType == "21") != null)
} {
if (txtReportList.FirstOrDefault(x => x.ContentType == "22") != null) txtAre21.Text = txtReportList.FirstOrDefault(x => x.ContentType == "21").ContentText;
{ }
txtAre22.Text = txtReportList.FirstOrDefault(x => x.ContentType == "22").ContentText; if (txtReportList.FirstOrDefault(x => x.ContentType == "22") != null)
} {
if (txtReportList.FirstOrDefault(x => x.ContentType == "8") != null) txtAre22.Text = txtReportList.FirstOrDefault(x => x.ContentType == "22").ContentText;
{ }
txtAre8.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText; if (txtReportList.FirstOrDefault(x => x.ContentType == "8") != null)
} {
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-1") != null) txtAre8.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText;
{ }
imgPhoto.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ImageUrl; if (txtReportList.FirstOrDefault(x => x.ContentType == "23-1") != null)
txtPhotoContent1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText; {
} imgPhoto.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ImageUrl;
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-2") != null) txtPhotoContent1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText;
{ }
imgPhoto2.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ImageUrl; if (txtReportList.FirstOrDefault(x => x.ContentType == "23-2") != null)
txtPhotoContent2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ContentText; {
} imgPhoto2.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ImageUrl;
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-3") != null) txtPhotoContent2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ContentText;
{ }
imgPhoto3.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ImageUrl; if (txtReportList.FirstOrDefault(x => x.ContentType == "23-3") != null)
txtPhotoContent3.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ContentText; {
} imgPhoto3.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ImageUrl;
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-4") != null) txtPhotoContent3.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ContentText;
{ }
imgPhoto4.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ImageUrl; if (txtReportList.FirstOrDefault(x => x.ContentType == "23-4") != null)
txtPhotoContent4.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ContentText; {
} imgPhoto4.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ImageUrl;
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-5") != null) txtPhotoContent4.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ContentText;
{ }
imgPhoto5.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ImageUrl; if (txtReportList.FirstOrDefault(x => x.ContentType == "23-5") != null)
txtPhotoContent5.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ContentText; {
} imgPhoto5.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ImageUrl;
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-6") != null) txtPhotoContent5.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ContentText;
{ }
imgPhoto6.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ImageUrl; if (txtReportList.FirstOrDefault(x => x.ContentType == "23-6") != null)
txtPhotoContent6.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ContentText; {
imgPhoto6.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ImageUrl;
txtPhotoContent6.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ContentText;
}
} }
#endregion #endregion

View File

@ -221,27 +221,30 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#region #region
var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList(); var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
txtAre0.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText; if (txtReportList.Count>0)
txtAre1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "1").ContentText; {
txtAre2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "2").ContentText; txtAre0.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText;
txtAre1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "1").ContentText;
txtAre2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "2").ContentText;
txtAre20.Text = txtReportList.FirstOrDefault(x => x.ContentType == "20").ContentText; txtAre20.Text = txtReportList.FirstOrDefault(x => x.ContentType == "20").ContentText;
txtAre21.Text = txtReportList.FirstOrDefault(x => x.ContentType == "21").ContentText; txtAre21.Text = txtReportList.FirstOrDefault(x => x.ContentType == "21").ContentText;
txtAre22.Text = txtReportList.FirstOrDefault(x => x.ContentType == "22").ContentText; txtAre22.Text = txtReportList.FirstOrDefault(x => x.ContentType == "22").ContentText;
txtAre8.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText; txtAre8.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText;
imgPhoto.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ImageUrl; imgPhoto.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ImageUrl;
txtPhotoContent1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText; txtPhotoContent1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText;
imgPhoto2.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ImageUrl; imgPhoto2.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ImageUrl;
txtPhotoContent2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ContentText; txtPhotoContent2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ContentText;
imgPhoto3.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ImageUrl; imgPhoto3.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ImageUrl;
txtPhotoContent3.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ContentText; txtPhotoContent3.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ContentText;
imgPhoto4.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ImageUrl; imgPhoto4.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ImageUrl;
txtPhotoContent4.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ContentText; txtPhotoContent4.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ContentText;
imgPhoto5.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ImageUrl; imgPhoto5.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ImageUrl;
txtPhotoContent5.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ContentText; txtPhotoContent5.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ContentText;
imgPhoto6.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ImageUrl; imgPhoto6.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ImageUrl;
txtPhotoContent6.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ContentText; txtPhotoContent6.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ContentText;
}
#endregion #endregion
//加载所有grid //加载所有grid

View File

@ -19325,7 +19325,7 @@
</FlavorProperties> </FlavorProperties>
</VisualStudio> </VisualStudio>
</ProjectExtensions> </ProjectExtensions>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">