diff --git a/DataBase/版本日志/SUBQHSE_V2025-08-29-gf.sql b/DataBase/版本日志/SUBQHSE_V2025-08-29-gf.sql
new file mode 100644
index 0000000..18367a5
--- /dev/null
+++ b/DataBase/版本日志/SUBQHSE_V2025-08-29-gf.sql
@@ -0,0 +1,69 @@
+alter table [dbo].[Environmental_ArchitectureReport] drop column Quarters
+GO
+alter table [dbo].[Environmental_ArchitectureReport] add Month int null
+GO
+alter table [dbo].[Environmental_ProjectArchitectureReport] drop column Quarters
+GO
+alter table [dbo].[Environmental_ProjectArchitectureReport] add Month int null
+GO
+
+/*************ҵԴԼ̬ܱ**************/
+ALTER VIEW [dbo].[View_Environmental_ArchitectureReport]
+AS
+SELECT
+Report.ArchitectureReportId,
+Report.UnitId,
+Report.FillingDate,
+(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate,
+Group_0008.ConstText as YearStr,
+Group_0009.ConstText as MonthStr,
+U.UnitName,
+Report.Year,
+Report.Month,
+Report.UpState,
+Report.DutyPerson
+FROM dbo.Environmental_ArchitectureReport AS Report
+LEFT JOIN Base_Unit AS U ON U.UnitId=Report.UnitId
+LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year]
+LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month]
+
+
+
+
+
+
+
+GO
+
+
+
+/*************ҵԴԼ̬ܱ**************/
+ALTER VIEW [dbo].[View_Environmental_ProjectArchitectureReport]
+AS
+SELECT
+Report.ArchitectureReportId,
+Report.ProjectId,
+Report.FillingDate,
+(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate,
+Group_0008.ConstText as YearStr,
+Group_0009.ConstText as MonthStr,
+U.ProjectName,
+Report.Year,
+Report.Month,
+Report.UpState,
+Report.DutyPerson
+FROM dbo.Environmental_ProjectArchitectureReport AS Report
+LEFT JOIN Base_Project AS U ON U.ProjectId=Report.ProjectId
+LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year]
+LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month]
+
+
+
+
+
+
+
+
+GO
+
+
diff --git a/SUBQHSE/BLL/Common/Const.cs b/SUBQHSE/BLL/Common/Const.cs
index c3ac52f..26b389f 100644
--- a/SUBQHSE/BLL/Common/Const.cs
+++ b/SUBQHSE/BLL/Common/Const.cs
@@ -6740,15 +6740,15 @@ namespace BLL
///
/// 施工技术交底管理
///
- public const string ConTechnologyDisclosureMenuId = "A16CFA9D-2783-4573-95F9-EBA2B682B7EA";
+ public const string ConTechnologyDisclosureMenuId = "C2BBE0BC-C75A-4EEB-A893-8CDBD2DE2A74";
///
/// 特设质保体系
///
- public const string CQMS_QualityAssuranceMenuId = "2C49EC5E-BF6F-4C44-BA02-9BD183CF68C6";
+ public const string CQMS_QualityAssuranceMenuId = "D9BE2C06-E757-4611-A73D-91D2A8FD0DEA";
///
/// 图纸会审管理
///
- public const string ReviewDrawingsMenuId = "856D53B3-C5FB-443F-917B-39E83BE685DB";
+ public const string ReviewDrawingsMenuId = "C2BBE0BC-C75A-4EEB-A893-8CDBD2DE2A74";
///
/// 图纸会审记录导入模板文件原始虚拟路径
///
diff --git a/SUBQHSE/BLL/Customization/ZJ/API/APIUnitHazardRegisterService.cs b/SUBQHSE/BLL/Customization/ZJ/API/APIUnitHazardRegisterService.cs
index 15db22d..a6d3bec 100644
--- a/SUBQHSE/BLL/Customization/ZJ/API/APIUnitHazardRegisterService.cs
+++ b/SUBQHSE/BLL/Customization/ZJ/API/APIUnitHazardRegisterService.cs
@@ -29,14 +29,14 @@ namespace BLL
///
///
///
- public static List getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex)
+ public static List getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex ,int pageSize ,string ProblemTypes)
{
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
{
var hazardRegisters = (from x in db.View_Hazard_HazardRegister_Unit
- where (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null)
+ where (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null) && (x.ProblemTypes == ProblemTypes)
orderby x.CheckTime descending
- select x).Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList();
+ select x).Skip(pageSize * (pageIndex - 1)).Take(pageSize).ToList();
return ObjectMapperManager.DefaultInstance.GetMapper, List>().Map(hazardRegisters.ToList());
}
}
diff --git a/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs b/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs
index 7084edc..b77c22d 100644
--- a/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs
+++ b/SUBQHSE/BLL/WebService/CNCECHSSEWebService.cs
@@ -1103,7 +1103,7 @@
ArchitectureReportId = x.ArchitectureReportId,
UnitId = x.UnitId,
Year = x.Year,
- Quarters = x.Quarters,
+ Month = x.Month,
FillingMan = x.FillingMan,
FillingDate = x.FillingDate,
DutyPerson = x.DutyPerson,
@@ -1139,7 +1139,7 @@
////更新 当前人要处理的意见
ProjectDataFlowSetService.CloseFlowOperate(Const.ArchitectureReportMenuId, item, string.Empty);
// //更新催报信息
- UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Quarters.ToString());
+ UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Month.ToString());
}
}
LogService.AddSys_Log(CurrUser, "【建筑行业能源节约与生态环境保护汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnUploadResources);
diff --git a/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs b/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs
index 39c5b06..1055883 100644
--- a/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs
+++ b/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportItemService.cs
@@ -57,12 +57,12 @@ namespace BLL
///
/// 建筑行业能源节约与生态环境保护汇总明细表Id
/// 明细记录集合
- public static List GetYearSumItems(string unitId, int? year, int? Quarters)
+ public static List GetYearSumItems(string unitId, int? year, int? Month)
{
return (from x in Funs.DB.Environmental_ArchitectureReportItem
join y in Funs.DB.Environmental_ArchitectureReport
on x.ArchitectureReportId equals y.ArchitectureReportId
- where y.UnitId == unitId && y.Year == year && y.Quarters == Quarters
+ where y.UnitId == unitId && y.Year == year && y.Month == Month
orderby x.SortIndex
select x).Distinct().ToList();
}
diff --git a/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportService.cs b/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportService.cs
index 4755878..9c66875 100644
--- a/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportService.cs
+++ b/SUBQHSE/BLL/ZHGL/Environmental/ArchitectureReportService.cs
@@ -25,9 +25,9 @@ namespace BLL
/// 年度 param >
/// 月份
/// 建筑行业能源节约与生态环境保护汇总表
- public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdAndYearAndQuarters(string unitId, int year, int Quarters)
+ public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdAndYearAndQuarters(string unitId, int year, int month)
{
- return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Quarters == Quarters && e.Year == year);
+ return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Month == month && e.Year == year);
}
///
@@ -50,7 +50,7 @@ namespace BLL
{
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
Year = ArchitectureReport.Year,
- Quarters = ArchitectureReport.Quarters,
+ Month = ArchitectureReport.Month,
UnitId = ArchitectureReport.UnitId,
FillingDate = ArchitectureReport.FillingDate,
DutyPerson = ArchitectureReport.DutyPerson,
@@ -72,7 +72,7 @@ namespace BLL
if (newArchitectureReport != null)
{
newArchitectureReport.Year = ArchitectureReport.Year;
- newArchitectureReport.Quarters = ArchitectureReport.Quarters;
+ newArchitectureReport.Month = ArchitectureReport.Month;
newArchitectureReport.UnitId = ArchitectureReport.UnitId;
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
@@ -101,9 +101,9 @@ namespace BLL
///
/// Id
///
- public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdDate(string unitId, int year, int Quarters)
+ public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdDate(string unitId, int year, int month)
{
- return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarters == Quarters);
+ return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Month == month);
}
///
diff --git a/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs b/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs
index c77217e..8d46432 100644
--- a/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs
+++ b/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportItemService.cs
@@ -57,12 +57,12 @@ namespace BLL
///
/// 建筑行业能源节约与生态环境保护汇总明细表Id
/// 明细记录集合
- public static List GetYearSumItems(string projectId, int? year, int? Quarters)
+ public static List GetYearSumItems(string projectId, int? year, int? Month)
{
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
join y in Funs.DB.Environmental_ProjectArchitectureReport
on x.ArchitectureReportId equals y.ArchitectureReportId
- where y.ProjectId == projectId && y.Year == year && y.Quarters == Quarters
+ where y.ProjectId == projectId && y.Year == year && y.Month == Month
orderby x.SortIndex
select x).Distinct().ToList();
}
diff --git a/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs b/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs
index d58f123..4df3645 100644
--- a/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs
+++ b/SUBQHSE/BLL/ZHGL/Environmental/ProjectArchitectureReportService.cs
@@ -25,9 +25,9 @@ namespace BLL
/// 年度 param >
/// 月份
/// 建筑行业能源节约与生态环境保护汇总表
- public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdAndYearAndQuarters(string projectId, int year, int Quarters)
+ public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdAndYearAndQuarters(string projectId, int year, int Month)
{
- return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == projectId && e.Quarters == Quarters && e.Year == year);
+ return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == projectId && e.Month == Month && e.Year == year);
}
///
@@ -50,7 +50,7 @@ namespace BLL
{
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
Year = ArchitectureReport.Year,
- Quarters = ArchitectureReport.Quarters,
+ Month = ArchitectureReport.Month,
ProjectId = ArchitectureReport.ProjectId,
FillingDate = ArchitectureReport.FillingDate,
DutyPerson = ArchitectureReport.DutyPerson,
@@ -72,7 +72,7 @@ namespace BLL
if (newArchitectureReport != null)
{
newArchitectureReport.Year = ArchitectureReport.Year;
- newArchitectureReport.Quarters = ArchitectureReport.Quarters;
+ newArchitectureReport.Month = ArchitectureReport.Month;
newArchitectureReport.ProjectId = ArchitectureReport.ProjectId;
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
@@ -101,9 +101,9 @@ namespace BLL
///
/// Id
///
- public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdDate(string ProjectId, int year, int Quarters)
+ public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdDate(string ProjectId, int year, int Month)
{
- return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Quarters == Quarters);
+ return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Month == Month);
}
///
diff --git a/SUBQHSE/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SUBQHSE/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
index 04d7b5b..3fdf59a 100644
--- a/SUBQHSE/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
@@ -1284,6 +1284,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
#endregion
+ if (!string.IsNullOrEmpty(date2) && gTrainingTestRecord != null)
+ {
+ DateTime dt = DateTime.Parse(date2);
+ TestStartTime = dt;
+ }
string[] fieldNames = { };
object[] fieldValues = { };
if (!string.IsNullOrEmpty(Signature))
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx
index 89cabc0..af8f324 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx
@@ -36,13 +36,13 @@
-
+
-
-
@@ -68,6 +68,9 @@
+
+
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs
index 9953853..2f8c802 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.cs
@@ -16,17 +16,24 @@ namespace FineUIPro.Web.ZHGL.Environmental
if (!IsPostBack)
{
- BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
+ BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
-
+ if (this.CurrUser.UserId == BLL.Const.hfnbdId)
+ {
+ this.btnState.Hidden = false;
+ }
+ else
+ {
+ this.btnState.Hidden = true;
+ }
this.drpUnit.DataTextField = "UnitName";
drpUnit.DataValueField = "UnitId";
drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList();
drpUnit.DataBind();
this.drpUnit.Readonly = true;
////取上个报表时间
- DateTime showDate = System.DateTime.Now.AddMonths(-3);
- this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
+ DateTime showDate = System.DateTime.Now.AddMonths(-1);
+ drpMonth.SelectedValue = showDate.Month.ToString();
drpYear.SelectedValue = showDate.Year.ToString();
GetValue();
}
@@ -48,8 +55,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
private void GetValue()
{
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
- int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
- Model.Environmental_ArchitectureReport r = Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Quarters && e.Year == year);
+ int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue);
+ Model.Environmental_ArchitectureReport r = Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == month && e.Year == year);
if (r != null && r.UpState != BLL.Const.UpState_5)
{
string cncecAPIUrl = string.Empty;
@@ -62,7 +69,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
try
{
- string getUrl = cncecAPIUrl + "/api/InformationData/GetArchitectureAuditState" + "?unitId=" + CommonService.GetThisUnitId() + "&year=" + year + "&quarters=" + Quarters;
+ string getUrl = cncecAPIUrl + "/api/InformationData/GetArchitectureAuditState" + "?unitId=" + CommonService.GetThisUnitId() + "&year=" + year + "&month=" + month;
var strJosn = APIGetHttpService.Http(getUrl);
if (!string.IsNullOrEmpty(strJosn))
{
@@ -79,7 +86,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
}
}
}
- Model.View_Environmental_ArchitectureReport report = Funs.DB.View_Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == Quarters && e.Year == year);
+ Model.View_Environmental_ArchitectureReport report = Funs.DB.View_Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == month && e.Year == year);
if (report != null)
{
string upState = string.Empty;
@@ -95,7 +102,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
upState = "(未上报)";
}
- this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.QuartersStr + report.YearStr + upState;
+ this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.MonthStr + report.YearStr + upState;
lbUnitName.Text = "填报企业:" + report.UnitName;
if (report.FillingDate != null)
{
@@ -214,7 +221,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
}
}
- var getReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ var getReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
this.btnAudit1.Hidden = true;
this.btnAudit2.Hidden = true;
if (getReport != null)
@@ -249,7 +256,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnNew_Click(object sender, EventArgs e)
{
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Quarterss={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, "编辑 - ")));
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Months={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpMonth.SelectedValue, "编辑 - ")));
}
///
@@ -259,7 +266,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnEdit_Click(object sender, EventArgs e)
{
- Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
@@ -277,7 +284,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnAudit1_Click(object sender, EventArgs e)
{
- Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
@@ -295,7 +302,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnAudit2_Click(object sender, EventArgs e)
{
- Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
@@ -313,7 +320,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnUpdata_Click(object sender, EventArgs e)
{
- Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ArchitectureReportSave.aspx?ArchitectureReportId={0}&type=Updata", report.ArchitectureReportId, "编辑 - ")));
@@ -331,10 +338,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnDelete_Click(object sender, EventArgs e)
{
- Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
- BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnDelete);
+ BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnDelete);
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ArchitectureReportId);
BLL.ArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
BLL.ArchitectureReportService.DeleteArchitectureReportByArchitectureReportId(report.ArchitectureReportId);
@@ -377,7 +384,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId.ToString());
if (report != null)
{
- return report.Year + "年" + report.Quarters + "月";
+ return report.Year + "年" + report.Month + "月";
}
}
return "";
@@ -414,7 +421,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void BtnBulletLeft_Click(object sender, EventArgs e)
{
- SetQuartersChange("-");
+ SetMonthChange("-");
}
///
@@ -424,30 +431,30 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void BulletRight_Click(object sender, EventArgs e)
{
- SetQuartersChange("+");
+ SetMonthChange("+");
}
///
/// 月份加减变化
///
///
- private void SetQuartersChange(string type)
+ private void SetMonthChange(string type)
{
- DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
+ DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
if (nowDate.HasValue)
{
DateTime showDate = new DateTime();
if (type == "+")
{
- showDate = nowDate.Value.AddMonths(3);
+ showDate = nowDate.Value.AddMonths(1);
}
else
{
- showDate = nowDate.Value.AddMonths(-3);
+ showDate = nowDate.Value.AddMonths(-1);
}
this.drpYear.SelectedValue = showDate.Year.ToString();
- this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
+ drpMonth.SelectedValue = showDate.Month.ToString();
///值变化
GetValue();
}
@@ -462,7 +469,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnSee_Click(object sender, EventArgs e)
{
- Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ArchitectureReportId, "查看 - ")));
@@ -678,14 +685,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
string info = string.Empty;
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
- int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
+ int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue);
var projects = (from x in Funs.DB.Base_Project
where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null)
&& (x.IsDelete == null || x.IsDelete == false)
select x).ToList();
foreach (var item in projects)
{
- var projectArchitectureReport = Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == year && x.Quarters == Quarters);
+ var projectArchitectureReport = Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == year && x.Month == month);
if (projectArchitectureReport == null)
{
info += item.ProjectName + ",未填写报表;";
@@ -719,5 +726,21 @@ namespace FineUIPro.Web.ZHGL.Environmental
}
#endregion
+
+ #region 恢复未上报状态
+ ///
+ /// 恢复未上报状态
+ ///
+ ///
+ ///
+ protected void btnState_Click(object sender, EventArgs e)
+ {
+ Model.Environmental_ArchitectureReport report = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
+ report.UpState = "2";
+ BLL.ArchitectureReportService.UpdateArchitectureReport(report);
+ ShowNotify("恢复成功!", MessageBoxIcon.Success);
+ GetValue();
+ }
+ #endregion
}
}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.designer.cs
index be0cb5f..b82157b 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReport.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.ZHGL.Environmental
-{
-
-
- public partial class ArchitectureReport
- {
-
+namespace FineUIPro.Web.ZHGL.Environmental {
+
+
+ public partial class ArchitectureReport {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// RegionPanel1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.RegionPanel RegionPanel1;
-
+
///
/// Region2 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Region Region2;
-
+
///
/// SimpleForm1 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// Toolbar1 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// drpUnit 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// drpYear 控件。
///
@@ -85,16 +83,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpYear;
-
+
///
- /// drpQuarters 控件。
+ /// drpMonth 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList drpQuarters;
-
+ protected global::FineUIPro.DropDownList drpMonth;
+
///
/// BtnBulletLeft 控件。
///
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button BtnBulletLeft;
-
+
///
/// BtnBulletRight 控件。
///
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button BtnBulletRight;
-
+
///
/// ToolbarFill1 控件。
///
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// btnSee 控件。
///
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSee;
-
+
///
/// btnNew 控件。
///
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnEdit 控件。
///
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnEdit;
-
+
///
/// btnDelete 控件。
///
@@ -157,7 +155,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnDelete;
-
+
///
/// btnAudit1 控件。
///
@@ -166,7 +164,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAudit1;
-
+
///
/// btnAudit2 控件。
///
@@ -175,7 +173,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAudit2;
-
+
///
/// btnUpdata 控件。
///
@@ -184,7 +182,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnUpdata;
-
+
///
/// btnView 控件。
///
@@ -193,7 +191,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnView;
-
+
+ ///
+ /// btnState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnState;
+
///
/// lbUnitName 控件。
///
@@ -202,7 +209,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbUnitName;
-
+
///
/// lbFillingDate 控件。
///
@@ -211,7 +218,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbFillingDate;
-
+
///
/// lbDutyPerson 控件。
///
@@ -220,7 +227,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbDutyPerson;
-
+
///
/// lbHandleMan 控件。
///
@@ -229,7 +236,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbHandleMan;
-
+
///
/// Grid1 控件。
///
@@ -238,7 +245,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Window1 控件。
///
@@ -247,7 +254,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// Window4 控件。
///
@@ -256,7 +263,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window4;
-
+
///
/// Window5 控件。
///
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx
index ce5b7d8..8c0a3b3 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx
@@ -36,8 +36,8 @@
-
+
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs
index 36f7846..ebd28fe 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs
@@ -48,7 +48,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
this.GetButtonPower();
}
items.Clear();
- BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
+ BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
this.drpUnit.DataTextField = "UnitName";
drpUnit.DataValueField = "UnitId";
@@ -57,7 +57,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
this.drpUnit.Readonly = true;
string unitId = Request.QueryString["UnitId"];
string year = Request.QueryString["Year"];
- string quarters = Request.QueryString["Quarterss"];
+ string months = Request.QueryString["Months"];
ArchitectureReportId = Request.QueryString["ArchitectureReportId"];
if (!string.IsNullOrEmpty(Request.QueryString["type"]))
{
@@ -87,7 +87,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
this.btnSave.Hidden = true;
this.btnUpdata.Hidden = true;
}
- drpQuarters.SelectedValue = report.Quarters.ToString();
+ drpMonth.SelectedValue = report.Month.ToString();
drpYear.SelectedValue = report.Year.ToString();
drpUnit.SelectedValue = report.UnitId;
if (report.FillingDate != null)
@@ -100,12 +100,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
else
{
//this.btnCopy.Hidden = false;
- drpQuarters.SelectedValue = quarters;
+ drpMonth.SelectedValue = months;
drpYear.SelectedValue = year;
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
txtDutyPerson.Text = this.CurrUser.UserName;
//增加明细集合
- GetNewItems(year, quarters);
+ GetNewItems(year, months);
this.Grid1.DataSource = items;
this.Grid1.DataBind();
}
@@ -150,336 +150,81 @@ namespace FineUIPro.Web.ZHGL.Environmental
Grid1.Rows[58].CellCssClasses[4] = "f-grid-cell-uneditable";
Grid1.Rows[58].CellCssClasses[5] = "f-grid-cell-uneditable";
}
- var lastYearReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue) - 1, Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue));
- if (lastYearReport != null)
+ if (string.IsNullOrEmpty(ArchitectureReportId))
{
- var lastYearReportItems = ArchitectureReportItemService.GetItems(lastYearReport.ArchitectureReportId);
- Grid1.Rows[1].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[2].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[3].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[4].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[5].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[6].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[7].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[8].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[9].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[10].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[11].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[12].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[13].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[15].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[16].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[17].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[19].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[20].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[21].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[22].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[23].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[24].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[25].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[26].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[27].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[28].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[29].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[30].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[31].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[32].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[33].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[34].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[35].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[36].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[37].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[38].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[39].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[40].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[41].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[42].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[43].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[44].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[45].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[46].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[47].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[48].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[49].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[50].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[51].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[52].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[53].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[54].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[55].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[56].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[57].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[59].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[60].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- SetLastYearUnEditableRow();
- //获取项目级数据
- string year = Request.QueryString["Year"];
- string quarters = Request.QueryString["Quarterss"];
- var items = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
- join y in Funs.DB.Environmental_ProjectArchitectureReport
- on x.ArchitectureReportId equals y.ArchitectureReportId
- where y.Year == Funs.GetNewIntOrZero(year) && y.Quarters == Funs.GetNewIntOrZero(quarters)
- orderby x.SortIndex
- select x).ToList();
- if (items.Count() > 0)
+ var lastYearReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue) - 1, Funs.GetNewIntOrZero(this.drpMonth.SelectedValue));
+ if (lastYearReport != null)
{
- Grid1.Rows[0].Values[5] = items.Where(x => x.SortIndex == "01").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[1].Values[5] = items.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[2].Values[5] = items.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[3].Values[5] = items.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[4].Values[5] = items.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[5].Values[5] = items.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[6].Values[5] = items.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[7].Values[5] = items.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[8].Values[5] = items.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[9].Values[5] = items.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[10].Values[5] = items.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[11].Values[5] = items.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[12].Values[5] = items.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[13].Values[5] = items.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[15].Values[5] = items.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[16].Values[5] = items.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[17].Values[5] = items.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[19].Values[5] = items.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[20].Values[5] = items.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[21].Values[5] = items.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[22].Values[5] = items.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[23].Values[5] = items.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[24].Values[5] = items.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[25].Values[5] = items.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[26].Values[5] = items.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[27].Values[5] = items.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[28].Values[5] = items.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[29].Values[5] = items.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[30].Values[5] = items.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[31].Values[5] = items.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[32].Values[5] = items.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[33].Values[5] = items.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[34].Values[5] = items.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[35].Values[5] = items.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[36].Values[5] = items.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[37].Values[5] = items.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[38].Values[5] = items.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[39].Values[5] = items.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[40].Values[5] = items.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[41].Values[5] = items.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[42].Values[5] = items.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[43].Values[5] = items.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[44].Values[5] = items.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[45].Values[5] = items.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[46].Values[5] = items.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[47].Values[5] = items.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[48].Values[5] = items.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[49].Values[5] = items.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[50].Values[5] = items.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[51].Values[5] = items.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[52].Values[5] = items.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[53].Values[5] = items.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[54].Values[5] = items.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[55].Values[5] = items.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[56].Values[5] = items.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[57].Values[5] = items.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[59].Values[5] = items.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[60].Values[5] = items.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- }
- }
- else
- {
- DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
- DateTime lastQuarters = nowDate.Value.AddMonths(-3);
- Environmental_ArchitectureReport lastQuartersReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, lastQuarters.Year, Funs.GetNowQuarterlyByTime(lastQuarters));
- if (lastQuartersReport != null)
- {
- var lastQuartersReportItems = BLL.ArchitectureReportItemService.GetItems(lastQuartersReport.ArchitectureReportId);
- Grid1.Rows[1].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[2].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[3].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[4].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[5].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[6].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[7].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[8].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[9].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[10].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[11].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[12].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[13].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[15].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[16].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[17].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[19].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[20].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[21].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[22].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[23].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[24].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[25].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[26].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[27].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[28].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[29].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[30].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[31].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[32].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[33].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[34].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[35].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[36].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[37].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[38].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[39].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[40].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[41].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[42].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[43].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[44].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[45].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[46].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[47].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[48].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[49].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[50].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[51].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[52].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[53].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[54].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[55].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[56].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[57].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[59].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
- Grid1.Rows[60].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ var lastYearReportItems = ArchitectureReportItemService.GetItems(lastYearReport.ArchitectureReportId);
+ Grid1.Rows[1].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[2].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[3].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[4].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[5].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[6].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[7].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[8].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[9].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[10].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[11].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[12].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[13].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[15].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[16].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[17].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[19].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[20].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[21].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[22].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[23].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[24].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[25].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[26].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[27].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[28].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[29].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[30].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[31].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[32].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[33].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[34].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[35].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[36].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[37].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[38].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[39].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[40].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[41].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[42].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[43].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[44].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[45].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[46].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[47].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[48].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[49].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[50].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[51].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[52].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[53].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[54].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[55].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[56].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[57].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[59].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[60].Values[4] = lastYearReportItems.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
SetLastYearUnEditableRow();
- }
- else
- {
+ //获取项目级数据
string year = Request.QueryString["Year"];
- string quarters = Request.QueryString["Quarterss"];
+ string months = Request.QueryString["Months"];
var items = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
join y in Funs.DB.Environmental_ProjectArchitectureReport
on x.ArchitectureReportId equals y.ArchitectureReportId
- where y.Year == Funs.GetNewIntOrZero(year) && y.Quarters == Funs.GetNewIntOrZero(quarters)
+ where y.Year == Funs.GetNewIntOrZero(year) && y.Month == Funs.GetNewIntOrZero(months)
orderby x.SortIndex
select x).ToList();
if (items.Count() > 0)
{
- Grid1.Rows[0].Values[3] = items.Where(x => x.SortIndex == "01").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[1].Values[3] = items.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[2].Values[3] = items.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[3].Values[3] = items.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[4].Values[3] = items.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[5].Values[3] = items.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[6].Values[3] = items.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[7].Values[3] = items.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[8].Values[3] = items.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[9].Values[3] = items.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[10].Values[3] = items.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[11].Values[3] = items.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[12].Values[3] = items.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[13].Values[3] = items.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[15].Values[3] = items.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[16].Values[3] = items.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[17].Values[3] = items.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[19].Values[3] = items.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[20].Values[3] = items.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[21].Values[3] = items.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[22].Values[3] = items.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[23].Values[3] = items.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[24].Values[3] = items.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[25].Values[3] = items.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[26].Values[3] = items.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[27].Values[3] = items.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[28].Values[3] = items.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[29].Values[3] = items.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[30].Values[3] = items.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[31].Values[3] = items.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[32].Values[3] = items.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[33].Values[3] = items.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[34].Values[3] = items.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[35].Values[3] = items.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[36].Values[3] = items.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[37].Values[3] = items.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[38].Values[3] = items.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[39].Values[3] = items.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[40].Values[3] = items.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[41].Values[3] = items.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[42].Values[3] = items.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[43].Values[3] = items.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[44].Values[3] = items.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[45].Values[3] = items.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[46].Values[3] = items.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[47].Values[3] = items.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[48].Values[3] = items.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[49].Values[3] = items.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[50].Values[3] = items.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[51].Values[3] = items.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[52].Values[3] = items.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[53].Values[3] = items.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[54].Values[3] = items.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[55].Values[3] = items.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[56].Values[3] = items.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[57].Values[3] = items.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[59].Values[3] = items.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
- Grid1.Rows[60].Values[3] = items.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
-
- Grid1.Rows[0].Values[4] = items.Where(x => x.SortIndex == "01").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[1].Values[4] = items.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[2].Values[4] = items.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[3].Values[4] = items.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[4].Values[4] = items.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[5].Values[4] = items.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[6].Values[4] = items.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[7].Values[4] = items.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[8].Values[4] = items.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[9].Values[4] = items.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[10].Values[4] = items.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[11].Values[4] = items.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[12].Values[4] = items.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[13].Values[4] = items.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[15].Values[4] = items.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[16].Values[4] = items.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[17].Values[4] = items.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[19].Values[4] = items.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[20].Values[4] = items.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[21].Values[4] = items.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[22].Values[4] = items.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[23].Values[4] = items.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[24].Values[4] = items.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[25].Values[4] = items.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[26].Values[4] = items.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[27].Values[4] = items.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[28].Values[4] = items.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[29].Values[4] = items.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[30].Values[4] = items.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[31].Values[4] = items.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[32].Values[4] = items.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[33].Values[4] = items.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[34].Values[4] = items.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[35].Values[4] = items.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[36].Values[4] = items.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[37].Values[4] = items.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[38].Values[4] = items.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[39].Values[4] = items.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[40].Values[4] = items.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[41].Values[4] = items.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[42].Values[4] = items.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[43].Values[4] = items.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[44].Values[4] = items.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[45].Values[4] = items.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[46].Values[4] = items.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[47].Values[4] = items.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[48].Values[4] = items.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[49].Values[4] = items.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[50].Values[4] = items.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[51].Values[4] = items.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[52].Values[4] = items.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[53].Values[4] = items.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[54].Values[4] = items.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[55].Values[4] = items.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[56].Values[4] = items.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[57].Values[4] = items.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[59].Values[4] = items.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
- Grid1.Rows[60].Values[4] = items.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
-
Grid1.Rows[0].Values[5] = items.Where(x => x.SortIndex == "01").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
Grid1.Rows[1].Values[5] = items.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
Grid1.Rows[2].Values[5] = items.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
@@ -540,6 +285,269 @@ namespace FineUIPro.Web.ZHGL.Environmental
Grid1.Rows[60].Values[5] = items.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
}
}
+ else
+ {
+ DateTime lastMonth = Convert.ToDateTime(drpYear.SelectedValue + "-" + drpMonth.SelectedValue + "-01").AddYears(-1);
+ Environmental_ArchitectureReport lastQuartersReport = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, lastMonth.Year, lastMonth.Month);
+ if (lastQuartersReport != null)
+ {
+ var lastQuartersReportItems = BLL.ArchitectureReportItemService.GetItems(lastQuartersReport.ArchitectureReportId);
+ Grid1.Rows[1].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[2].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[3].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[4].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[5].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[6].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[7].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[8].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[9].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[10].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[11].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[12].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[13].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[15].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[16].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[17].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[19].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[20].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[21].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[22].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[23].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[24].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[25].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[26].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[27].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[28].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[29].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[30].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[31].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[32].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[33].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[34].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[35].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[36].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[37].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[38].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[39].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[40].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[41].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[42].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[43].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[44].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[45].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[46].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[47].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[48].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[49].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[50].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[51].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[52].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[53].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[54].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[55].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[56].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[57].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[59].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[60].Values[4] = lastQuartersReportItems.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ SetLastYearUnEditableRow();
+ }
+ else
+ {
+ string year = Request.QueryString["Year"];
+ string months = Request.QueryString["Months"];
+ var items = (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
+ join y in Funs.DB.Environmental_ProjectArchitectureReport
+ on x.ArchitectureReportId equals y.ArchitectureReportId
+ where y.Year == Funs.GetNewIntOrZero(year) && y.Month == Funs.GetNewIntOrZero(months)
+ orderby x.SortIndex
+ select x).ToList();
+ if (items.Count() > 0)
+ {
+ Grid1.Rows[0].Values[3] = items.Where(x => x.SortIndex == "01").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[1].Values[3] = items.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[2].Values[3] = items.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[3].Values[3] = items.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[4].Values[3] = items.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[5].Values[3] = items.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[6].Values[3] = items.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[7].Values[3] = items.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[8].Values[3] = items.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[9].Values[3] = items.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[10].Values[3] = items.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[11].Values[3] = items.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[12].Values[3] = items.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[13].Values[3] = items.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[15].Values[3] = items.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[16].Values[3] = items.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[17].Values[3] = items.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[19].Values[3] = items.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[20].Values[3] = items.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[21].Values[3] = items.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[22].Values[3] = items.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[23].Values[3] = items.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[24].Values[3] = items.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[25].Values[3] = items.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[26].Values[3] = items.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[27].Values[3] = items.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[28].Values[3] = items.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[29].Values[3] = items.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[30].Values[3] = items.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[31].Values[3] = items.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[32].Values[3] = items.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[33].Values[3] = items.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[34].Values[3] = items.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[35].Values[3] = items.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[36].Values[3] = items.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[37].Values[3] = items.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[38].Values[3] = items.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[39].Values[3] = items.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[40].Values[3] = items.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[41].Values[3] = items.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[42].Values[3] = items.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[43].Values[3] = items.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[44].Values[3] = items.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[45].Values[3] = items.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[46].Values[3] = items.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[47].Values[3] = items.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[48].Values[3] = items.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[49].Values[3] = items.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[50].Values[3] = items.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[51].Values[3] = items.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[52].Values[3] = items.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[53].Values[3] = items.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[54].Values[3] = items.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[55].Values[3] = items.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[56].Values[3] = items.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[57].Values[3] = items.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[59].Values[3] = items.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+ Grid1.Rows[60].Values[3] = items.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.BaseNumber));
+
+ Grid1.Rows[0].Values[4] = items.Where(x => x.SortIndex == "01").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[1].Values[4] = items.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[2].Values[4] = items.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[3].Values[4] = items.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[4].Values[4] = items.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[5].Values[4] = items.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[6].Values[4] = items.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[7].Values[4] = items.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[8].Values[4] = items.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[9].Values[4] = items.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[10].Values[4] = items.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[11].Values[4] = items.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[12].Values[4] = items.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[13].Values[4] = items.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[15].Values[4] = items.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[16].Values[4] = items.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[17].Values[4] = items.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[19].Values[4] = items.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[20].Values[4] = items.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[21].Values[4] = items.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[22].Values[4] = items.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[23].Values[4] = items.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[24].Values[4] = items.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[25].Values[4] = items.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[26].Values[4] = items.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[27].Values[4] = items.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[28].Values[4] = items.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[29].Values[4] = items.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[30].Values[4] = items.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[31].Values[4] = items.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[32].Values[4] = items.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[33].Values[4] = items.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[34].Values[4] = items.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[35].Values[4] = items.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[36].Values[4] = items.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[37].Values[4] = items.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[38].Values[4] = items.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[39].Values[4] = items.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[40].Values[4] = items.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[41].Values[4] = items.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[42].Values[4] = items.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[43].Values[4] = items.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[44].Values[4] = items.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[45].Values[4] = items.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[46].Values[4] = items.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[47].Values[4] = items.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[48].Values[4] = items.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[49].Values[4] = items.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[50].Values[4] = items.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[51].Values[4] = items.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[52].Values[4] = items.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[53].Values[4] = items.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[54].Values[4] = items.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[55].Values[4] = items.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[56].Values[4] = items.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[57].Values[4] = items.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[59].Values[4] = items.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+ Grid1.Rows[60].Values[4] = items.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.LastYearValue));
+
+ Grid1.Rows[0].Values[5] = items.Where(x => x.SortIndex == "01").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[1].Values[5] = items.Where(x => x.SortIndex == "02").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[2].Values[5] = items.Where(x => x.SortIndex == "03").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[3].Values[5] = items.Where(x => x.SortIndex == "04").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[4].Values[5] = items.Where(x => x.SortIndex == "05").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[5].Values[5] = items.Where(x => x.SortIndex == "06").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[6].Values[5] = items.Where(x => x.SortIndex == "07").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[7].Values[5] = items.Where(x => x.SortIndex == "08").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[8].Values[5] = items.Where(x => x.SortIndex == "09").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[9].Values[5] = items.Where(x => x.SortIndex == "10").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[10].Values[5] = items.Where(x => x.SortIndex == "11").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[11].Values[5] = items.Where(x => x.SortIndex == "12").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[12].Values[5] = items.Where(x => x.SortIndex == "13").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[13].Values[5] = items.Where(x => x.SortIndex == "14").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[15].Values[5] = items.Where(x => x.SortIndex == "16").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[16].Values[5] = items.Where(x => x.SortIndex == "17").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[17].Values[5] = items.Where(x => x.SortIndex == "18").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[19].Values[5] = items.Where(x => x.SortIndex == "20").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[20].Values[5] = items.Where(x => x.SortIndex == "21").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[21].Values[5] = items.Where(x => x.SortIndex == "22").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[22].Values[5] = items.Where(x => x.SortIndex == "23").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[23].Values[5] = items.Where(x => x.SortIndex == "24").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[24].Values[5] = items.Where(x => x.SortIndex == "25").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[25].Values[5] = items.Where(x => x.SortIndex == "26").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[26].Values[5] = items.Where(x => x.SortIndex == "27").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[27].Values[5] = items.Where(x => x.SortIndex == "28").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[28].Values[5] = items.Where(x => x.SortIndex == "29").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[29].Values[5] = items.Where(x => x.SortIndex == "30").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[30].Values[5] = items.Where(x => x.SortIndex == "31").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[31].Values[5] = items.Where(x => x.SortIndex == "32").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[32].Values[5] = items.Where(x => x.SortIndex == "33").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[33].Values[5] = items.Where(x => x.SortIndex == "34").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[34].Values[5] = items.Where(x => x.SortIndex == "35").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[35].Values[5] = items.Where(x => x.SortIndex == "36").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[36].Values[5] = items.Where(x => x.SortIndex == "37").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[37].Values[5] = items.Where(x => x.SortIndex == "38").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[38].Values[5] = items.Where(x => x.SortIndex == "39").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[39].Values[5] = items.Where(x => x.SortIndex == "40").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[40].Values[5] = items.Where(x => x.SortIndex == "41").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[41].Values[5] = items.Where(x => x.SortIndex == "42").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[42].Values[5] = items.Where(x => x.SortIndex == "43").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[43].Values[5] = items.Where(x => x.SortIndex == "44").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[44].Values[5] = items.Where(x => x.SortIndex == "45").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[45].Values[5] = items.Where(x => x.SortIndex == "46").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[46].Values[5] = items.Where(x => x.SortIndex == "47").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[47].Values[5] = items.Where(x => x.SortIndex == "48").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[48].Values[5] = items.Where(x => x.SortIndex == "49").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[49].Values[5] = items.Where(x => x.SortIndex == "50").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[50].Values[5] = items.Where(x => x.SortIndex == "51").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[51].Values[5] = items.Where(x => x.SortIndex == "52").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[52].Values[5] = items.Where(x => x.SortIndex == "53").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[53].Values[5] = items.Where(x => x.SortIndex == "54").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[54].Values[5] = items.Where(x => x.SortIndex == "55").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[55].Values[5] = items.Where(x => x.SortIndex == "56").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[56].Values[5] = items.Where(x => x.SortIndex == "57").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[57].Values[5] = items.Where(x => x.SortIndex == "58").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[59].Values[5] = items.Where(x => x.SortIndex == "60").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ Grid1.Rows[60].Values[5] = items.Where(x => x.SortIndex == "61").Sum(x => Funs.GetNewDecimalOrZero(x.ThisYearValue));
+ }
+ }
+ }
+ }
+ else
+ {
+ items = BLL.ArchitectureReportItemService.GetShowItems(ArchitectureReportId);
+ this.Grid1.DataSource = items;
+ this.Grid1.DataBind();
}
}
@@ -1302,7 +1310,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
UnitId = drpUnit.SelectedValue,
Year = Funs.GetNewIntOrZero(drpYear.SelectedValue),
- Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue)
+ Month = Funs.GetNewIntOrZero(drpMonth.SelectedValue)
};
if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim()))
{
@@ -1311,14 +1319,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
report.DutyPerson = txtDutyPerson.Text.Trim();
if (String.IsNullOrEmpty(ArchitectureReportId))
{
- Environmental_ArchitectureReport old = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Environmental_ArchitectureReport old = ArchitectureReportService.GetArchitectureReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (old == null)
{
report.ArchitectureReportId = SQLHelper.GetNewID(typeof(Model.Environmental_ArchitectureReport));
report.UpState = BLL.Const.UpState_2;
report.FillingMan = this.CurrUser.UserName;
BLL.ArchitectureReportService.AddArchitectureReport(report);
- BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnAdd);
+ BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnAdd);
}
else
{
@@ -1332,7 +1340,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
report.ArchitectureReportId = ArchitectureReportId;
report.UpState = BLL.Const.UpState_2;
BLL.ArchitectureReportService.UpdateArchitectureReport(report);
- BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnModify);
+ BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnModify);
}
ArchitectureReportId = report.ArchitectureReportId;
BLL.ArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
@@ -1595,12 +1603,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnCopy_Click(object sender, EventArgs e)
{
- DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
+ DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
if (nowDate.HasValue)
{
DateTime showDate = new DateTime();
showDate = nowDate.Value.AddMonths(-3);
- Model.Environmental_ArchitectureReport ArchitectureReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, showDate.Year, Funs.GetNowQuarterlyByTime(showDate));
+ Model.Environmental_ArchitectureReport ArchitectureReport = BLL.ArchitectureReportService.GetArchitectureReportByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, showDate.Year, showDate.Month);
if (ArchitectureReport != null)
{
Model.Environmental_ArchitectureReport newArchitectureReport = new Environmental_ArchitectureReport();
@@ -1608,7 +1616,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
newArchitectureReport.ArchitectureReportId = this.ArchitectureReportId;
newArchitectureReport.UnitId = this.drpUnit.SelectedValue;
newArchitectureReport.Year = Convert.ToInt32(this.drpYear.SelectedValue);
- newArchitectureReport.Quarters = Convert.ToInt32(this.drpQuarters.SelectedValue);
+ newArchitectureReport.Month = Convert.ToInt32(this.drpMonth.SelectedValue);
newArchitectureReport.FillingMan = this.CurrUser.UserName;
newArchitectureReport.FillingDate = DateTime.Now;
newArchitectureReport.DutyPerson = this.CurrUser.UserName;
@@ -1647,7 +1655,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
var report = BLL.ArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
if (report != null)
{
- drpQuarters.SelectedValue = report.Quarters.ToString();
+ drpMonth.SelectedValue = report.Month.ToString();
drpYear.SelectedValue = report.Year.ToString();
drpUnit.SelectedValue = report.UnitId;
if (report.FillingDate != null)
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.designer.cs
index 5918d10..a1783d3 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.designer.cs
@@ -49,13 +49,13 @@ namespace FineUIPro.Web.ZHGL.Environmental {
protected global::FineUIPro.DropDownList drpYear;
///
- /// drpQuarters 控件。
+ /// drpMonth 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList drpQuarters;
+ protected global::FineUIPro.DropDownList drpMonth;
///
/// drpUnit 控件。
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx
index dedd78d..7580665 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx
@@ -1,4 +1,5 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectArchitectureReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Environmental.ProjectArchitectureReport" %>
+<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
@@ -18,50 +19,60 @@
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
#region 加载页面
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
- BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
- BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
+ this.ProjectId = this.CurrUser.LoginProjectId;
+ if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
+ {
+ this.ProjectId = Request.Params["projectId"];
+ }
+ this.InitDropDownList();
+ this.ucTree.UnitId = this.CurrUser.UnitId;
+ this.ucTree.ProjectId = this.ProjectId;
+ if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) )
+ {
+ this.panelLeftRegion.Hidden = true;
+ ////权限按钮方法
+ this.GetButtonPower();
+ }
this.drpUnit.DataTextField = "UnitName";
drpUnit.DataValueField = "UnitId";
@@ -24,12 +52,29 @@ namespace FineUIPro.Web.ZHGL.Environmental
drpUnit.DataBind();
this.drpUnit.Readonly = true;
////取上个报表时间
- DateTime showDate = System.DateTime.Now.AddMonths(-3);
- this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
+ DateTime showDate = System.DateTime.Now.AddMonths(-1);
+ drpMonth.SelectedValue = showDate.Month.ToString();
drpYear.SelectedValue = showDate.Year.ToString();
GetValue();
}
}
+ private void InitDropDownList()
+ {
+ BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
+ BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
+ }
+ ///
+ /// 公司级树加载
+ ///
+ ///
+ ///
+ protected void changeTree(object sender, EventArgs e)
+ {
+ this.ProjectId = this.ucTree.ProjectId;
+ this.GetButtonPower();
+ this.InitDropDownList();
+ this.GetValue();
+ }
private void SetEmpty()
{
@@ -46,9 +91,13 @@ namespace FineUIPro.Web.ZHGL.Environmental
#region 获取记录值
private void GetValue()
{
+ if (string.IsNullOrEmpty(this.ProjectId))
+ {
+ return;
+ }
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
- int Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue);
- Model.View_Environmental_ProjectArchitectureReport report = Funs.DB.View_Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == this.CurrUser.LoginProjectId && e.Quarters == Quarters && e.Year == year);
+ int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue);
+ Model.View_Environmental_ProjectArchitectureReport report = Funs.DB.View_Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == this.ProjectId && e.Month == month && e.Year == year);
if (report != null)
{
string upState = string.Empty;
@@ -60,7 +109,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
upState = "(未上报)";
}
- this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.QuartersStr + report.YearStr + upState;
+ this.SimpleForm1.Title = "企业建筑行业能源节约与生态环境保护汇总表" + report.MonthStr + report.YearStr + upState;
lbUnitName.Text = "填报企业:" + report.ProjectName;
if (report.FillingDate != null)
{
@@ -162,7 +211,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
private void GetButtonPower()
{
- var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectArchitectureReportMenuId);
+ var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectArchitectureReportMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -179,7 +228,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
}
}
- var getReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ var getReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
this.btnAudit1.Hidden = true;
this.btnAudit2.Hidden = true;
if (getReport != null)
@@ -203,6 +252,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
// }
//}
}
+ if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ {
+ btnNew.Hidden = true;
+ btnEdit.Hidden = true;
+ btnDelete.Hidden = true;
+ }
}
#endregion
@@ -214,7 +269,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnNew_Click(object sender, EventArgs e)
{
- PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Quarterss={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarters.SelectedValue, "编辑 - ")));
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?UnitId={0}&&Year={1}&&Months={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpMonth.SelectedValue, "编辑 - ")));
}
///
@@ -224,7 +279,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnEdit_Click(object sender, EventArgs e)
{
- Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
@@ -242,7 +297,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnAudit1_Click(object sender, EventArgs e)
{
- Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
@@ -260,7 +315,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnAudit2_Click(object sender, EventArgs e)
{
- Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}", report.ArchitectureReportId, "编辑 - ")));
@@ -278,7 +333,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnUpdata_Click(object sender, EventArgs e)
{
- Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectArchitectureReportSave.aspx?ArchitectureReportId={0}&type=Updata", report.ArchitectureReportId, "编辑 - ")));
@@ -296,10 +351,10 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnDelete_Click(object sender, EventArgs e)
{
- Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
- BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnDelete);
+ BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnDelete);
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ArchitectureReportId);
BLL.ProjectArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
BLL.ProjectArchitectureReportService.DeleteArchitectureReportByArchitectureReportId(report.ArchitectureReportId);
@@ -342,7 +397,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId.ToString());
if (report != null)
{
- return report.Year + "年" + report.Quarters + "月";
+ return report.Year + "年" + report.Month + "月";
}
}
return "";
@@ -380,7 +435,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void BtnBulletLeft_Click(object sender, EventArgs e)
{
- SetQuartersChange("-");
+ SetMonthChange("-");
}
///
@@ -390,30 +445,30 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void BulletRight_Click(object sender, EventArgs e)
{
- SetQuartersChange("+");
+ SetMonthChange("+");
}
///
/// 月份加减变化
///
///
- private void SetQuartersChange(string type)
+ private void SetMonthChange(string type)
{
- DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
+ DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
if (nowDate.HasValue)
{
DateTime showDate = new DateTime();
if (type == "+")
{
- showDate = nowDate.Value.AddMonths(3);
+ showDate = nowDate.Value.AddMonths(1);
}
else
{
- showDate = nowDate.Value.AddMonths(-3);
+ showDate = nowDate.Value.AddMonths(-1);
}
this.drpYear.SelectedValue = showDate.Year.ToString();
- this.drpQuarters.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
+ drpMonth.SelectedValue = showDate.Month.ToString();
///值变化
GetValue();
}
@@ -428,7 +483,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnSee_Click(object sender, EventArgs e)
{
- Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Model.Environmental_ProjectArchitectureReport report = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.ProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (report != null)
{
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ArchitectureReportId, "查看 - ")));
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.designer.cs
index 526d2f5..80064cc 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReport.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.ZHGL.Environmental
-{
-
-
- public partial class ProjectArchitectureReport
- {
-
+namespace FineUIPro.Web.ZHGL.Environmental {
+
+
+ public partial class ProjectArchitectureReport {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,25 +29,52 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
- /// RegionPanel1 控件。
+ /// Panel1 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.RegionPanel RegionPanel1;
-
+ protected global::FineUIPro.Panel Panel1;
+
///
- /// Region2 控件。
+ /// panelLeftRegion 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Region Region2;
-
+ protected global::FineUIPro.Panel panelLeftRegion;
+
+ ///
+ /// ContentPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel1;
+
+ ///
+ /// ucTree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
+
+ ///
+ /// panelCenterRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelCenterRegion;
+
///
/// SimpleForm1 控件。
///
@@ -58,7 +83,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// Toolbar1 控件。
///
@@ -67,7 +92,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// drpUnit 控件。
///
@@ -76,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// drpYear 控件。
///
@@ -85,16 +110,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpYear;
-
+
///
- /// drpQuarters 控件。
+ /// drpMonth 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList drpQuarters;
-
+ protected global::FineUIPro.DropDownList drpMonth;
+
///
/// BtnBulletLeft 控件。
///
@@ -103,7 +128,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button BtnBulletLeft;
-
+
///
/// BtnBulletRight 控件。
///
@@ -112,7 +137,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button BtnBulletRight;
-
+
///
/// ToolbarFill1 控件。
///
@@ -121,7 +146,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// btnSee 控件。
///
@@ -130,7 +155,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSee;
-
+
///
/// btnNew 控件。
///
@@ -139,7 +164,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnEdit 控件。
///
@@ -148,7 +173,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnEdit;
-
+
///
/// btnDelete 控件。
///
@@ -157,7 +182,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnDelete;
-
+
///
/// btnAudit1 控件。
///
@@ -166,7 +191,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAudit1;
-
+
///
/// btnAudit2 控件。
///
@@ -175,7 +200,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAudit2;
-
+
///
/// lbUnitName 控件。
///
@@ -184,7 +209,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbUnitName;
-
+
///
/// lbFillingDate 控件。
///
@@ -193,7 +218,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbFillingDate;
-
+
///
/// lbDutyPerson 控件。
///
@@ -202,7 +227,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbDutyPerson;
-
+
///
/// lbHandleMan 控件。
///
@@ -211,7 +236,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label lbHandleMan;
-
+
///
/// Grid1 控件。
///
@@ -220,7 +245,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Window1 控件。
///
@@ -229,7 +254,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// Window4 控件。
///
@@ -238,7 +263,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window4;
-
+
///
/// Window5 控件。
///
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx
index 66d2ab7..895af80 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx
@@ -31,8 +31,8 @@
-
+
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs
index e126ede..9a48ef4 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.cs
@@ -45,7 +45,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
this.GetButtonPower();
items.Clear();
- BLL.ConstValue.InitConstValueDropDownList(this.drpQuarters, ConstValue.Group_0011, false);
+ BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false);
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
this.drpUnit.DataTextField = "UnitName";
drpUnit.DataValueField = "UnitId";
@@ -53,7 +53,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
drpUnit.DataBind();
this.drpUnit.Readonly = true;
string year = Request.QueryString["Year"];
- string quarters = Request.QueryString["Quarterss"];
+ string months = Request.QueryString["Months"];
ArchitectureReportId = Request.QueryString["ArchitectureReportId"];
if (!string.IsNullOrEmpty(ArchitectureReportId))
{
@@ -68,7 +68,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true;
}
- drpQuarters.SelectedValue = report.Quarters.ToString();
+ drpMonth.SelectedValue = report.Month.ToString();
drpYear.SelectedValue = report.Year.ToString();
this.CurrUser.LoginProjectId = report.ProjectId;
if (report.FillingDate != null)
@@ -81,12 +81,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
else
{
//this.btnCopy.Hidden = false;
- drpQuarters.SelectedValue = quarters;
+ drpMonth.SelectedValue = months;
drpYear.SelectedValue = year;
txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
txtDutyPerson.Text = this.CurrUser.UserName;
//增加明细集合
- GetNewItems(year, quarters);
+ GetNewItems(year, months);
this.Grid1.DataSource = items;
this.Grid1.DataBind();
}
@@ -196,9 +196,8 @@ namespace FineUIPro.Web.ZHGL.Environmental
}
else
{
- DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
- DateTime lastQuarters = nowDate.Value.AddMonths(-3);
- Environmental_ProjectArchitectureReport lastQuartersReport = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, lastQuarters.Year, Funs.GetNowQuarterlyByTime(lastQuarters));
+ DateTime lastMonth = Convert.ToDateTime(drpYear.SelectedValue + "-" + drpMonth.SelectedValue + "-01").AddYears(-1);
+ Environmental_ProjectArchitectureReport lastQuartersReport = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, lastMonth.Year, lastMonth.Month);
if (lastQuartersReport != null)
{
//var lastQuartersReportItems = BLL.ProjectArchitectureReportItemService.GetItems(lastQuartersReport.ArchitectureReportId);
@@ -948,7 +947,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
{
ProjectId = this.CurrUser.LoginProjectId,
Year = Funs.GetNewIntOrZero(drpYear.SelectedValue),
- Quarters = Funs.GetNewIntOrZero(drpQuarters.SelectedValue)
+ Month = Funs.GetNewIntOrZero(drpMonth.SelectedValue)
};
if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim()))
{
@@ -962,14 +961,14 @@ namespace FineUIPro.Web.ZHGL.Environmental
}
if (String.IsNullOrEmpty(ArchitectureReportId))
{
- Environmental_ProjectArchitectureReport old = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarters.SelectedValue));
+ Environmental_ProjectArchitectureReport old = ProjectArchitectureReportService.GetArchitectureReportByProjectIdDate(this.CurrUser.LoginProjectId, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue));
if (old == null)
{
report.ArchitectureReportId = SQLHelper.GetNewID(typeof(Model.Environmental_ProjectArchitectureReport));
report.FillingMan = this.CurrUser.UserName;
ArchitectureReportId = report.ArchitectureReportId;
BLL.ProjectArchitectureReportService.AddArchitectureReport(report);
- BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnAdd);
+ BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnAdd);
}
else
{
@@ -982,7 +981,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
Model.Environmental_ProjectArchitectureReport oldReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
report.ArchitectureReportId = ArchitectureReportId;
BLL.ProjectArchitectureReportService.UpdateArchitectureReport(report);
- BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Quarters.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnModify);
+ BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.ArchitectureReportId, BLL.Const.ProjectArchitectureReportMenuId, BLL.Const.BtnModify);
}
ArchitectureReportId = report.ArchitectureReportId;
BLL.ProjectArchitectureReportItemService.DeleteArchitectureReportItemByArchitectureReportId(report.ArchitectureReportId);
@@ -1120,12 +1119,12 @@ namespace FineUIPro.Web.ZHGL.Environmental
///
protected void btnCopy_Click(object sender, EventArgs e)
{
- DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarters.SelectedValue) * 3).ToString());
+ DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue);
if (nowDate.HasValue)
{
DateTime showDate = new DateTime();
showDate = nowDate.Value.AddMonths(-3);
- Model.Environmental_ProjectArchitectureReport ArchitectureReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, showDate.Year, Funs.GetNowQuarterlyByTime(showDate));
+ Model.Environmental_ProjectArchitectureReport ArchitectureReport = BLL.ProjectArchitectureReportService.GetArchitectureReportByProjectIdAndYearAndQuarters(this.CurrUser.LoginProjectId, showDate.Year, showDate.Month);
if (ArchitectureReport != null)
{
Model.Environmental_ProjectArchitectureReport newArchitectureReport = new Environmental_ProjectArchitectureReport();
@@ -1133,7 +1132,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
newArchitectureReport.ArchitectureReportId = this.ArchitectureReportId;
newArchitectureReport.ProjectId = this.CurrUser.LoginProjectId;
newArchitectureReport.Year = Convert.ToInt32(this.drpYear.SelectedValue);
- newArchitectureReport.Quarters = Convert.ToInt32(this.drpQuarters.SelectedValue);
+ newArchitectureReport.Month = Convert.ToInt32(this.drpMonth.SelectedValue);
newArchitectureReport.FillingMan = this.CurrUser.UserName;
newArchitectureReport.FillingDate = DateTime.Now;
newArchitectureReport.DutyPerson = this.CurrUser.UserName;
@@ -1172,7 +1171,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
var report = BLL.ProjectArchitectureReportService.GetArchitectureReportByArchitectureReportId(ArchitectureReportId);
if (report != null)
{
- drpQuarters.SelectedValue = report.Quarters.ToString();
+ drpMonth.SelectedValue = report.Month.ToString();
drpYear.SelectedValue = report.Year.ToString();
this.CurrUser.LoginProjectId = report.ProjectId;
if (report.FillingDate != null)
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.designer.cs
index b51652f..a4558c7 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Environmental/ProjectArchitectureReportSave.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.ZHGL.Environmental
-{
-
-
- public partial class ProjectArchitectureReportSave
- {
-
+namespace FineUIPro.Web.ZHGL.Environmental {
+
+
+ public partial class ProjectArchitectureReportSave {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// drpYear 控件。
///
@@ -49,16 +47,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpYear;
-
+
///
- /// drpQuarters 控件。
+ /// drpMonth 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.DropDownList drpQuarters;
-
+ protected global::FineUIPro.DropDownList drpMonth;
+
///
/// drpUnit 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// txtFillingDate 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtFillingDate;
-
+
///
/// txtDutyPerson 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtDutyPerson;
-
+
///
/// Grid1 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// txtBaseNumber 控件。
///
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtBaseNumber;
-
+
///
/// txtLastYearValue 控件。
///
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtLastYearValue;
-
+
///
/// txtThisYearValue 控件。
///
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtThisYearValue;
-
+
///
/// Toolbar1 控件。
///
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// btnSave 控件。
///
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// btnSubmit 控件。
///
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSubmit;
-
+
///
/// Window1 控件。
///
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs
index 46a192c..3533869 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs
@@ -414,49 +414,52 @@ namespace FineUIPro.Web.ZHGL.Information
private string AuditData()
{
string err = string.Empty;
- Model.SUBQHSEDB db = Funs.DB;
- var reports = from x in db.Information_MillionsMonthlyReport
- where x.FillingDate < DateTime.Now
- orderby x.FillingDate descending
- select x;
- if (!string.IsNullOrEmpty(this.MillionsMonthlyReportId))
- {
- reports = from x in reports
- where x.MillionsMonthlyReportId != this.MillionsMonthlyReportId
- orderby x.FillingDate descending
- select x;
- }
- var reportIds = reports.Select(x => x.MillionsMonthlyReportId).Take(3).ToList();
- //var items = from x in db.Information_MillionsMonthlyReportItem
- // where reportIds.Contains(x.MillionsMonthlyReportId)
- // select new { x.Name, x.TotalWorkNum };
- var items = from x in db.Information_MillionsMonthlyReportItem
- where reportIds.Contains(x.MillionsMonthlyReportId)
- select new { x.Name, x.TotalWorkNum };
- foreach (JObject mergedRow in Grid1.GetMergedData())
- {
- JObject values = mergedRow.Value("values");
- if (!string.IsNullOrEmpty(values["Name"].ToString()) && !string.IsNullOrEmpty(values["TotalWorkNum"].ToString()))
- {
- string name = values.Value("Name");
- decimal d = values.Value("TotalWorkNum");
- var list = items.Where(x => x.Name == name);
- decimal a = 0;
- if (list.Count() > 0)
- {
- foreach (var item in list)
- {
- a += item.TotalWorkNum ?? 0;
- }
- }
- decimal b = a / list.Count();
- if (d > b * 5)
- {
- err = name + "的总工时数超过前三个月平均值5倍,请核对后重新录入!";
- break;
- }
- }
- }
+ // Model.SUBQHSEDB db = Funs.DB;
+ // var reports = from x in db.Information_MillionsMonthlyReport
+ // where x.FillingDate < DateTime.Now
+ // orderby x.FillingDate descending
+ // select x;
+ // if (!string.IsNullOrEmpty(this.MillionsMonthlyReportId))
+ // {
+ // reports = from x in reports
+ // where x.MillionsMonthlyReportId != this.MillionsMonthlyReportId
+ // orderby x.FillingDate descending
+ // select x;
+ // }
+ // var reportIds = reports.Select(x => x.MillionsMonthlyReportId).Take(3).ToList();
+ // //var items = from x in db.Information_MillionsMonthlyReportItem
+ // // where reportIds.Contains(x.MillionsMonthlyReportId)
+ // // select new { x.Name, x.TotalWorkNum };
+ // var items = from x in db.Information_MillionsMonthlyReportItem
+ // where reportIds.Contains(x.MillionsMonthlyReportId)
+ // select new { x.Name, x.TotalWorkNum };
+ // foreach (JObject mergedRow in Grid1.GetMergedData())
+ // {
+ // JObject values = mergedRow.Value("values");
+ // if (!string.IsNullOrEmpty(values["Name"].ToString()) && !string.IsNullOrEmpty(values["TotalWorkNum"].ToString()))
+ // {
+ // string name = values.Value("Name");
+ // decimal d = values.Value("TotalWorkNum");
+ // var list = items.Where(x => x.Name == name);
+ // decimal a = 0;
+ // if (list.Count() > 0)
+ // {
+ // foreach (var item in list)
+ // {
+ // a += item.TotalWorkNum ?? 0;
+ // }
+ // }
+ // if (list.Count() > 0)
+ // {
+ // decimal b = a / list.Count();
+ // if (d > b * 5)
+ // {
+ // err = name + "的总工时数超过前三个月平均值5倍,请核对后重新录入!";
+ // break;
+ // }
+ // }
+ // }
+ // }
return err;
}
#endregion
diff --git a/SUBQHSE/Model/APIItem/ArchitectureReport.cs b/SUBQHSE/Model/APIItem/ArchitectureReport.cs
index c6a1405..322fa2d 100644
--- a/SUBQHSE/Model/APIItem/ArchitectureReport.cs
+++ b/SUBQHSE/Model/APIItem/ArchitectureReport.cs
@@ -36,9 +36,9 @@ namespace Model
}
///
- /// 季度
+ /// 月份
///
- public int? Quarters
+ public int? Month
{
get;
set;
diff --git a/SUBQHSE/Model/Model.cs b/SUBQHSE/Model/Model.cs
index 3ed3f0c..ded0937 100644
--- a/SUBQHSE/Model/Model.cs
+++ b/SUBQHSE/Model/Model.cs
@@ -155632,6 +155632,8 @@ namespace Model
private string _UpState;
+ private System.Nullable _Month;
+
private EntityRef _Base_Unit;
private EntitySet _Environmental_ArchitectureReportItem;
@@ -155656,6 +155658,8 @@ namespace Model
partial void OnDutyPersonChanged();
partial void OnUpStateChanging(string value);
partial void OnUpStateChanged();
+ partial void OnMonthChanging(System.Nullable value);
+ partial void OnMonthChanged();
#endregion
public Environmental_ArchitectureReport()
@@ -155829,6 +155833,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
+ public System.Nullable Month
+ {
+ get
+ {
+ return this._Month;
+ }
+ set
+ {
+ if ((this._Month != value))
+ {
+ this.OnMonthChanging(value);
+ this.SendPropertyChanging();
+ this._Month = value;
+ this.SendPropertyChanged("Month");
+ this.OnMonthChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ArchitectureReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
public Base_Unit Base_Unit
{
@@ -160218,6 +160242,8 @@ namespace Model
private string _UpState;
+ private System.Nullable _Month;
+
private EntityRef _Base_Project;
private EntitySet _Environmental_ProjectArchitectureReportItem;
@@ -160242,6 +160268,8 @@ namespace Model
partial void OnDutyPersonChanged();
partial void OnUpStateChanging(string value);
partial void OnUpStateChanged();
+ partial void OnMonthChanging(System.Nullable value);
+ partial void OnMonthChanged();
#endregion
public Environmental_ProjectArchitectureReport()
@@ -160415,6 +160443,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
+ public System.Nullable Month
+ {
+ get
+ {
+ return this._Month;
+ }
+ set
+ {
+ if ((this._Month != value))
+ {
+ this.OnMonthChanging(value);
+ this.SendPropertyChanging();
+ this._Month = value;
+ this.SendPropertyChanged("Month");
+ this.OnMonthChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Environmental_ProjectArchitectureReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@@ -464685,13 +464733,13 @@ namespace Model
private string _YearStr;
- private string _QuartersStr;
+ private string _MonthStr;
private string _UnitName;
private System.Nullable _Year;
- private System.Nullable _Quarters;
+ private System.Nullable _Month;
private string _UpState;
@@ -464781,18 +464829,18 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuartersStr", DbType="NVarChar(100)")]
- public string QuartersStr
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthStr", DbType="NVarChar(100)")]
+ public string MonthStr
{
get
{
- return this._QuartersStr;
+ return this._MonthStr;
}
set
{
- if ((this._QuartersStr != value))
+ if ((this._MonthStr != value))
{
- this._QuartersStr = value;
+ this._MonthStr = value;
}
}
}
@@ -464829,18 +464877,18 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="Int")]
- public System.Nullable Quarters
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
+ public System.Nullable Month
{
get
{
- return this._Quarters;
+ return this._Month;
}
set
{
- if ((this._Quarters != value))
+ if ((this._Month != value))
{
- this._Quarters = value;
+ this._Month = value;
}
}
}
@@ -465720,13 +465768,13 @@ namespace Model
private string _YearStr;
- private string _QuartersStr;
+ private string _MonthStr;
private string _ProjectName;
private System.Nullable _Year;
- private System.Nullable _Quarters;
+ private System.Nullable _Month;
private string _UpState;
@@ -465816,18 +465864,18 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuartersStr", DbType="NVarChar(100)")]
- public string QuartersStr
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthStr", DbType="NVarChar(100)")]
+ public string MonthStr
{
get
{
- return this._QuartersStr;
+ return this._MonthStr;
}
set
{
- if ((this._QuartersStr != value))
+ if ((this._MonthStr != value))
{
- this._QuartersStr = value;
+ this._MonthStr = value;
}
}
}
@@ -465864,18 +465912,18 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="Int")]
- public System.Nullable Quarters
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
+ public System.Nullable Month
{
get
{
- return this._Quarters;
+ return this._Month;
}
set
{
- if ((this._Quarters != value))
+ if ((this._Month != value))
{
- this._Quarters = value;
+ this._Month = value;
}
}
}
@@ -468010,7 +468058,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(50)")]
public string RegisterTypesName
{
get
@@ -469045,7 +469093,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(50)")]
public string RegisterTypesName
{
get
diff --git a/SUBQHSE/WebAPI/Controllers/Customization/ZJ/UnitHazardRegisterController.cs b/SUBQHSE/WebAPI/Controllers/Customization/ZJ/UnitHazardRegisterController.cs
index 5404b9b..1be27ff 100644
--- a/SUBQHSE/WebAPI/Controllers/Customization/ZJ/UnitHazardRegisterController.cs
+++ b/SUBQHSE/WebAPI/Controllers/Customization/ZJ/UnitHazardRegisterController.cs
@@ -48,7 +48,7 @@ namespace WebAPI
///
/// 页码
///
- public Model.ResponeData getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex)
+ public Model.ResponeData getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex,int pageSize, string ProblemTypes)
{
var responeData = new Model.ResponeData();
try
@@ -58,12 +58,12 @@ namespace WebAPI
projectId = null;
}
List getDataList = new List();
- int pageCount = Funs.DB.HSSE_Hazard_HazardRegister.Count(x => (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null));
- if (pageCount > 0 && pageIndex > 0)
- {
- getDataList = APIUnitHazardRegisterService.getHazardRegisterByProjectIdStates(projectId, states, pageIndex);
- }
- responeData.data = new { pageCount, getDataList };
+ // int pageCount = Funs.DB.HSSE_Hazard_HazardRegister.Count(x => (x.ProjectId == projectId || projectId == null) && (x.States == states || states == null));
+ // if (pageCount > 0 && pageIndex > 0)
+ // {
+ getDataList = APIUnitHazardRegisterService.getHazardRegisterByProjectIdStates(projectId, states, pageIndex, pageSize,ProblemTypes);
+ // }
+ responeData.data = new { getDataList.Count, getDataList };
}
catch (Exception ex)
{
diff --git a/SUBQHSE/WebAPI/Controllers/HSSE/RectifyController.cs b/SUBQHSE/WebAPI/Controllers/HSSE/RectifyController.cs
index 3d0c22f..49ffb18 100644
--- a/SUBQHSE/WebAPI/Controllers/HSSE/RectifyController.cs
+++ b/SUBQHSE/WebAPI/Controllers/HSSE/RectifyController.cs
@@ -88,5 +88,97 @@ namespace WebAPI.Controllers.HSSE
return responeData;
}
#endregion
+
+
+ #region 获取质量集合
+ ///
+ /// 获取集合
+ ///
+ ///
+ public Model.ResponeData getProjectQualityList(string RectifyName, int PageNumber, int PageSize)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+
+ // var query = (from a in Funs.DB.WBS_ProjectQuality
+ // join b in Funs.DB.Base_QualityQuestionType on a.ProjectName equals b.QualityQuestionTypeId into joined
+ // from b in joined.DefaultIfEmpty()
+ // select new
+ // {
+ // a.ProjectQualityId,
+ // QualityQuestionType = b != null ? b.QualityQuestionType : null
+ // }).ToList();
+ //
+ //
+ var query = (from x in Funs.DB.Base_QualityQuestionType
+ select new
+ {
+ x.QualityQuestionTypeId,
+ x.QualityQuestionType,
+ }).ToList();
+
+ if (!string.IsNullOrEmpty(RectifyName))
+ {
+ query = query.Where(x => x.QualityQuestionType.Contains(RectifyName)).ToList();
+ }
+
+ var paginatedQuery = query
+ .Skip((PageNumber - 1) * PageSize)
+ .Take(PageSize)
+ .ToList();
+
+ responeData.data = paginatedQuery;
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
+ #endregion
+
+
+ #region 根据id获取质量明细列表
+ ///
+ /// 获取集合
+ ///
+ ///
+ public Model.ResponeData getQualityItemListBy(string RectifyId,string HazardSourcePoint, int PageNumber, int PageSize)
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ var query = (from x in Funs.DB.WBS_ProjectQuality
+ where x.ProjectName == RectifyId
+ select new
+ {
+ x.ProjectQualityId,
+ x.ProjectQualityDes,
+ x.ProjectQualityResult
+ }).ToList();
+ if (!string.IsNullOrEmpty(HazardSourcePoint))
+ {
+ query = query.Where(x => x.ProjectQualityDes.Contains(HazardSourcePoint)).ToList();
+ }
+
+ var paginatedQuery = query
+ .Skip((PageNumber - 1) * PageSize)
+ .Take(PageSize)
+ .ToList();
+
+ responeData.data = paginatedQuery;
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+
+ return responeData;
+ }
+ #endregion
}
}
\ No newline at end of file