From acf9d7b001514b3586166cbd0609e9d836ada792 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期三, 23 七月 2025 16:24:49 +0800 Subject: [PATCH] bug --- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 95 +++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 83 insertions(+), 12 deletions(-) diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index 8413ea2..67b3d33 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -55,10 +55,10 @@ /// <summary> /// http璇锋眰 /// </summary> - /// <param name="url"></param> - /// <param name="meth"></param> - /// <param name="param"></param> - /// <param name="isLoading"></param> + /// <param name="url">api鏍瑰湴鍧�</param> + /// <param name="meth">鏂规硶鍚嶇О</param> + /// <param name="param">json鍙傛暟</param> + /// <param name="isLoading">鏄惁loading</param> /// <returns></returns> public static string HttpPost(string url, string meth, string param, bool isLoading = true) { @@ -163,6 +163,7 @@ gc.BindingContext = new BindingContext(); gc.DataSource = dt; gc.ForceInitialize(); + gv.BestFitColumns(); } /// <summary> @@ -450,6 +451,15 @@ break; } txt.Enabled = !isEdt; + continue; + } + //澶氶�� + if (colType is RadioGroup) + { + var txt = colType as RadioGroup; + if (txt != null) + txt.SelectedIndex =int.Parse( strVal); + txt.ReadOnly = isEdt; continue; } //鏃堕棿 @@ -746,6 +756,15 @@ txt.ReadOnly = isEdt; continue; } + //澶氶�� + if (ctrl is RadioGroup) + { + var txt = ctrl as RadioGroup; + if (txt != null) + txt.SelectedIndex = 0; + txt.ReadOnly = isEdt; + continue; + } //鏃堕棿 if (ctrl is DateTimePicker) { @@ -1003,6 +1022,13 @@ if (ctrl is NumericUpDown) { var txt = ctrl as NumericUpDown; + txt.ReadOnly = isEdt; + continue; + } + //澶氶�� + if (ctrl is RadioGroup) + { + var txt = ctrl as RadioGroup; txt.ReadOnly = isEdt; continue; } @@ -1707,7 +1733,6 @@ } }; gridView1.OptionsView.ColumnAutoWidth = false;//鑷姩璋冩暣鍒楀 - if (isPostSearch == true) { gridView1.OptionsView.ShowGroupPanel = false; @@ -1724,7 +1749,6 @@ //鏄惁鏄剧ず搴曢儴鐨勮繃婊ゆ潯 // gridView1.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; } - // gridView1.Appearance.HeaderPanel.ForeColor = DevExpress.LookAndFeel.DXSkinColors.ForeColors.ControlText; foreach (GridColumn column in gridView1.Columns) { @@ -1750,7 +1774,6 @@ column.OptionsFilter.AllowAutoFilter = false; } } - gridView1.IndicatorWidth = 60; gridView1.CustomDrawRowIndicator += (s, e) => { @@ -2173,8 +2196,6 @@ txt_iCount_1.ReadOnly = true; } - - #region 鑷畾涔夎繘搴︽潯鍒� /// <summary> @@ -2269,7 +2290,6 @@ // private GridColumn checkBoxColumn = null; public static void CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e) { - Rectangle checkBoxColumnHeaderRect = new Rectangle(51, 1, 37, 57); if (e.Column != null && e.Column.AbsoluteIndex == 0) { @@ -2313,10 +2333,26 @@ else { checkBoxColumn.Tag = "1"; + /********2025-07-23淇ˉ杩囨护bug 鏁呮敞閲� beg ************/ + //foreach (DataRow row in _Table.Rows) + //{ + // row["chkInt"] = true; + //} + /********2025-07-23淇ˉ杩囨护bug 鏁呮敞閲� end ************/ + /********2025-07-23淇ˉ杩囨护bug beg ************/ + System.Collections.IList ftRow = gridView1.DataController.GetAllFilteredAndSortedRows(); + System.Collections.ArrayList ftAry = new System.Collections.ArrayList(); + foreach (System.Data.DataRowView _ft in ftRow) + { + string guid = _ft["guid"].ToString(); + ftAry.Add(guid); + } foreach (DataRow row in _Table.Rows) { - row["chkInt"] = true; + if (ftAry.Contains(row["guid"].ToString())) + row["chkInt"] = true; } + /********2025-07-23淇ˉ杩囨护bug end ************/ } gcMain.BindingContext = new BindingContext(); gcMain.DataSource = _Table; @@ -2329,6 +2365,31 @@ } } #endregion + + //璇诲彇榛樿缁勭粐 + public static string GetFirstOrg(UserControl.UcLookOrg txt_erpSczz) + { + string userGuid = LoginInfoModel.CurrentUser.LoginUserGuid; + var pgq = new PageQueryModel(1, 999999, "FID", "asc", userGuid, " and IS_STATUS=1"); + var json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json); + var _obj = UtilityHelper.ReturnToDynamic(strReturn); + string _extendText = _obj.rtnData.extendText; + string[] _dftOrg = _extendText.Split(','); + if (_dftOrg.Length > 0) + { + txt_erpSczz.SetIdOrCode(_dftOrg[0].Trim()); + return _dftOrg[0].Trim(); + } + return ""; + } + catch (Exception ex) + { + return ""; + } + } } /// <summary> @@ -2408,6 +2469,16 @@ iqc, ipqc宸℃, ipqc棣栨, - fqc + fqc, + 鐢熶骇閫�鏂欏叆搴撴, + 鍏跺畠鍏ュ簱妫�, + 閿�鍞��璐у叆搴撴, + 瓒呮湡妫�, + 濮斿閫�鏂欏叆搴撴, + cqcjyes,//閲嶆鏂规 + cqcjno,//閲嶆鏂规 } + + + } \ No newline at end of file -- Gitblit v1.9.3