20240426 修改开车月报告

This commit is contained in:
2024-04-26 10:08:30 +08:00
parent 2601965679
commit 0e2487e6fa
15 changed files with 4698 additions and 111 deletions
@@ -16,7 +16,7 @@ namespace FineUIPro.Web.TestRun.DriverReport
{
GetButtonPower();
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("MonthReportEdit.aspx") + "return false;";
btnNew.OnClientClick = Window1.GetShowReference("MonthReportNewEdit.aspx") + "return false;";
}
}
#endregion
@@ -29,7 +29,10 @@ namespace FineUIPro.Web.TestRun.DriverReport
report.ProjectId,
report.MonthReportCode,
(CONVERT(varchar(10),DATEADD(DAY,1,DATEADD(MONTH,-1,report.MonthReportDate)),120)+'至'+CONVERT(varchar(10),report.MonthReportDate,120)) as MonthReportDate,
RIGHT(att.AttachUrl,CHARINDEX('_',REVERSE(att.AttachUrl))-1) AS AttachUrl"
RIGHT(att.AttachUrl,CHARINDEX('_',REVERSE(att.AttachUrl))-1) AS AttachUrl,
report.SortId,
report.StartDate,
report.endDate"
+ @" FROM TestRun_MonthReport AS report "
+ @" LEFT JOIN AttachFile AS att ON att.ToKeyId=report.MonthReportId "
+ @" WHERE report.ProjectId=@projectId ";
@@ -131,7 +134,7 @@ namespace FineUIPro.Web.TestRun.DriverReport
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthReportEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthReportNewEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
}
#endregion
@@ -240,8 +243,27 @@ namespace FineUIPro.Web.TestRun.DriverReport
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthReportView.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthReportNewView.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
}
#endregion
/// <summary>
/// 格式化字符串
/// </summary>
/// <param name="reportId"></param>
/// <returns></returns>
protected static string ConvertDate(object reportId)
{
string date = string.Empty;
if (reportId != null)
{
var r = BLL.TestRun_MonthReportService.GetMonthReportById(reportId.ToString());
if (r != null)
{
date = string.Format("{0:yyyy-MM-dd}", r.StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", r.EndDate);
}
}
return date;
}
}
}