From ed501c25cc1ef3e82e46e35513b67138a77afc4d Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 16 一月 2025 20:05:12 +0800 Subject: [PATCH] 切换组织 --- DevApp/Gs.DevApp/DevFrm/FrmMain.cs | 42 ++++++++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 12 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs index c00981d..1153964 100644 --- a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs +++ b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs @@ -15,10 +15,8 @@ using Gs.DevApp.DevFrm.User; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; -using Gs.DevApp.UserControl; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using static DevExpress.XtraReports.Design.XtraTabControl; namespace Gs.DevApp.DevFrm { @@ -63,6 +61,7 @@ } } }; + GetOrg(); } private void Tab_MouseDown(object sender, MouseEventArgs e) @@ -73,8 +72,7 @@ //TreeListHitInfo hInfo = treeList1.CalcHitInfo(new Point(e.X, e.Y)); //TreeListNode node = hInfo.Node; //treeList1.FocusedNode = node; - tab.ContextMenuStrip = contextMenuStrip1; - + tab.ContextMenuStrip = cms1; } } @@ -143,10 +141,9 @@ { getTree(); } - - private async void getTree() + private void getTree() { - UcLoading _loading = new UcLoading(); + toolTime.Text = "鐧诲綍鏃堕棿" + LoginInfoModel.CurrentUser.LoginTime; var _obj = new { @@ -155,11 +152,11 @@ }; try { - var strJson = await UtilityHelper.HttpPostAsync("", + var strJson = UtilityHelper.HttpPost("", "User/GetUserLoginInfo", JsonConvert.SerializeObject(_obj)); + DevExpress.Utils.WaitDialogForm wdf = new DevExpress.Utils.WaitDialogForm("鎷煎懡鍔犺浇涓紝璇风◢鍚�......", "鍙嬫儏鎻愮ず"); var _job = JObject.Parse(strJson); var rtnCode = _job["rtnCode"].ToString(); - _loading.Stop(); if (int.Parse(rtnCode) > 0) { acrd.Clear(); @@ -176,6 +173,7 @@ int gdx = 0, idx = 0; foreach (var _dy in drGrp) { + wdf.SetCaption("鍔犺浇杩涘害:" + _dy["name"].ToString()); var _grp = acrd.AddGroup(); _grp.ImageOptions.Image = UtilityHelper.GetImgFromResource( @@ -197,6 +195,7 @@ _itm.Name = _dy2["guid"].ToString(); _itm.Style = ElementStyle.Item; _itm.Text = _dy2["name"].ToString(); + wdf.SetCaption("鍔犺浇杩涘害:" + _dy2["name"].ToString()); _itm.Appearance.Normal.Font = new Font("Tahoma", 10F); _itm.Tag = _dy2["formPath"].ToString(); //瀛樿矾寰勶紝绫诲悕 @@ -221,13 +220,15 @@ { MsgHelper.ShowError("鎻愮ず锛氬垵濮嬪寲澶辫触锛岃鑱旂郴绠$悊鍛橈紒"); } + wdf.SetCaption("鍔犺浇杩涘害锛�90/100锛�"); + wdf.Close(); } catch (Exception ex) { - _loading.Stop(); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } - + } /// <summary> @@ -357,7 +358,6 @@ return null; } - private int _userOut() { var _obj = new @@ -381,5 +381,23 @@ return -1; } } + private void GetOrg() + { + var pgq = new PageQueryModel(1, 999999, "FID", "asc", "", " and IS_STATUS=1"); + var json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json); + var rtn = UtilityHelper.ReturnToTablePage(strReturn); + var dt = rtn.rtnData.list; + repositoryItemCheckedComboBoxEdit1.DataSource = dt; + repositoryItemCheckedComboBoxEdit1.DisplayMember = "name"; + repositoryItemCheckedComboBoxEdit1.ValueMember = "fid"; + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } } } \ No newline at end of file -- Gitblit v1.9.3