20250303 修改质量周报
This commit is contained in:
parent
d4f02f07fd
commit
3961a012c6
|
@ -1071,19 +1071,22 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
/// </summary>
|
||||
void OutPutSummaryGrid9()
|
||||
{
|
||||
DataTable source = ObjectToTable(Grid9.DataSource);
|
||||
int Quantity1Total = 0, Quantity2Total = 0;
|
||||
foreach (DataRow row in source.Rows)
|
||||
if (Grid9.DataSource != null)
|
||||
{
|
||||
Quantity1Total += Convert.ToInt32(row["Quantity1"]);
|
||||
Quantity2Total += Convert.ToInt32(row["Quantity2"]);
|
||||
}
|
||||
DataTable source = ObjectToTable(Grid9.DataSource);
|
||||
int Quantity1Total = 0, Quantity2Total = 0;
|
||||
foreach (DataRow row in source.Rows)
|
||||
{
|
||||
Quantity1Total += Convert.ToInt32(row["Quantity1"]);
|
||||
Quantity2Total += Convert.ToInt32(row["Quantity2"]);
|
||||
}
|
||||
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Total.ToString());
|
||||
summary.Add("Quantity2", Quantity2Total.ToString());
|
||||
Grid9.SummaryData = summary;
|
||||
JObject summary = new JObject();
|
||||
summary.Add("UnitOrMajor", "合计");
|
||||
summary.Add("Quantity1", Quantity1Total.ToString());
|
||||
summary.Add("Quantity2", Quantity2Total.ToString());
|
||||
Grid9.SummaryData = summary;
|
||||
}
|
||||
}
|
||||
|
||||
public static DataTable ObjectToTable(object obj)
|
||||
|
@ -2817,147 +2820,147 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
|||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
|
||||
Model.Report_WeekAndMonthReport_New weekAndMonthReport = WeekAndMonthReportNewService.Detail(this.ReportId);
|
||||
if (weekAndMonthReport != null)
|
||||
{
|
||||
if (weekAndMonthReport.SortId != null)
|
||||
{
|
||||
this.txtPeriod.Text = Convert.ToString(weekAndMonthReport.SortId);
|
||||
}
|
||||
if (weekAndMonthReport.StartDate != null)
|
||||
{
|
||||
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", weekAndMonthReport.StartDate);
|
||||
}
|
||||
if (weekAndMonthReport.EndDate != null)
|
||||
{
|
||||
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", weekAndMonthReport.EndDate);
|
||||
}
|
||||
}
|
||||
AddOrUpdate = "update";
|
||||
//Model.Report_WeekAndMonthReport_New weekAndMonthReport = WeekAndMonthReportNewService.Detail(this.ReportId);
|
||||
//if (weekAndMonthReport != null)
|
||||
//{
|
||||
// if (weekAndMonthReport.SortId != null)
|
||||
// {
|
||||
// this.txtPeriod.Text = Convert.ToString(weekAndMonthReport.SortId);
|
||||
// }
|
||||
// if (weekAndMonthReport.StartDate != null)
|
||||
// {
|
||||
// this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", weekAndMonthReport.StartDate);
|
||||
// }
|
||||
// if (weekAndMonthReport.EndDate != null)
|
||||
// {
|
||||
// this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", weekAndMonthReport.EndDate);
|
||||
// }
|
||||
//}
|
||||
//AddOrUpdate = "update";
|
||||
|
||||
#region 加载本月质量目标管理情况
|
||||
detailsGrid1.Clear();
|
||||
detailsGrid1 = (from x in db.Report_CqmsTarget
|
||||
where x.ReportId == this.ReportId
|
||||
orderby x.SortId
|
||||
select x).ToList();
|
||||
if (detailsGrid1.Count > 0)
|
||||
{
|
||||
Grid1.Hidden = false;
|
||||
Grid1.DataSource = detailsGrid1;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
//#region 加载本月质量目标管理情况
|
||||
//detailsGrid1.Clear();
|
||||
//detailsGrid1 = (from x in db.Report_CqmsTarget
|
||||
// where x.ReportId == this.ReportId
|
||||
// orderby x.SortId
|
||||
// select x).ToList();
|
||||
//if (detailsGrid1.Count > 0)
|
||||
//{
|
||||
// Grid1.Hidden = false;
|
||||
// Grid1.DataSource = detailsGrid1;
|
||||
// Grid1.DataBind();
|
||||
//}
|
||||
|
||||
#endregion
|
||||
//#endregion
|
||||
|
||||
#region 加载7.2 PQR/WPS报验情况
|
||||
var detailsGrid9 = (from x in db.Report_Construction_Plan
|
||||
where x.ReportId == ReportId && x.ReType == "5"
|
||||
select x).ToList();
|
||||
if (detailsGrid9.Count > 0)
|
||||
{
|
||||
Grid9.Hidden = false;
|
||||
Grid9.DataSource = detailsGrid9;
|
||||
Grid9.DataBind();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["view"]))
|
||||
{
|
||||
//查看页面
|
||||
Button4.Hidden = true;
|
||||
Button3.Hidden = true;
|
||||
//合计
|
||||
OutPutSummaryGrid9();
|
||||
Grid1.FindColumn("Delete1").Hidden = true;
|
||||
Grid9.FindColumn("Delete9").Hidden = true;
|
||||
}
|
||||
#endregion
|
||||
//#region 加载7.2 PQR/WPS报验情况
|
||||
//var detailsGrid9 = (from x in db.Report_Construction_Plan
|
||||
// where x.ReportId == ReportId && x.ReType == "5"
|
||||
// select x).ToList();
|
||||
//if (detailsGrid9.Count > 0)
|
||||
//{
|
||||
// Grid9.Hidden = false;
|
||||
// Grid9.DataSource = detailsGrid9;
|
||||
// Grid9.DataBind();
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(Request.Params["view"]))
|
||||
//{
|
||||
// //查看页面
|
||||
// Button4.Hidden = true;
|
||||
// Button3.Hidden = true;
|
||||
// //合计
|
||||
// OutPutSummaryGrid9();
|
||||
// Grid1.FindColumn("Delete1").Hidden = true;
|
||||
// Grid9.FindColumn("Delete9").Hidden = true;
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
#region 加载18.本月质量问题处理情况
|
||||
//(1)原材料问题
|
||||
rowMaterialProblemLists.Clear();
|
||||
rowMaterialProblemLists = (from x in db.Report_RowMaterialProblem
|
||||
where x.ReportId == this.ReportId
|
||||
select x).ToList();
|
||||
if (rowMaterialProblemLists.Count > 0)
|
||||
{
|
||||
gvRowMaterialProblem.Hidden = false;
|
||||
gvRowMaterialProblem.DataSource = rowMaterialProblemLists;
|
||||
gvRowMaterialProblem.DataBind();
|
||||
}
|
||||
//(2)施工过程问题
|
||||
constructionProblemsLists.Clear();
|
||||
constructionProblemsLists = (from x in db.Report_ConstructionProblems
|
||||
where x.ReportId == this.ReportId
|
||||
select x).ToList();
|
||||
if (constructionProblemsLists.Count > 0)
|
||||
{
|
||||
gvConstructionProblems.Hidden = false;
|
||||
gvConstructionProblems.DataSource = constructionProblemsLists;
|
||||
gvConstructionProblems.DataBind();
|
||||
}
|
||||
#endregion
|
||||
//#region 加载18.本月质量问题处理情况
|
||||
////(1)原材料问题
|
||||
//rowMaterialProblemLists.Clear();
|
||||
//rowMaterialProblemLists = (from x in db.Report_RowMaterialProblem
|
||||
// where x.ReportId == this.ReportId
|
||||
// select x).ToList();
|
||||
//if (rowMaterialProblemLists.Count > 0)
|
||||
//{
|
||||
// gvRowMaterialProblem.Hidden = false;
|
||||
// gvRowMaterialProblem.DataSource = rowMaterialProblemLists;
|
||||
// gvRowMaterialProblem.DataBind();
|
||||
//}
|
||||
////(2)施工过程问题
|
||||
//constructionProblemsLists.Clear();
|
||||
//constructionProblemsLists = (from x in db.Report_ConstructionProblems
|
||||
// where x.ReportId == this.ReportId
|
||||
// select x).ToList();
|
||||
//if (constructionProblemsLists.Count > 0)
|
||||
//{
|
||||
// gvConstructionProblems.Hidden = false;
|
||||
// gvConstructionProblems.DataSource = constructionProblemsLists;
|
||||
// gvConstructionProblems.DataBind();
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
#region 加载19.下月质量控制重点
|
||||
nextQualityControlLists.Clear();
|
||||
nextQualityControlLists = (from x in db.Report_NextQualityControl
|
||||
where x.ReportId == this.ReportId
|
||||
select x).ToList();
|
||||
if (nextQualityControlLists.Count > 0)
|
||||
{
|
||||
gvNextQualityControl.Hidden = false;
|
||||
gvNextQualityControl.DataSource = nextQualityControlLists;
|
||||
gvNextQualityControl.DataBind();
|
||||
}
|
||||
#endregion
|
||||
//#region 加载19.下月质量控制重点
|
||||
//nextQualityControlLists.Clear();
|
||||
//nextQualityControlLists = (from x in db.Report_NextQualityControl
|
||||
// where x.ReportId == this.ReportId
|
||||
// select x).ToList();
|
||||
//if (nextQualityControlLists.Count > 0)
|
||||
//{
|
||||
// gvNextQualityControl.Hidden = false;
|
||||
// gvNextQualityControl.DataSource = nextQualityControlLists;
|
||||
// gvNextQualityControl.DataBind();
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
#region 加载文本框内容
|
||||
var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
|
||||
if (txtReportList.Count > 0)
|
||||
{
|
||||
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;
|
||||
//#region 加载文本框内容
|
||||
//var txtReportList = db.Report_TextBoxContent.Where(x => x.ReportId == ReportId).ToList();
|
||||
//if (txtReportList.Count > 0)
|
||||
//{
|
||||
// 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;
|
||||
txtAre21.Text = txtReportList.FirstOrDefault(x => x.ContentType == "21").ContentText;
|
||||
txtAre22.Text = txtReportList.FirstOrDefault(x => x.ContentType == "22").ContentText;
|
||||
txtAre8.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText;
|
||||
// txtAre20.Text = txtReportList.FirstOrDefault(x => x.ContentType == "20").ContentText;
|
||||
// txtAre21.Text = txtReportList.FirstOrDefault(x => x.ContentType == "21").ContentText;
|
||||
// txtAre22.Text = txtReportList.FirstOrDefault(x => x.ContentType == "22").ContentText;
|
||||
// txtAre8.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText;
|
||||
|
||||
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-1") != null)
|
||||
{
|
||||
imgPhoto.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ImageUrl;
|
||||
txtPhotoContent1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText;
|
||||
}
|
||||
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-2") != null)
|
||||
{
|
||||
imgPhoto2.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ImageUrl;
|
||||
txtPhotoContent2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ContentText;
|
||||
}
|
||||
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-3") != null)
|
||||
{
|
||||
imgPhoto3.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ImageUrl;
|
||||
txtPhotoContent3.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ContentText;
|
||||
}
|
||||
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-4") != null)
|
||||
{
|
||||
imgPhoto4.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ImageUrl;
|
||||
txtPhotoContent4.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ContentText;
|
||||
}
|
||||
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-5") != null)
|
||||
{
|
||||
imgPhoto5.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ImageUrl;
|
||||
txtPhotoContent5.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ContentText;
|
||||
}
|
||||
if (txtReportList.FirstOrDefault(x => x.ContentType == "23-6") != null)
|
||||
{
|
||||
imgPhoto6.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ImageUrl;
|
||||
txtPhotoContent6.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ContentText;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
// if (txtReportList.FirstOrDefault(x => x.ContentType == "23-1") != null)
|
||||
// {
|
||||
// imgPhoto.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ImageUrl;
|
||||
// txtPhotoContent1.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText;
|
||||
// }
|
||||
// if (txtReportList.FirstOrDefault(x => x.ContentType == "23-2") != null)
|
||||
// {
|
||||
// imgPhoto2.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ImageUrl;
|
||||
// txtPhotoContent2.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-2").ContentText;
|
||||
// }
|
||||
// if (txtReportList.FirstOrDefault(x => x.ContentType == "23-3") != null)
|
||||
// {
|
||||
// imgPhoto3.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ImageUrl;
|
||||
// txtPhotoContent3.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-3").ContentText;
|
||||
// }
|
||||
// if (txtReportList.FirstOrDefault(x => x.ContentType == "23-4") != null)
|
||||
// {
|
||||
// imgPhoto4.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ImageUrl;
|
||||
// txtPhotoContent4.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-4").ContentText;
|
||||
// }
|
||||
// if (txtReportList.FirstOrDefault(x => x.ContentType == "23-5") != null)
|
||||
// {
|
||||
// imgPhoto5.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ImageUrl;
|
||||
// txtPhotoContent5.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-5").ContentText;
|
||||
// }
|
||||
// if (txtReportList.FirstOrDefault(x => x.ContentType == "23-6") != null)
|
||||
// {
|
||||
// imgPhoto6.ImageUrl = "~/" + txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ImageUrl;
|
||||
// txtPhotoContent6.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-6").ContentText;
|
||||
// }
|
||||
//}
|
||||
//#endregion
|
||||
|
||||
//加载所有grid
|
||||
lodAllGrid("1");
|
||||
////加载所有grid
|
||||
//lodAllGrid("1");
|
||||
}
|
||||
|
||||
#region 保存方法
|
||||
|
|
Loading…
Reference in New Issue