From 97903580743bf5bce52a99e0f1c031be5f8fb1e5 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 16 一月 2025 10:30:18 +0800
Subject: [PATCH] 工具条的审核和反审核状态控制
---
DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs | 36 +++++++----
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 37 +++++++++---
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 51 ++++++++++++++++-
3 files changed, 97 insertions(+), 27 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
index 60d8605..d1380b2 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
@@ -27,7 +27,7 @@
InitializeComponent();
strType = _strType;
txt_bl017.Text = _strType;
- // txt_bl017.Tag = "moren." + _strType;
+ // txt_bl017.Tag = "moren." + _strType;
}
protected override void OnCreateControl()
@@ -175,8 +175,11 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- UtilityHelper.JumpToTab(xtraTabControl1, 0);
- getPageList(1);
+ if (xtraTabControl1.SelectedTabPageIndex == 0)
+ { }
+ else
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
+ getPageList(this.pageBar1.CurrentPage);
}
MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
@@ -199,14 +202,15 @@
getModel(lbGuid.Text.Trim());
else
{
- _filterList.Clear();
- if (gridView1.ActiveFilter.Count > 0)
- {
- gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
- gridView1.ActiveFilter.Clear();
- gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- }
- getPageList(1);
+ //_filterList.Clear();
+ //if (gridView1.ActiveFilter.Count > 0)
+ //{
+ // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+ // gridView1.ActiveFilter.Clear();
+ // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+ //}
+ //getPageList(1);
+ getPageList(this.pageBar1.CurrentPage);
}
}
/// <summary>
@@ -494,19 +498,23 @@
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
- if (_rtn.rtnCode > 0)
+ if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
getModel(lbGuid.Text.Trim());
else
- getPageList(this.pageBar1.CurrentPage);
+ {
+ int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+ gridView1.FocusedRowHandle = rowHandle;
+ Form parentForm = this.FindForm();
+ UtilityHelper.SetCheckIco(gridView1, "bl018", "bl016", "bl006", picCheckBox, parentForm, _inFieldValue.ToString());
+ }
}
}
catch (Exception ex)
{
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
-
}
private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e)
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index e59d30d..bea6539 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -24,6 +24,7 @@
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
+using OracleInternal.Sharding;
using UserControls.Data;
using static System.Windows.Forms.Control;
@@ -1585,7 +1586,38 @@
}
}
-
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="gridView1"></param>
+ /// <param name="zdChk">chk瀛楁</param>
+ /// <param name="zdChkUser">chk user</param>
+ /// <param name="zdCkDate">chk date</param>
+ /// <param name="btnChkIco"></param>
+ /// <param name="fm">褰撳墠绐椾綋</param>
+ /// <param name="fileName">1涓哄鏍革紝0涓哄弽瀹℃牳</param>
+ /// <param name="icoName"></param>
+ public static void SetCheckIco(GridView gridView1,string zdChk,string zdChkUser,string zdCkDate, PictureBox btnChkIco, Form fm, string fileName, string icoName = "")
+ {
+ if (fileName == "1" || fileName.ToUpper() == true.ToString().ToUpper())
+ {
+ btnChkIco.Image = global::Gs.DevApp.Properties.Resources.ico_check;
+ btnChkIco.Tag = "宸插鏍�";
+ gridView1.SetFocusedRowCellValue(zdChkUser, "宸插鏍�");
+ gridView1.SetFocusedRowCellValue(zdCkDate, DateTime.Now.ToString());
+ gridView1.SetFocusedRowCellValue(zdChk, true);
+ }
+ else
+ {
+ btnChkIco.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck;
+ btnChkIco.Tag = "鏈鏍�";
+ gridView1.SetFocusedRowCellValue(zdChkUser, "");
+ gridView1.SetFocusedRowCellValue(zdCkDate, "");
+ gridView1.SetFocusedRowCellValue(zdChk, false);
+ }
+ btnChkIco.Anchor = AnchorStyles.Top | AnchorStyles.Right; // 闈犲彸
+ btnChkIco.Location = new Point(fm.ClientSize.Width - btnChkIco.Width - 20, 80); // 璺濈椤堕儴10鍍忕礌
+ }
#region 璁剧疆鎼滅储
public static string getQueryWord(string str)
{
@@ -1747,8 +1779,21 @@
e.Appearance.BackColor = Color.LightPink;
}
}
+ // 璁剧疆鐒︾偣琛岀殑鑳屾櫙鑹�
+ if (gridView1.GetRow(e.RowHandle) == gridView1.GetFocusedRow())
+ {
+ e.Appearance.BackColor = Color.LightSkyBlue;
+ e.Appearance.BackColor2 = Color.Yellow;
+ }
+ //else if (gridView1.IsRowHotTracked(e.RowHandle))
+ //{
+ // // 璁剧疆榧犳爣鎮仠琛岀殑鑳屾櫙鑹�
+ // e.Appearance.BackColor = Color.LightBlue;
+ // e.Appearance.BackColor2 = Color.LightBlue;
+ //}
}
};
+
}
private static void ActiveEditor_MouseUp(object sender, MouseEventArgs e)
{
@@ -1766,7 +1811,7 @@
int _handle = gridView1.FocusedRowHandle;
bool _bl = xtraTabControl1.TabPages[0].PageEnabled;
if (_bl == false) { return; };
- if (_handle < 0 )
+ if (_handle < 0)
{
xtraTabControl1.SelectedTabPageIndex = -1;
Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇烽�夋嫨浣犺鏄剧ず鐨勮锛�" + _handle.ToString() + "tag" + xtraTabControl1.SelectedTabPageIndex.ToString());
@@ -1790,7 +1835,7 @@
}
if (xtraTabControl1.SelectedTabPageIndex == 0)
{
- // page(pageBar1.CurrentPage);
+ // page(pageBar1.CurrentPage);
}
};
}
diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
index dee8dcd..d982fa0 100644
--- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -67,17 +67,32 @@
if (Parent != null) getNamespace();
}
- private bool _isCk() {
+ private bool _isCk(int _type) {
Form parentForm = this.FindForm();
if (parentForm != null)
{
- PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
- if (specificControl != null)
+ if (_type == 1)
{
- if (specificControl.Tag.ToString() == "宸插鏍�")
+ PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
+ if (specificControl != null)
{
- Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹凡琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�");
- return true;
+ if (specificControl.Tag.ToString() == "宸插鏍�")
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹凡琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�");
+ return true;
+ }
+ }
+ }
+ if (_type == 0)
+ {
+ PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
+ if (specificControl != null)
+ {
+ if (specificControl.Tag.ToString() == "鏈鏍�")
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹湭琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�");
+ return true;
+ }
}
}
}
@@ -190,6 +205,8 @@
private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e)
{
+ bool bl = _isCk(0);
+ if (bl) return;
if (btnFChkClick != null)
{
btnFChkClick(this, e);
@@ -199,7 +216,7 @@
private void BtnChk_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
if (btnChkClick != null)
{
@@ -268,7 +285,7 @@
private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
if (btnJianYanClick != null)
btnJianYanClick(this, e);
@@ -513,7 +530,7 @@
private void BtnEdit_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
var lst = new List<string>();
lst.Add(btnSave.Name);
@@ -527,7 +544,7 @@
private void BtnDel_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
if (btnDelClick != null) btnDelClick(this, e);
--
Gitblit v1.9.3