From 95aa183a2c97dc3c3c1625a5766f44065475ef96 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 29 十二月 2020 17:42:34 +0800
Subject: [PATCH] 执行计划插件
---
src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs | 52 ++++++++++++++++++++++++++++++----------------------
1 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
index 06bd552..106122c 100644
--- a/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
+++ b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
@@ -23,6 +23,7 @@
if (this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID") == null)
{
SearchList();
+ ChangeColor();
}
else
{
@@ -55,35 +56,35 @@
this.Model.SetValue("FOwnerId", dt.Rows[i]["FOwnerId"], i);//璐т富
}
}
- did = true;
+
+ ChangeColor();
+ did = true;
}
}
- public override void AfterBindData(EventArgs e)
- {
- base.AfterBindData(e);
- //鑾峰彇鍗曟嵁浣撲俊鎭�
- //Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity");
- ////鍗曟嵁浣撲俊鎭浆鎹负鍒楄〃闆嗗悎
- //DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity);
- //EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity");
- //int i = 0;
- //foreach (DynamicObject current in entityDataObjoct)
- //{
- // if (Convert.ToString(current["FCompleteDetailStatus"]) == "鏈綈濂�")
- // {
- // grid.SetBackcolor("FEntity", "#FF0000", i);
- // }
- // i++;
- //}
- //this.View.UpdateView();
- }
+ private void ChangeColor() {
+ Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity");
+ //鍗曟嵁浣撲俊鎭浆鎹负鍒楄〃闆嗗悎
+ DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity);
+ EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity");
+ int _i = 0;
+ foreach (DynamicObject current in entityDataObjoct)
+ {
+ if (Convert.ToString(current["FCompleteDetailStatus"]) == "鏈綈濂�")
+ {
+ grid.SetRowBackcolor("#FF0000", _i);
+ }
+ _i++;
+ }
+ }
+
public override void BarItemClick(BarItemClickEventArgs e)
{
base.BarItemClick(e);
if (e.BarItemKey.ToUpper() == "TBFILTER")
{
SearchList();
+ ChangeColor();
}
}
/// <summary>
@@ -137,7 +138,13 @@
sql += sqlwhere;
sql += "order by FPlanDate, FHStockQty desc ,FHMaterID";
DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0];
- this.Model.DeleteEntryData("FEntity");
+ //this.Model.DeleteEntryData("FEntity");
+ while (this.Model.GetEntryRowCount("FEntity") > 0)
+ {
+ this.Model.DeleteEntryRow("FEntity", 0);
+ }
+ //this.View.Refresh();
+
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
@@ -159,7 +166,8 @@
this.Model.SetValue("FOwnerId", dt.Rows[i]["FOwnerId"], i);//璐т富
}
}
- this.View.UpdateView();
+
+ //this.View.UpdateView();
did = true;
}
}
--
Gitblit v1.9.1