SGGL_SHJ/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractTrackProgressChart....

52 lines
1.7 KiB
C#
Raw Normal View History

using BLL;
using System;
2023-09-01 15:29:53 +08:00
using System.Linq;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.PHTGL.ContractCompile
{
public partial class ContractTrackProgressChart : PageBase
{
public string ContractId
{
get => (string)ViewState["ContractId"];
set => ViewState["ContractId"] = value;
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ContractId = Request.Params["ContractId"];
BindChart();
}
}
void BindChart()
{
if (!string.IsNullOrEmpty(ContractId))
{
var db = Funs.DB;
var result = (from x in db.PHTGL_ContractTrackProgress
join y in db.PHTGL_ContractTrack on x.ContractTrackId equals y.Id
2023-09-01 15:29:53 +08:00
where y.ContractId == ContractId
group x by x.Date into g
select new
2023-09-01 15:29:53 +08:00
{
= g.Key,
BCWS工程量 = g.Sum(x => x.BCWS_Quantity),
BCWS产值 = g.Sum(x => x.BCWS_OutputValue),
BCWS百分比 = g.Sum(x => x.BCWS_Percentage),
ACWP工程量 = g.Sum(x => x.ACWP_Quantity),
ACWP产值 = g.Sum(x => x.ACWP_OutputValue),
ACWP百分比 = g.Sum(x => x.ACWP_Percentage)
}).ToList();
2023-09-01 15:29:53 +08:00
this.ChartEV.CreateMaryChartHTGL(LINQToDataTable(result), 1020, 420, null);
}
2023-09-01 15:29:53 +08:00
}
}
}