From c4187f9a3321d9ff62579f87dedf66bf8151690d Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 04 四月 2025 11:01:35 +0800
Subject: [PATCH] 加班
---
DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs | 196 +++---------------------------------------------
1 files changed, 14 insertions(+), 182 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs b/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs
index 16fe505..a94f6ea 100644
--- a/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs
+++ b/DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs
@@ -24,11 +24,8 @@
{
InitializeComponent();
toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
-
toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
- List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
- gvList.Add(gridView1);
- Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
+ this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
@@ -70,7 +67,7 @@
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- var frm = new ShowFilter(gridView1.Columns, _filterList);
+ var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
frm.UpdateParent += Frm_UpdateParent;
frm.ShowDialog();
}
@@ -86,59 +83,7 @@
getPageList(1);
}
- /// <summary>
- /// 鍙栨秷浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
- {
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
- }
-
- /// <summary>
- /// 鍒犻櫎浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
- {
- string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_userName, gridView1, "userName");
- if (string.IsNullOrEmpty(rowGuid))
- {
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
- return;
- }
-
- if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
- return;
- var lst = new List<string>();
- lst.Add(rowGuid);
- var _obj = lst;
- try
- {
- var strJson = UtilityHelper.HttpPost("", "User/DeleteModel",
- JsonConvert.SerializeObject(_obj));
- var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- if (_rtn.rtnCode > 0)
- {
- if (xtraTabControl1.SelectedTabPageIndex == 0)
- { }
- else
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
- getPageList(this.pageBar1.CurrentPage);
- }
-
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
- }
-
+
/// <summary>
/// 鍒锋柊浜嬩欢
/// </summary>
@@ -161,101 +106,7 @@
}
}
- /// <summary>
- /// 淇敼浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
- {
- string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_userName, gridView1);
- if (string.IsNullOrEmpty(rowGuid))
- {
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
- return;
- }
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
- UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
- }
-
- /// <summary>
- /// 鏂板浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
- {
- lbGuid.Text = "";
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
- UtilityHelper.CleanValueByControl(panel1.Controls, true);
- txt_password.Visible = lbPwd.Visible = true;
- txt_account.Enabled = txt_password.Enabled = true;
- }
-
- /// <summary>
- /// 淇濆瓨浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
- {
- toolBarMenu1.isSetBtn = false;
- if (string.IsNullOrEmpty(txt_account.Text.Trim()))
- {
- MsgHelper.Warning("鐧诲綍璐﹀彿涓嶈兘涓虹┖锛�");
- txt_account.Focus();
- return;
- }
-
- if (string.IsNullOrEmpty(txt_password.Text.Trim()))
- {
- MsgHelper.Warning("瀵嗙爜涓嶈兘涓虹┖锛�");
- txt_password.Focus();
- return;
- }
-
- if (string.IsNullOrEmpty(txt_userName.Text.Trim()))
- {
- MsgHelper.Warning("濮撳悕涓嶈兘涓虹┖锛�");
- txt_userName.Focus();
- return;
- }
-
- var _obj = new
- {
- Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- account = txt_account.Text.Trim(),
- password = txt_password.Text.Trim(),
- userName = txt_userName.Text.Trim(),
- address = txt_address.Text.Trim(),
- tel = txt_tel.Text.Trim(),
- email = txt_email.Text.Trim(),
- isStatus = txt_isStatus.Checked,
- remark = txt_remark.Text.Trim(),
- isSys = 0,
- staffId = txt_staffId.GetId()
- };
- try
- {
- var strJson = UtilityHelper.HttpPost("", "User/EditModel",
- JsonConvert.SerializeObject(_obj));
- var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
- if (_rtn.rtnCode > 0)
- {
- lbGuid.Text = _rtn.rtnData;
- toolBarMenu1.isSetBtn = true;
- UtilityHelper.ChangeEnableByControl(panel1.Controls, false);
- }
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
- }
-
+
/// <summary>
/// </summary>
/// <param name="curPage">绗嚑椤�</param>
@@ -274,16 +125,16 @@
if (dd.rtnCode > 0)
{
DataTable dt = dd.rtnData.list;
- gcMain.BindingContext = new BindingContext();
+ gcMain1.BindingContext = new BindingContext();
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
if (dt.Rows.Count > 0)
{
- gcMain.DataSource = dt;
- gcMain.ForceInitialize();
- gridView1.BestFitColumns();
+ gcMain1.DataSource = dt;
+ gcMain1.ForceInitialize();
+ gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
}
else
- UtilityHelper.SetDefaultTable(gcMain, gridView1);
+ UtilityHelper.SetDefaultTable(gcMain1, gridView1);
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉
pageBar1.CurrentPage = curPage;//褰撳墠椤�
@@ -324,10 +175,7 @@
{
var dy = _rtn.rtnData;
lbGuid.Text = strGuid;
- UtilityHelper.SetValueByObj(panel1.Controls, dy, isEdit);
- txt_account.Enabled = txt_password.Enabled =
- txt_password.Visible =
- lbPwd.Visible = tipPwd.Visible = false;
+ UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
}
else
{
@@ -339,23 +187,7 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
- /// <summary>
- /// 瑙掕壊
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void repositoryItemButtonEdit1_ButtonClick(object sender,
- ButtonPressedEventArgs e)
- {
- if (e.Button.Index == 0)
- {
- var rowhandle = gridView1.FocusedRowHandle;
- var dr = gridView1.GetDataRow(rowhandle);
- var userGuid = dr["guid"].ToString();
- var frm = new UserSelectRole(userGuid);
- frm.ShowDialog();
- }
- }
+
/// <summary>
/// pda椤甸潰
/// </summary>
@@ -369,7 +201,7 @@
var rowhandle = gridView1.FocusedRowHandle;
var dr = gridView1.GetDataRow(rowhandle);
var userGuid = dr["guid"].ToString();
- var frm = new UserSetPwd(userGuid);
+ var frm = new SelectPage(userGuid);
frm.ShowDialog();
}
}
@@ -385,7 +217,7 @@
var rowhandle = gridView1.FocusedRowHandle;
var dr = gridView1.GetDataRow(rowhandle);
var userGuid = dr["guid"].ToString();
- var frm = new RoleSelectAction(userGuid);
+ var frm = new SelectCk(userGuid);
frm.ShowDialog();
}
}
@@ -402,7 +234,7 @@
var rowhandle = gridView1.FocusedRowHandle;
var dr = gridView1.GetDataRow(rowhandle);
var userGuid = dr["guid"].ToString();
- var frm = new ViewRole(userGuid);
+ var frm = new SelectPrint(userGuid);
frm.ShowDialog();
}
}
--
Gitblit v1.9.3