建筑行业报表
This commit is contained in:
parent
1cce9ee9e2
commit
5c2ca7b809
|
@ -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
|
||||
|
||||
|
|
@ -6740,15 +6740,15 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 施工技术交底管理
|
||||
/// </summary>
|
||||
public const string ConTechnologyDisclosureMenuId = "A16CFA9D-2783-4573-95F9-EBA2B682B7EA";
|
||||
public const string ConTechnologyDisclosureMenuId = "C2BBE0BC-C75A-4EEB-A893-8CDBD2DE2A74";
|
||||
/// <summary>
|
||||
/// 特设质保体系
|
||||
/// </summary>
|
||||
public const string CQMS_QualityAssuranceMenuId = "2C49EC5E-BF6F-4C44-BA02-9BD183CF68C6";
|
||||
public const string CQMS_QualityAssuranceMenuId = "D9BE2C06-E757-4611-A73D-91D2A8FD0DEA";
|
||||
/// <summary>
|
||||
/// 图纸会审管理
|
||||
/// </summary>
|
||||
public const string ReviewDrawingsMenuId = "856D53B3-C5FB-443F-917B-39E83BE685DB";
|
||||
public const string ReviewDrawingsMenuId = "C2BBE0BC-C75A-4EEB-A893-8CDBD2DE2A74";
|
||||
/// <summary>
|
||||
/// 图纸会审记录导入模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
|
|
|
@ -29,14 +29,14 @@ namespace BLL
|
|||
/// <param name="projectId"></param>
|
||||
/// <param name="states"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HazardRegisterItem> getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex)
|
||||
public static List<Model.HazardRegisterItem> 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<Model.View_Hazard_HazardRegister_Unit>, List<Model.HazardRegisterItem>>().Map(hazardRegisters.ToList());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -57,12 +57,12 @@ namespace BLL
|
|||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ArchitectureReportItem> GetYearSumItems(string unitId, int? year, int? Quarters)
|
||||
public static List<Model.Environmental_ArchitectureReportItem> 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();
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@ namespace BLL
|
|||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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
|
|||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -57,12 +57,12 @@ namespace BLL
|
|||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectArchitectureReportItem> GetYearSumItems(string projectId, int? year, int? Quarters)
|
||||
public static List<Model.Environmental_ProjectArchitectureReportItem> 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();
|
||||
}
|
||||
|
|
|
@ -25,9 +25,9 @@ namespace BLL
|
|||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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
|
|||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -36,13 +36,13 @@
|
|||
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||
Width="150px" LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpQuarters" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||
Width="150px" LabelWidth="50px" Label="季度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
<f:DropDownList ID="drpMonth" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||
Width="150px" LabelWidth="50px" Label="月份" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="BtnBulletLeft" ToolTip="前一季度" Text="前一季度" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||
<f:Button ID="BtnBulletLeft" ToolTip="前一个月" Text="前一个月" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||
OnClick="BtnBulletLeft_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="BtnBulletRight" ToolTip="后一季度" Text="后一季度" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||
<f:Button ID="BtnBulletRight" ToolTip="后一个月" Text="后一个月" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||
OnClick="BulletRight_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
|
@ -68,6 +68,9 @@
|
|||
<f:Button ID="btnView" ToolTip="查看未报项目" Text="查看未报项目" Icon="MagifierZoomOut" runat="server"
|
||||
OnClick="btnView_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnState" ToolTip="恢复未上报状态" Text="恢复未上报状态" Icon="Pencil" runat="server"
|
||||
OnClick="btnState_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
|
|
@ -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
|
|||
/// <param name="e"></param>
|
||||
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, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -259,7 +266,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetQuartersChange("-");
|
||||
SetMonthChange("-");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -424,30 +431,30 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// <param name="e"></param>
|
||||
protected void BulletRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetQuartersChange("+");
|
||||
SetMonthChange("+");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 月份加减变化
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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 + ",未填写报表;</br>";
|
||||
|
@ -719,5 +726,21 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 恢复未上报状态
|
||||
/// <summary>
|
||||
/// 恢复未上报状态
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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
|
||||
}
|
||||
}
|
|
@ -7,13 +7,11 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Environmental
|
||||
{
|
||||
|
||||
|
||||
public partial class ArchitectureReport
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Environmental {
|
||||
|
||||
|
||||
public partial class ArchitectureReport {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -22,7 +20,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -31,7 +29,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// RegionPanel1 控件。
|
||||
/// </summary>
|
||||
|
@ -40,7 +38,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RegionPanel RegionPanel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Region2 控件。
|
||||
/// </summary>
|
||||
|
@ -49,7 +47,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Region Region2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
|
@ -58,7 +56,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
@ -67,7 +65,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
|
@ -76,7 +74,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpYear 控件。
|
||||
/// </summary>
|
||||
|
@ -85,16 +83,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpYear;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpQuarters 控件。
|
||||
/// drpMonth 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpQuarters;
|
||||
|
||||
protected global::FineUIPro.DropDownList drpMonth;
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletLeft 控件。
|
||||
/// </summary>
|
||||
|
@ -103,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletLeft;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletRight 控件。
|
||||
/// </summary>
|
||||
|
@ -112,7 +110,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletRight;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
@ -121,7 +119,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSee 控件。
|
||||
/// </summary>
|
||||
|
@ -130,7 +128,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSee;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
@ -139,7 +137,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
|
@ -148,7 +146,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
|
@ -157,7 +155,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit1 控件。
|
||||
/// </summary>
|
||||
|
@ -166,7 +164,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit2 控件。
|
||||
/// </summary>
|
||||
|
@ -175,7 +173,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdata 控件。
|
||||
/// </summary>
|
||||
|
@ -184,7 +182,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdata;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnView 控件。
|
||||
/// </summary>
|
||||
|
@ -193,7 +191,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnView;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnState 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnState;
|
||||
|
||||
/// <summary>
|
||||
/// lbUnitName 控件。
|
||||
/// </summary>
|
||||
|
@ -202,7 +209,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbUnitName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbFillingDate 控件。
|
||||
/// </summary>
|
||||
|
@ -211,7 +218,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbFillingDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbDutyPerson 控件。
|
||||
/// </summary>
|
||||
|
@ -220,7 +227,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbDutyPerson;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbHandleMan 控件。
|
||||
/// </summary>
|
||||
|
@ -229,7 +236,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbHandleMan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -238,7 +245,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
@ -247,7 +254,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window4 控件。
|
||||
/// </summary>
|
||||
|
@ -256,7 +263,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window4;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window5 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
<f:DropDownList ID="drpYear" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||
ShowRedStar="true" runat="server" Label="年度">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpQuarters" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||
ShowRedStar="true" runat="server" Label="季度">
|
||||
<f:DropDownList ID="drpMonth" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||
ShowRedStar="true" runat="server" Label="月份">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||
Label="填报企业" FocusOnPageLoad="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
|
|
|
@ -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
|
|||
/// <param name="e"></param>
|
||||
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)
|
||||
|
|
|
@ -49,13 +49,13 @@ namespace FineUIPro.Web.ZHGL.Environmental {
|
|||
protected global::FineUIPro.DropDownList drpYear;
|
||||
|
||||
/// <summary>
|
||||
/// drpQuarters 控件。
|
||||
/// drpMonth 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpQuarters;
|
||||
protected global::FineUIPro.DropDownList drpMonth;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
|
|
|
@ -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" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
@ -18,50 +19,60 @@
|
|||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
|
||||
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
|
||||
<Regions>
|
||||
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
|
||||
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"/>
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree"/>
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="True" AutoScroll="true" BodyPadding="10px"
|
||||
EnableCollapse="true" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
EnableCollapse="true" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server" Hidden="true"
|
||||
Width="320px" LabelWidth="80px" Label="填报企业" EnableEdit="true" ForceSelection="false"
|
||||
OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
Width="320px" LabelWidth="80px" Label="填报企业" EnableEdit="true" ForceSelection="false"
|
||||
OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||
Width="150px" LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
Width="150px" LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpQuarters" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||
Width="150px" LabelWidth="50px" Label="季度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
<f:DropDownList ID="drpMonth" AutoPostBack="true" EnableSimulateTree="true" runat="server"
|
||||
Width="150px" LabelWidth="50px" Label="月份" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="BtnBulletLeft" ToolTip="前一季度" Text="前一季度" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||
OnClick="BtnBulletLeft_Click">
|
||||
<f:Button ID="BtnBulletLeft" ToolTip="前一个月" Text="前一个月" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||
OnClick="BtnBulletLeft_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="BtnBulletRight" ToolTip="后一季度" Text="后一季度" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||
OnClick="BulletRight_Click">
|
||||
<f:Button ID="BtnBulletRight" ToolTip="后一个月" Text="后一个月" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||
OnClick="BulletRight_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSee" ToolTip="查看审批流程" Text ="查看审批流程" Icon="Find" Hidden="true" runat="server" OnClick="btnSee_Click">
|
||||
<f:Button ID="btnSee" ToolTip="查看审批流程" Text="查看审批流程" Icon="Find" Hidden="true" runat="server" OnClick="btnSee_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Text ="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnNew_Click">
|
||||
<f:Button ID="btnNew" ToolTip="新增" Text="新增" Icon="Add" Hidden="true" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" ToolTip="编辑" Text ="编辑" Icon="Pencil" Hidden="true" runat="server" OnClick="btnEdit_Click">
|
||||
<f:Button ID="btnEdit" ToolTip="编辑" Text="编辑" Icon="Pencil" Hidden="true" runat="server" OnClick="btnEdit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" ToolTip="删除" Text ="删除" Icon="Delete" Hidden="true" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnDelete_Click" runat="server">
|
||||
<f:Button ID="btnDelete" ToolTip="删除" Text="删除" Icon="Delete" Hidden="true" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnDelete_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAudit1" ToolTip="审核" Text ="审核" Icon="Pencil" Hidden="true" runat="server"
|
||||
OnClick="btnAudit1_Click">
|
||||
<f:Button ID="btnAudit1" ToolTip="审核" Text="审核" Icon="Pencil" Hidden="true" runat="server"
|
||||
OnClick="btnAudit1_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAudit2" ToolTip="审批" Text="审批" Icon="Pencil" Hidden="true" runat="server"
|
||||
OnClick="btnAudit2_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAudit2" ToolTip="审批" Text ="审批" Icon="Pencil" Hidden="true" runat="server"
|
||||
OnClick="btnAudit2_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
@ -81,37 +92,38 @@
|
|||
</Rows>
|
||||
</f:Form>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="ArchitectureReportItemId" AllowCellEditing="true" ForceFit="true"
|
||||
SortField="SortIndex" ClicksToEdit="1" DataIDField="ArchitectureReportItemId"
|
||||
EnableColumnLines="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="350px" ColumnID="IndexName" DataField="IndexName" FieldType="String"
|
||||
HeaderText="指标名称" HeaderTextAlign="Center" TextAlign="Left" RendererFunction="renderIndexName">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Unit" DataField="Unit" FieldType="String"
|
||||
HeaderText="计量单位" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="40px" ColumnID="SortIndex" DataField="SortIndex" FieldType="String" Hidden="true"
|
||||
HeaderText="代码" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="BaseNumber" DataField="BaseNumber" FieldType="String"
|
||||
HeaderText="基期数" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="LastYearValue" DataField="LastYearValue" FieldType="String"
|
||||
HeaderText="上年累计完成值" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ThisYearValue" DataField="ThisYearValue" FieldType="String"
|
||||
HeaderText="本年累计完成值" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Rate" DataField="Rate" FieldType="String"
|
||||
HeaderText="与上年同期比较增减(%)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
BoxFlex="1" DataKeyNames="ArchitectureReportItemId" AllowCellEditing="true" ForceFit="true"
|
||||
SortField="SortIndex" ClicksToEdit="1" DataIDField="ArchitectureReportItemId"
|
||||
EnableColumnLines="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="350px" ColumnID="IndexName" DataField="IndexName" FieldType="String"
|
||||
HeaderText="指标名称" HeaderTextAlign="Center" TextAlign="Left" RendererFunction="renderIndexName">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Unit" DataField="Unit" FieldType="String"
|
||||
HeaderText="计量单位" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="40px" ColumnID="SortIndex" DataField="SortIndex" FieldType="String" Hidden="true"
|
||||
HeaderText="代码" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="BaseNumber" DataField="BaseNumber" FieldType="String"
|
||||
HeaderText="基期数" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="LastYearValue" DataField="LastYearValue" FieldType="String"
|
||||
HeaderText="上年累计完成值" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ThisYearValue" DataField="ThisYearValue" FieldType="String"
|
||||
HeaderText="本年累计完成值" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="Rate" DataField="Rate" FieldType="String"
|
||||
HeaderText="与上年同期比较增减(%)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Region>
|
||||
</Regions>
|
||||
</f:RegionPanel>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
<f:Window ID="Window1" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="编辑建筑行业能源节约与生态环境保护汇总表" CloseAction="HidePostBack" EnableIFrame="true" Height="650px"
|
||||
|
|
|
@ -9,14 +9,42 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
{
|
||||
public partial class ProjectArchitectureReport : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 项目主键
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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
|
|||
/// <returns></returns>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -224,7 +279,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetQuartersChange("-");
|
||||
SetMonthChange("-");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -390,30 +445,30 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// <param name="e"></param>
|
||||
protected void BulletRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetQuartersChange("+");
|
||||
SetMonthChange("+");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 月份加减变化
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
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
|
|||
/// <param name="e"></param>
|
||||
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, "查看 - ")));
|
||||
|
|
|
@ -7,13 +7,11 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Environmental
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectArchitectureReport
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Environmental {
|
||||
|
||||
|
||||
public partial class ProjectArchitectureReport {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -22,7 +20,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -31,25 +29,52 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// RegionPanel1 控件。
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RegionPanel RegionPanel1;
|
||||
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Region2 控件。
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Region Region2;
|
||||
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
|
@ -58,7 +83,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
@ -67,7 +92,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
|
@ -76,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpYear 控件。
|
||||
/// </summary>
|
||||
|
@ -85,16 +110,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpYear;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpQuarters 控件。
|
||||
/// drpMonth 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpQuarters;
|
||||
|
||||
protected global::FineUIPro.DropDownList drpMonth;
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletLeft 控件。
|
||||
/// </summary>
|
||||
|
@ -103,7 +128,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletLeft;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletRight 控件。
|
||||
/// </summary>
|
||||
|
@ -112,7 +137,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletRight;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
@ -121,7 +146,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSee 控件。
|
||||
/// </summary>
|
||||
|
@ -130,7 +155,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSee;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
|
@ -139,7 +164,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
|
@ -148,7 +173,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
|
@ -157,7 +182,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit1 控件。
|
||||
/// </summary>
|
||||
|
@ -166,7 +191,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit2 控件。
|
||||
/// </summary>
|
||||
|
@ -175,7 +200,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbUnitName 控件。
|
||||
/// </summary>
|
||||
|
@ -184,7 +209,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbUnitName;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbFillingDate 控件。
|
||||
/// </summary>
|
||||
|
@ -193,7 +218,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbFillingDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbDutyPerson 控件。
|
||||
/// </summary>
|
||||
|
@ -202,7 +227,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbDutyPerson;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// lbHandleMan 控件。
|
||||
/// </summary>
|
||||
|
@ -211,7 +236,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbHandleMan;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -220,7 +245,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
@ -229,7 +254,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window4 控件。
|
||||
/// </summary>
|
||||
|
@ -238,7 +263,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window4;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window5 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
<f:DropDownList ID="drpYear" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||
ShowRedStar="true" runat="server" Label="年度">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpQuarters" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||
ShowRedStar="true" runat="server" Label="季度">
|
||||
<f:DropDownList ID="drpMonth" AutoPostBack="false" EnableSimulateTree="true" Required="true"
|
||||
ShowRedStar="true" runat="server" Label="月份">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server" Hidden="true"
|
||||
Label="填报企业" FocusOnPageLoad="true" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
|
|
|
@ -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
|
|||
/// <param name="e"></param>
|
||||
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)
|
||||
|
|
|
@ -7,13 +7,11 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Environmental
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectArchitectureReportSave
|
||||
{
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Environmental {
|
||||
|
||||
|
||||
public partial class ProjectArchitectureReportSave {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -22,7 +20,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -31,7 +29,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
|
@ -40,7 +38,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpYear 控件。
|
||||
/// </summary>
|
||||
|
@ -49,16 +47,16 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpYear;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpQuarters 控件。
|
||||
/// drpMonth 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpQuarters;
|
||||
|
||||
protected global::FineUIPro.DropDownList drpMonth;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
|
@ -67,7 +65,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtFillingDate 控件。
|
||||
/// </summary>
|
||||
|
@ -76,7 +74,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtFillingDate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtDutyPerson 控件。
|
||||
/// </summary>
|
||||
|
@ -85,7 +83,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDutyPerson;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
@ -94,7 +92,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtBaseNumber 控件。
|
||||
/// </summary>
|
||||
|
@ -103,7 +101,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtBaseNumber;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtLastYearValue 控件。
|
||||
/// </summary>
|
||||
|
@ -112,7 +110,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtLastYearValue;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtThisYearValue 控件。
|
||||
/// </summary>
|
||||
|
@ -121,7 +119,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtThisYearValue;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
@ -130,7 +128,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
|
@ -139,7 +137,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
|
@ -148,7 +146,7 @@ namespace FineUIPro.Web.ZHGL.Environmental
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -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<JObject>("values");
|
||||
if (!string.IsNullOrEmpty(values["Name"].ToString()) && !string.IsNullOrEmpty(values["TotalWorkNum"].ToString()))
|
||||
{
|
||||
string name = values.Value<string>("Name");
|
||||
decimal d = values.Value<decimal>("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<JObject>("values");
|
||||
// if (!string.IsNullOrEmpty(values["Name"].ToString()) && !string.IsNullOrEmpty(values["TotalWorkNum"].ToString()))
|
||||
// {
|
||||
// string name = values.Value<string>("Name");
|
||||
// decimal d = values.Value<decimal>("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
|
||||
|
|
|
@ -36,9 +36,9 @@ namespace Model
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 季度
|
||||
/// 月份
|
||||
/// </summary>
|
||||
public int? Quarters
|
||||
public int? Month
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
|
|
@ -155632,6 +155632,8 @@ namespace Model
|
|||
|
||||
private string _UpState;
|
||||
|
||||
private System.Nullable<int> _Month;
|
||||
|
||||
private EntityRef<Base_Unit> _Base_Unit;
|
||||
|
||||
private EntitySet<Environmental_ArchitectureReportItem> _Environmental_ArchitectureReportItem;
|
||||
|
@ -155656,6 +155658,8 @@ namespace Model
|
|||
partial void OnDutyPersonChanged();
|
||||
partial void OnUpStateChanging(string value);
|
||||
partial void OnUpStateChanged();
|
||||
partial void OnMonthChanging(System.Nullable<int> 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<int> 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<int> _Month;
|
||||
|
||||
private EntityRef<Base_Project> _Base_Project;
|
||||
|
||||
private EntitySet<Environmental_ProjectArchitectureReportItem> _Environmental_ProjectArchitectureReportItem;
|
||||
|
@ -160242,6 +160268,8 @@ namespace Model
|
|||
partial void OnDutyPersonChanged();
|
||||
partial void OnUpStateChanging(string value);
|
||||
partial void OnUpStateChanged();
|
||||
partial void OnMonthChanging(System.Nullable<int> 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<int> 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<int> _Year;
|
||||
|
||||
private System.Nullable<int> _Quarters;
|
||||
private System.Nullable<int> _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<int> Quarters
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
|
||||
public System.Nullable<int> 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<int> _Year;
|
||||
|
||||
private System.Nullable<int> _Quarters;
|
||||
private System.Nullable<int> _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<int> Quarters
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")]
|
||||
public System.Nullable<int> 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
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace WebAPI
|
|||
/// <param name="states"></param>
|
||||
/// <param name="pageIndex">页码</param>
|
||||
/// <returns></returns>
|
||||
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<Model.HazardRegisterItem> getDataList = new List<Model.HazardRegisterItem>();
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -88,5 +88,97 @@ namespace WebAPI.Controllers.HSSE
|
|||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取质量集合
|
||||
/// <summary>
|
||||
/// 获取集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
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获取质量明细列表
|
||||
/// <summary>
|
||||
/// 获取集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue