From 247d5855038f8d485c1d3a4b4a7bf148c66cbfd4 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 11 一月 2021 15:19:53 +0800
Subject: [PATCH] 领料单改为缺料单
---
src/BLL/Demo.BillView/PRD/PODemandPlanListLoad.cs | 71 ++++++++++++++++++++++-------------
1 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/src/BLL/Demo.BillView/PRD/PODemandPlanListLoad.cs b/src/BLL/Demo.BillView/PRD/PODemandPlanListLoad.cs
index 5a61a52..4576664 100644
--- a/src/BLL/Demo.BillView/PRD/PODemandPlanListLoad.cs
+++ b/src/BLL/Demo.BillView/PRD/PODemandPlanListLoad.cs
@@ -6,6 +6,8 @@
using System.ComponentModel;
using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel;
using Kingdee.BOS.Util;
+using System.Data;
+using Kingdee.BOS.ServiceHelper;
namespace Demo.BillView.PRD
{
@@ -16,37 +18,52 @@
public override void OnFormatRowConditions(Kingdee.BOS.Core.List.PlugIn.Args.ListFormatConditionArgs args)
{
base.OnFormatRowConditions(args);
- //1.浜哄憳浜ц兘涓嶈冻 绾㈣壊
- //2.妯″叿璁惧褰卞搷
- //3.鍘熸枡澶囪揣寤舵湡 姗欒壊
- //4.浜у搧璐ㄩ噺闂
- //5.璁捐鍙樻洿鍥犵礌褰卞搷 榛勮壊
- //6.蹇�掔墿娴佸師鍥�
- //7.涓嶅彲鎶楀姏鍥犵礌 钃濊壊
- FormatCondition fc = new FormatCondition();
- fc.ApplayRow = true;
-
- if (args.DataRow["FLateReason"].ToString() == "浜哄憳浜ц兘涓嶈冻" || args.DataRow["FLateReason"].ToString() == "妯″叿璁惧褰卞搷")
+ try
{
-
- fc.BackColor = ColorTranslator.ToHtml(System.Drawing.Color.Red);// 绾㈣壊;
+ FormatCondition fc = new FormatCondition();
+ fc.ApplayRow = true;
+ DataTable dt = new DataTable();
+ dt = DBServiceHelper.ExecuteDataSet(Context, "/*dialect*/select * from Jit_TlPlanConfigureDetail").Tables[0];
+ foreach (DataRow dr in dt.Rows)
+ {
+ if (args.DataRow["FLateReason2"].ToString() == dr["FLateReason"].ToString())
+ {
+ fc.BackColor = ColorTranslator.ToHtml(Color.FromName(dr["FSYSTEMCOLOR"].ToString()));
+ }
+ }
+ args.FormatConditions.Add(fc);
}
- else if (args.DataRow["FLateReason"].ToString() == "鍘熸枡澶囪揣寤舵湡" || args.DataRow["FLateReason"].ToString() == "浜у搧璐ㄩ噺闂")
+ catch (Exception ex)
{
-
- fc.BackColor = ColorTranslator.ToHtml(System.Drawing.Color.Orange);// 姗欒壊;
+ LogService.WriteAsync("娴嬭瘯");
}
- else if (args.DataRow["FLateReason"].ToString() == "璁捐鍙樻洿鍥犵礌褰卞搷" || args.DataRow["FLateReason"].ToString() == "蹇�掔墿娴佸師鍥�")
- {
-
- fc.BackColor = ColorTranslator.ToHtml(System.Drawing.Color.Yellow);// 榛勮壊;
- }
- else if (args.DataRow["FLateReason"].ToString() == "涓嶅彲鎶楀姏鍥犵礌")
- {
- fc.BackColor = ColorTranslator.ToHtml(System.Drawing.Color.LightBlue);// 钃濊壊;
- }
- args.FormatConditions.Add(fc);
-
}
+
+ #region [棰滆壊锛�16杩涘埗杞垚RGB]
+ /// <summary>
+ /// [棰滆壊锛�16杩涘埗杞垚RGB]
+ /// </summary>
+ /// <param name="strColor">璁剧疆16杩涘埗棰滆壊 [杩斿洖RGB]</param>
+ /// <returns></returns>
+ public static System.Drawing.Color colorHx16toRGB(string strHxColor)
+ {
+ try
+ {
+ if (strHxColor.Length == 0)
+ {//濡傛灉涓虹┖
+ return System.Drawing.Color.FromArgb(0, 0, 0);//璁句负榛戣壊
+ }
+ else
+ {//杞崲棰滆壊
+ return System.Drawing.Color.FromArgb(System.Int32.Parse(strHxColor.Substring(1, 2), System.Globalization.NumberStyles.AllowHexSpecifier), System.Int32.Parse(strHxColor.Substring(3, 2), System.Globalization.NumberStyles.AllowHexSpecifier), System.Int32.Parse(strHxColor.Substring(5, 2), System.Globalization.NumberStyles.AllowHexSpecifier));
+ }
+ }
+ catch
+ {//璁句负榛戣壊
+ return System.Drawing.Color.FromArgb(0, 0, 0);
+ }
+ }
+ #endregion
+
}
}
--
Gitblit v1.9.1