关键事项优化;进度管理,月计划统计调整
This commit is contained in:
@@ -7,6 +7,10 @@ using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using FineUIPro.Web.HSSE.License;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using Model;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.JDGL.Check
|
||||
@@ -41,14 +45,41 @@ namespace FineUIPro.Web.JDGL.Check
|
||||
/// <param name="cNProfessionalId"></param>
|
||||
public void BindStatisc()
|
||||
{
|
||||
DateTime months = Convert.ToDateTime(this.txtMonths.Text + "-01");
|
||||
var cycle = this.ckCycle.SelectedValue;
|
||||
StatisticsList = new List<Model.JDGL_MonthPlan>();
|
||||
int i = 1;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
//所有集合
|
||||
var totalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months select x;
|
||||
//所有集合
|
||||
var sumTotalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months <= months select x;
|
||||
List<JDGL_MonthPlan> totalList = new List<JDGL_MonthPlan>();
|
||||
List<JDGL_MonthPlan> sumTotalList = new List<JDGL_MonthPlan>();
|
||||
if (cycle == "1")
|
||||
{//按月
|
||||
DateTime months = Convert.ToDateTime(this.txtMonths.Text + "-01");
|
||||
//所有集合
|
||||
totalList = (from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months select x).ToList();
|
||||
//所有集合
|
||||
sumTotalList = (from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months <= months select x).ToList();
|
||||
}
|
||||
else if (cycle == "2")
|
||||
{//按年(以上一年度12月份至本年度11月份为一个周期)
|
||||
DateTime sDate = Convert.ToDateTime(this.txtYear.Text + "-12-01").AddYears(-1);
|
||||
DateTime eDate = Convert.ToDateTime(this.txtYear.Text + "-12-01");
|
||||
//所有集合
|
||||
totalList = (from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months >= sDate && x.Months < eDate select x).ToList();
|
||||
//所有集合
|
||||
sumTotalList = (from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months < eDate select x).ToList();
|
||||
}
|
||||
else
|
||||
{//按项目周期
|
||||
//所有集合
|
||||
totalList = (from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
//所有集合
|
||||
sumTotalList = (from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
}
|
||||
////所有集合
|
||||
//var totalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months select x;
|
||||
////所有集合
|
||||
//var sumTotalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months <= months select x;
|
||||
|
||||
if (this.ckType.SelectedValue == "1") //按责任单位
|
||||
{
|
||||
var pUnit = from x in db.Project_ProjectUnit
|
||||
@@ -159,7 +190,7 @@ namespace FineUIPro.Web.JDGL.Check
|
||||
this.txtMonths.Hidden = false;
|
||||
this.txtYear.Hidden = true;
|
||||
}
|
||||
else if(cycle == "2")
|
||||
else if (cycle == "2")
|
||||
{//按年份
|
||||
this.txtMonths.Hidden = true;
|
||||
this.txtYear.Hidden = false;
|
||||
|
||||
Reference in New Issue
Block a user