代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -183,7 +183,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
}
|
||||
|
||||
|
||||
var tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId);
|
||||
var tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId);
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
ContractReviewId = Request.Params["ContractReviewId"];
|
||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
|
||||
|
||||
BLL.DepartService.InitDepartDropDownList(DropDepart, true);
|
||||
#region 会签下拉框
|
||||
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConstructionManager, null, Const.UnitId_SEDIN, null, true);//施工经理
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
@@ -101,11 +95,11 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string Id =e.DataItem.GetType().GetProperty("Id").GetValue(e.DataItem).ToString();
|
||||
{
|
||||
|
||||
string Id = e.DataItem.GetType().GetProperty("Id").GetValue(e.DataItem).ToString();
|
||||
var model = PhtglContractTrackService.GetPHTGL_ContractTrackById(Id);
|
||||
|
||||
|
||||
// 工程量偏差
|
||||
decimal? QuantityOffset = Funs.GetNewDecimalOrZero(model.EstimatedQuantity) -
|
||||
Funs.GetNewDecimalOrZero(model.SettledQuantity);
|
||||
@@ -126,9 +120,9 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -254,7 +248,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
model.ProjectDescription = ProjectDescription;
|
||||
model.UnitOfMeasurement = UnitOfMeasurement;
|
||||
model.Quantity = Quantity;
|
||||
model.TotalCostFixedComprehensiveUnitPrice = Funs.GetNewDecimalOrZero( TotalCostFixedComprehensiveUnitPrice);
|
||||
model.TotalCostFixedComprehensiveUnitPrice = Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice);
|
||||
model.MainMaterialCost = Funs.GetNewDecimalOrZero(MainMaterialCost);
|
||||
model.TotalPrice = Funs.GetNewDecimalOrZero(TotalPrice);
|
||||
model.CalculationRule = CalculationRule;
|
||||
@@ -267,7 +261,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
model.EstimatedQuantity = EstimatedQuantity;
|
||||
model.EstimatedAmount = Funs.GetNewDecimal(EstimatedAmount);
|
||||
model.SettledQuantity = SettledQuantity;
|
||||
model.SettledAmount = Funs.GetNewDecimalOrZero(SettledQuantity)* Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice);
|
||||
model.SettledAmount = Funs.GetNewDecimalOrZero(SettledQuantity) * Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice);
|
||||
|
||||
PhtglContractTrackService.UpdatePHTGL_ContractTrack(model);
|
||||
}
|
||||
@@ -280,7 +274,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
ShowNotify("计算合同权重失败,请选择施工分包合同后重新保存", MessageBoxIcon.Question);
|
||||
}
|
||||
|
||||
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Net.Configuration;
|
||||
using BLL;
|
||||
using FineUIPro.Web.PHTGL.BiddingManagement;
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
public partial class ContractTrackEdit: PageBase
|
||||
public partial class ContractTrackEdit : PageBase
|
||||
{
|
||||
#region
|
||||
|
||||
@@ -44,7 +40,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
var model = PhtglContractTrackService.GetPHTGL_ContractTrackById(Id);
|
||||
if (model != null)
|
||||
{
|
||||
|
||||
|
||||
DropContractCode.SelectedValue = ContractService.GetContractById(model.ContractId).ContractNum;
|
||||
txtSerialNumber.Text = model.SerialNumber;
|
||||
txtMainItemCode.Text = model.MainItemCode;
|
||||
@@ -58,7 +54,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
txtProjectDescription.Text = model.ProjectDescription;
|
||||
txtUnitOfMeasurement.Text = model.UnitOfMeasurement;
|
||||
txtQuantity.Text = model.Quantity;
|
||||
txtTotalCostFixedComprehensiveUnitPrice.Text = model.TotalCostFixedComprehensiveUnitPrice.HasValue?model.TotalCostFixedComprehensiveUnitPrice.ToString():"";
|
||||
txtTotalCostFixedComprehensiveUnitPrice.Text = model.TotalCostFixedComprehensiveUnitPrice.HasValue ? model.TotalCostFixedComprehensiveUnitPrice.ToString() : "";
|
||||
txtMainMaterialCost.Text = model.MainMaterialCost.HasValue ? model.MainMaterialCost.ToString() : "";
|
||||
txtTotalPrice.Text = model.TotalPrice.HasValue ? model.TotalPrice.ToString() : "";
|
||||
txtCalculationRule.Text = model.CalculationRule;
|
||||
@@ -67,7 +63,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
txtConstructionSubcontractor.Text = model.ConstructionSubcontractor;
|
||||
txtContractWeight.Text = model.ContractWeight;
|
||||
txtMaterialSupplier.Text = model.MaterialSupplier;
|
||||
cbIsWithinGeneralContractScope.Checked = model.IsWithinGeneralContractScope ??false;
|
||||
cbIsWithinGeneralContractScope.Checked = model.IsWithinGeneralContractScope ?? false;
|
||||
txtEstimatedQuantity.Text = model.EstimatedQuantity;
|
||||
txtEstimatedAmount.Text =
|
||||
model.EstimatedAmount.HasValue ? model.EstimatedAmount.ToString() : "";
|
||||
@@ -87,11 +83,11 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
Model.PHTGL_ContractTrackProgress queryProgress = new PHTGL_ContractTrackProgress();
|
||||
queryProgress.ContractTrackProgressId = ID;
|
||||
var tb= PhtglContracttrackprogressService.GetListData(queryProgress, Grid1);
|
||||
Grid1.RecordCount = PhtglContracttrackprogressService.Count;
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
#region Grid1
|
||||
var tb = PhtglContracttrackprogressService.GetListData(queryProgress, Grid1);
|
||||
Grid1.RecordCount = PhtglContracttrackprogressService.Count;
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
#region Grid1
|
||||
// 删除选中单元格的客户端脚本
|
||||
string deleteScript = GetDeleteScript();
|
||||
|
||||
@@ -151,10 +147,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
var table = new PHTGL_ContractTrack();
|
||||
if (string.IsNullOrEmpty(DropContractCode.SelectedValue))
|
||||
{
|
||||
ShowNotify("请选择施工分包合同",MessageBoxIcon.Question);
|
||||
ShowNotify("请选择施工分包合同", MessageBoxIcon.Question);
|
||||
return;
|
||||
}
|
||||
table.ContractId =ContractService.GetContractByContractNum(DropContractCode.SelectedValue).ContractId;
|
||||
table.ContractId = ContractService.GetContractByContractNum(DropContractCode.SelectedValue).ContractId;
|
||||
table.SerialNumber = txtSerialNumber.Text;
|
||||
table.MainItemCode = txtMainItemCode.Text;
|
||||
table.MainItemName = txtMainItemName.Text;
|
||||
@@ -175,10 +171,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
table.Remarks = txtRemarks.Text;
|
||||
table.ConstructionSubcontractor = txtConstructionSubcontractor.Text;
|
||||
table.ContractWeight = txtContractWeight.Text;
|
||||
table.MaterialSupplier = txtMaterialSupplier.Text;
|
||||
table.MaterialSupplier = txtMaterialSupplier.Text;
|
||||
table.IsWithinGeneralContractScope = cbIsWithinGeneralContractScope.Checked;
|
||||
table.EstimatedQuantity = txtEstimatedQuantity.Text;
|
||||
table.EstimatedAmount = Funs.GetNewDecimalOrZero(txtEstimatedAmount.Text);
|
||||
table.EstimatedAmount = Funs.GetNewDecimalOrZero(txtEstimatedAmount.Text);
|
||||
table.SettledQuantity = txtSettledQuantity.Text;
|
||||
table.SettledAmount = Funs.GetNewDecimalOrZero(txtSettledAmount.Text);
|
||||
table.ContractNum = DropContractCode.SelectedValue;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
@@ -80,7 +76,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
var fileName = rootPath + initPath + hdFileName.Text;
|
||||
|
||||
ResponeData responeData = new ResponeData();
|
||||
responeData = PhtglContractTrackService.ImportData(fileName, ContractId, this.CurrUser.LoginProjectId);
|
||||
responeData = PhtglContractTrackService.ImportData(fileName, ContractId, this.CurrUser.LoginProjectId);
|
||||
|
||||
|
||||
if (responeData.code == 1)
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
using BLL;
|
||||
using Microsoft.Vbe.Interop;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
@@ -29,7 +25,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
this.DropContractCode.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId);
|
||||
this.DropContractCode.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.DropContractCode);
|
||||
PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems,true);
|
||||
PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems, true);
|
||||
DropMainContractCode_SelectedIndexChanged(null, null);
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
@@ -49,21 +45,21 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
table.ContractId = this.ContractId;
|
||||
table.ProjectCode = this.txtProjectCode.Text.Trim();
|
||||
table.ProjectName = this.txtProjectName.Text.Trim();
|
||||
table.MainItemName=this.txtMainItemName.Text.Trim();
|
||||
if (drpMajorItems.SelectedValue!=Const._Null)
|
||||
table.MainItemName = this.txtMainItemName.Text.Trim();
|
||||
if (drpMajorItems.SelectedValue != Const._Null)
|
||||
{
|
||||
table.MajorName=drpMajorItems.SelectedValue;
|
||||
table.MajorName = drpMajorItems.SelectedValue;
|
||||
}
|
||||
var tb = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackByModle(table);
|
||||
|
||||
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
Grid1.DataSource = PhtglContractTrackService.GetListData(table,Grid1);
|
||||
Grid1.DataSource = PhtglContractTrackService.GetListData(table, Grid1);
|
||||
Grid1.RecordCount = PhtglContractTrackService.Count;
|
||||
Grid1.DataBind();
|
||||
var sumTotalPricea = tb.Select(x => x.TotalPrice).ToList().Sum();
|
||||
lbTotalPrice.Text = sumTotalPricea.ToString();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region GV 数据操作
|
||||
@@ -156,7 +152,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grid行双击事件
|
||||
@@ -468,17 +464,17 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
model.MainItemName = MainItemName;
|
||||
model.MajorName = MajorName;
|
||||
model.MajorCode = MajorCode;
|
||||
model.SubProject= SubProject;
|
||||
model.SubItemProject= SubItemProject;
|
||||
model.SubProject = SubProject;
|
||||
model.SubItemProject = SubItemProject;
|
||||
// model.ProjectCode = ProjectCode;
|
||||
model.ProjectName = ProjectName;
|
||||
model.ProjectDescription = ProjectDescription;
|
||||
model.UnitOfMeasurement = UnitOfMeasurement;
|
||||
model.Quantity = Quantity;
|
||||
model.TotalCostFixedComprehensiveUnitPrice =Funs.GetNewDecimalOrZero( TotalCostFixedComprehensiveUnitPrice);
|
||||
model.TotalCostFixedComprehensiveUnitPrice = Funs.GetNewDecimalOrZero(TotalCostFixedComprehensiveUnitPrice);
|
||||
model.MainMaterialCost = Funs.GetNewDecimalOrZero(MainMaterialCost);
|
||||
// model.TotalPrice = Funs.GetNewDecimalOrZero(TotalPrice);
|
||||
model.TotalPrice = (Funs.GetNewDecimalOrZero(Quantity)* model.TotalCostFixedComprehensiveUnitPrice);
|
||||
// model.TotalPrice = Funs.GetNewDecimalOrZero(TotalPrice);
|
||||
model.TotalPrice = (Funs.GetNewDecimalOrZero(Quantity) * model.TotalCostFixedComprehensiveUnitPrice);
|
||||
model.CalculationRule = CalculationRule;
|
||||
model.WorkContent = WorkContent;
|
||||
model.Remarks = Remarks;
|
||||
@@ -493,7 +489,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
|
||||
PhtglContractTrackService.UpdatePHTGL_ContractTrack(model);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
ShowNotify("保存成功", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
|
||||
@@ -481,8 +481,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var workPackages = (from x in db.WBS_WorkPackage
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x).ToList();
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x).ToList();
|
||||
var controlItemAndCycles = from x in totalControlItemAndCycles
|
||||
where SelectedList.Contains(x.ControlItemAndCycleId)
|
||||
select x;
|
||||
@@ -522,7 +522,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c);
|
||||
//更新上级WBS内容概算费用
|
||||
BLL.WorkPackageService.UpdateWorkPackagesPlanCost(workPackages, c.WorkPackageId, changePlanCost);
|
||||
var workPackage = workPackages.FirstOrDefault(x=>x.WorkPackageId== c.WorkPackageId);
|
||||
var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == c.WorkPackageId);
|
||||
if (workPackage != null)
|
||||
{
|
||||
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId);
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
@@ -31,25 +28,25 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
var db = Funs.DB;
|
||||
var result = (from x in db.PHTGL_ContractTrackProgress
|
||||
|
||||
join y in db.PHTGL_ContractTrack on x.ContractTrackId equals y.Id
|
||||
join y in db.PHTGL_ContractTrack on x.ContractTrackId equals y.Id
|
||||
|
||||
where y.ContractId == ContractId
|
||||
group x by x.Date into g
|
||||
select new
|
||||
where y.ContractId == ContractId
|
||||
group x by x.Date into g
|
||||
select new
|
||||
|
||||
{
|
||||
月份 = 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();
|
||||
{
|
||||
月份 = 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();
|
||||
|
||||
this.ChartEV.CreateMaryChartHTGL(LINQToDataTable(result), 1020, 420, null);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,11 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
public partial class ContractTrackProgressDetection : PageBase
|
||||
{
|
||||
|
||||
|
||||
public string ContractId
|
||||
{
|
||||
get => (string)ViewState["ContractId"];
|
||||
@@ -21,7 +14,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
{
|
||||
//主合同编号
|
||||
this.DropContractCode.DataTextField = "ContractNum";
|
||||
this.DropContractCode.DataValueField = "ContractNum";
|
||||
@@ -29,10 +22,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
this.DropContractCode.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.DropContractCode);
|
||||
DropMainContractCode_SelectedIndexChanged(null, null);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void DropMainContractCode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(DropContractCode.SelectedValue))
|
||||
@@ -50,8 +43,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
|
||||
}
|
||||
|
||||
panelCenterRegion.IFrameUrl = "./ContractTrackProgressDetectionGrid.aspx?ContractId="+ContractId;
|
||||
}
|
||||
panelCenterRegion.IFrameUrl = "./ContractTrackProgressDetectionGrid.aspx?ContractId=" + ContractId;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+46
-49
@@ -7,10 +7,7 @@ using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Model;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
@@ -23,7 +20,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
InitGrid();
|
||||
}
|
||||
public DataTable GridTable=new DataTable();
|
||||
public DataTable GridTable = new DataTable();
|
||||
private void InitGrid()
|
||||
{
|
||||
FineUIPro.BoundField bf;
|
||||
@@ -33,7 +30,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
|
||||
ContractId = Request.Params["ContractId"];
|
||||
|
||||
GridTable.Columns.Add("Id");
|
||||
GridTable.Columns.Add("Id");
|
||||
GridTable.Columns.Add("SerialNumber");
|
||||
ListItem[] list = new ListItem[8];
|
||||
list[0] = new ListItem("主项号", "MainItemCode");
|
||||
@@ -65,8 +62,8 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
queryContractTrack.ProjectId = this.CurrUser.LoginProjectId;
|
||||
queryContractTrack.ContractId = this.ContractId;
|
||||
var modelContractTracks = BLL.PhtglContractTrackService.GetFirstPHTGL_ContractTrackByModle(queryContractTrack);
|
||||
if (modelContractTracks==null) return;
|
||||
|
||||
if (modelContractTracks == null) return;
|
||||
|
||||
|
||||
Model.PHTGL_ContractTrackProgress table = new Model.PHTGL_ContractTrackProgress();
|
||||
table.ContractTrackId = modelContractTracks.Id;
|
||||
@@ -74,7 +71,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
foreach (var item in tb)
|
||||
{
|
||||
//string date = item.Date.Replace("-", "");
|
||||
string date = item.Date+"#" ;
|
||||
string date = item.Date + "#";
|
||||
GroupField p = new GroupField();
|
||||
p.HeaderText = item.Date;
|
||||
p.TextAlign = TextAlign.Center;
|
||||
@@ -85,7 +82,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
|
||||
GroupField p1BCWS = new GroupField();
|
||||
p1BCWS.HeaderText = "BCWS";
|
||||
p1BCWS.TextAlign = TextAlign.Center;
|
||||
p1BCWS.TextAlign = TextAlign.Center;
|
||||
p1BCWS.Attributes["data-color"] = "color1";
|
||||
GroupField p1ACWP = new GroupField();
|
||||
p1ACWP.HeaderText = "ACWP";
|
||||
@@ -111,10 +108,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
#region BCWS
|
||||
|
||||
txTextBox = new FineUIPro.TextBox();
|
||||
txTextBox.ID = "txt" +date+ "BCWS_Quantity";
|
||||
txTextBox.ID = "txt" + date + "BCWS_Quantity";
|
||||
rf = new RenderField();
|
||||
rf.ColumnID = date+"BCWS_Quantity";
|
||||
rf.DataField = date+"BCWS_Quantity";
|
||||
rf.ColumnID = date + "BCWS_Quantity";
|
||||
rf.DataField = date + "BCWS_Quantity";
|
||||
rf.HeaderText = "工程量";
|
||||
rf.TextAlign = FineUIPro.TextAlign.Left;
|
||||
rf.Editor.Add(txTextBox);
|
||||
@@ -253,15 +250,15 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
p2.Columns.Add(p2ACWP);
|
||||
|
||||
p.Columns.Add(p1);
|
||||
p.Columns.Add(p2);
|
||||
p.Columns.Add(p2);
|
||||
|
||||
Grid1.Columns.Add(p);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
public string ContractId
|
||||
{
|
||||
@@ -272,9 +269,9 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GetButtonPower();
|
||||
this.GetButtonPower();
|
||||
|
||||
PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems, true);
|
||||
PHTGL_QuantityService.IniGetMajorItems3DownList(drpMajorItems, true);
|
||||
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
@@ -314,7 +311,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
Parallel.ForEach(splitContractTracks, parallelOptions, sublist =>
|
||||
{
|
||||
var tempTable = GridTable.Clone(); // 创建临时的 DataTable
|
||||
foreach (var item in sublist)
|
||||
foreach (var item in sublist)
|
||||
{
|
||||
DataRow row = tempTable.NewRow();
|
||||
row["SerialNumber"] = item.SerialNumber;
|
||||
@@ -353,7 +350,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
row[date + "SumACWP_Percentage"] = SumModel.ACWP_Percentage;
|
||||
}
|
||||
concurrentGridTable.TryAdd(item.Id, row);
|
||||
// GridTable.Rows.Add(row);
|
||||
// GridTable.Rows.Add(row);
|
||||
}
|
||||
});
|
||||
// 将线程安全的数据拷贝到 GridTable
|
||||
@@ -364,10 +361,10 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
GridTable.Rows.Add(newRow);
|
||||
}
|
||||
Grid1.RecordCount = count;
|
||||
Grid1.DataSource = GridTable.AsEnumerable().OrderBy(x => x["SerialNumber"].ToString(), new CustomComparer());;
|
||||
Grid1.DataSource = GridTable.AsEnumerable().OrderBy(x => x["SerialNumber"].ToString(), new CustomComparer()); ;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void Grid1_OnRowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ContractId))
|
||||
@@ -492,44 +489,44 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
if (EditorArr.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < EditorArr.Count; i++)
|
||||
{
|
||||
{
|
||||
JObject objects = (JObject)EditorArr[i];
|
||||
|
||||
var listfiled = objects["values"].ToList();
|
||||
var listfiled = objects["values"].ToList();
|
||||
|
||||
var Id = objects["id"].ToString();
|
||||
var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(Id);
|
||||
|
||||
|
||||
if (model!=null)
|
||||
{
|
||||
foreach (var item in listfiled) //遍历行中的字段
|
||||
{
|
||||
var b = item;
|
||||
var txtname = b.First.Path.Substring(b.First.Path.LastIndexOf('.') + 1);
|
||||
var txtvalue = b.First.Value<string>();
|
||||
string date = txtname.Split('#')[0].ToString();
|
||||
string filed = txtname.Split('#')[1].ToString();
|
||||
var Id = objects["id"].ToString();
|
||||
var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(Id);
|
||||
|
||||
var modelContractTrackProgress = PhtglContracttrackprogressService.GetPHTGL_ContractTrackProgressByTrackIdAndDate(Id, date);
|
||||
if (modelContractTrackProgress!=null)
|
||||
{
|
||||
switch (filed)
|
||||
{
|
||||
|
||||
if (model != null)
|
||||
{
|
||||
foreach (var item in listfiled) //遍历行中的字段
|
||||
{
|
||||
var b = item;
|
||||
var txtname = b.First.Path.Substring(b.First.Path.LastIndexOf('.') + 1);
|
||||
var txtvalue = b.First.Value<string>();
|
||||
string date = txtname.Split('#')[0].ToString();
|
||||
string filed = txtname.Split('#')[1].ToString();
|
||||
|
||||
var modelContractTrackProgress = PhtglContracttrackprogressService.GetPHTGL_ContractTrackProgressByTrackIdAndDate(Id, date);
|
||||
if (modelContractTrackProgress != null)
|
||||
{
|
||||
switch (filed)
|
||||
{
|
||||
case "ACWP_Quantity":
|
||||
modelContractTrackProgress.ACWP_Quantity = Funs.GetNewDecimalOrZero(txtvalue) ;
|
||||
modelContractTrackProgress.ACWP_Quantity = Funs.GetNewDecimalOrZero(txtvalue);
|
||||
break;
|
||||
case "BCWS_Quantity":
|
||||
modelContractTrackProgress.BCWS_Quantity = Funs.GetNewDecimalOrZero(txtvalue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
PhtglContracttrackprogressService.UpdatePHTGL_ContractTrackProgress(modelContractTrackProgress);
|
||||
}
|
||||
PhtglContracttrackprogressService.UpdatePHTGL_ContractTrackProgress(modelContractTrackProgress);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,7 +539,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
private void CheckProgressd()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ContractId))
|
||||
{
|
||||
{
|
||||
Model.PHTGL_ContractTrack queryContractTrack = new Model.PHTGL_ContractTrack();
|
||||
queryContractTrack.ProjectId = this.CurrUser.LoginProjectId;
|
||||
queryContractTrack.ContractId = this.ContractId;
|
||||
@@ -595,11 +592,11 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
// this.btnMenuEdit.Hidden = false;
|
||||
// this.btnMenuEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
// this.btnMenuDelete.Hidden = false;
|
||||
// this.btnMenuDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
@@ -45,9 +41,9 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
private void BindGrid()
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q =
|
||||
var q =
|
||||
from x in db.PHTGL_ContractTrack
|
||||
join y in db.PHTGL_ContractTrackMatchWBS on x.Id equals y.ContractTrackId into g
|
||||
join y in db.PHTGL_ContractTrackMatchWBS on x.Id equals y.ContractTrackId into g
|
||||
from y in g.DefaultIfEmpty()
|
||||
join z in db.WBS_ControlItemAndCycle on y.ControlItemAndCycleId equals z.ControlItemAndCycleId into _ControlJoin
|
||||
from z in _ControlJoin.DefaultIfEmpty()
|
||||
@@ -58,55 +54,55 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
(string.IsNullOrEmpty(this.txtProjectName.Text.Trim()) || x.ProjectName.Contains(this.txtProjectName.Text.Trim())) &&
|
||||
(string.IsNullOrEmpty(this.txtMainItemName.Text.Trim()) || x.MainItemName.Contains(this.txtMainItemName.Text.Trim()))
|
||||
select new
|
||||
{
|
||||
MatchWbsId= y.Id ,
|
||||
y.ContractTrackId,
|
||||
y.ControlItemAndCycleId,
|
||||
z.WBSCode,
|
||||
z.ControlItemContent,
|
||||
z.Weights,
|
||||
y.WorkPackageEstimate,
|
||||
x.Id,
|
||||
x.ContractNum,
|
||||
x.MainItemCode,
|
||||
x.MainItemName,
|
||||
x.MajorName,
|
||||
x.MajorCode,
|
||||
x.SubProject,
|
||||
x.SubItemProject,
|
||||
x.ProjectCode,
|
||||
x.ProjectName,
|
||||
x.ProjectDescription,
|
||||
x.UnitOfMeasurement,
|
||||
x.Quantity,
|
||||
x.TotalCostFixedComprehensiveUnitPrice,
|
||||
x.MainMaterialCost,
|
||||
x.TotalPrice,
|
||||
x.CalculationRule,
|
||||
x.WorkContent,
|
||||
x.Remarks,
|
||||
x.ConstructionSubcontractor,
|
||||
x.ContractWeight,
|
||||
x.MaterialSupplier,
|
||||
x.IsWithinGeneralContractScope,
|
||||
x.EstimatedQuantity,
|
||||
x.EstimatedAmount,
|
||||
x.SettledQuantity,
|
||||
x.SettledAmount,
|
||||
x.ContractId,
|
||||
x.SerialNumber
|
||||
{
|
||||
MatchWbsId = y.Id,
|
||||
y.ContractTrackId,
|
||||
y.ControlItemAndCycleId,
|
||||
z.WBSCode,
|
||||
z.ControlItemContent,
|
||||
z.Weights,
|
||||
y.WorkPackageEstimate,
|
||||
x.Id,
|
||||
x.ContractNum,
|
||||
x.MainItemCode,
|
||||
x.MainItemName,
|
||||
x.MajorName,
|
||||
x.MajorCode,
|
||||
x.SubProject,
|
||||
x.SubItemProject,
|
||||
x.ProjectCode,
|
||||
x.ProjectName,
|
||||
x.ProjectDescription,
|
||||
x.UnitOfMeasurement,
|
||||
x.Quantity,
|
||||
x.TotalCostFixedComprehensiveUnitPrice,
|
||||
x.MainMaterialCost,
|
||||
x.TotalPrice,
|
||||
x.CalculationRule,
|
||||
x.WorkContent,
|
||||
x.Remarks,
|
||||
x.ConstructionSubcontractor,
|
||||
x.ContractWeight,
|
||||
x.MaterialSupplier,
|
||||
x.IsWithinGeneralContractScope,
|
||||
x.EstimatedQuantity,
|
||||
x.EstimatedAmount,
|
||||
x.SettledQuantity,
|
||||
x.SettledAmount,
|
||||
x.ContractId,
|
||||
x.SerialNumber
|
||||
};
|
||||
;
|
||||
if (drpMajorItems.SelectedValue != Const._Null)
|
||||
{
|
||||
q= q.Where(x =>
|
||||
x.MajorName.Contains(this.drpMajorItems.SelectedValue));
|
||||
q = q.Where(x =>
|
||||
x.MajorName.Contains(this.drpMajorItems.SelectedValue));
|
||||
}
|
||||
|
||||
Grid1.RecordCount = q.Count();
|
||||
Grid1.DataSource = q.ToList().OrderBy(x => x.SerialNumber, new CustomComparer()).ToList().Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize);
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void DropMainContractCode_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@@ -185,7 +181,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string ID = Grid1.SelectedRow.DataKeys[0].ToString();
|
||||
string ID = Grid1.SelectedRow.DataKeys[0].ToString();
|
||||
var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(ID);
|
||||
if (model != null) ///已上报时不能删除
|
||||
{
|
||||
@@ -216,7 +212,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
|
||||
Reference in New Issue
Block a user