建筑行业报表
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user