From ba0c935cafc358cd8dc85b002ce8befba22c04a1 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期一, 11 八月 2025 08:42:59 +0800 Subject: [PATCH] bug --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs | 47 +++++++++++++++-------------------------------- 1 files changed, 15 insertions(+), 32 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs index d22a86a..2116979 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs @@ -100,6 +100,10 @@ gcMx1.DataSource = _oldTable; gcMx1.ForceInitialize(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); + gvMx1.CloseEditor(); + gvMx1.PostEditor(); + gvMx1.UpdateCurrentRow(); + gridView1.BestFitColumns(); } catch (Exception ex) { @@ -147,7 +151,7 @@ this.ucBtnPrint1.btnAllClick += (s, e) => { string rowGuid = lbMxGuid.Text.Trim(); - SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "閲囪喘鍏ュ簱"); + SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "鐢熶骇閫�鏂�"); string strCodeList = ""; string strAction = ""; frm.UpdateParent += (ss, ee) => @@ -441,6 +445,12 @@ txt_tbl005.Focus(); return; } + if ((txt_tbl005.Text.Trim()=="鑹搧閫�鏂�") && txt_chkOut.Checked) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("鑹搧閫�鏂欎笉鑳借嚜鍔ㄧ敓鎴愯ˉ鏂欏崟锛岃妫�鏌ワ紒"); + txt_tbl005.Focus(); + return; + } var _obj = new { guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓 @@ -448,6 +458,7 @@ yy = txt_tbl005.Text.Trim(),//鍘熷洜 inDaaGuid = workId,//宸ュ崟 inOrgId = orgId,//缁勭粐 + chkOut = (txt_chkOut.Checked ? "1" : "0"), list = new List<dynamic>(), }; gvMx1.CloseEditor(); @@ -584,14 +595,6 @@ gvList.Add(gvMx2); UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); _ucGg = ""; - if (txt_tbl005.Text == "鑹搧閫�鏂�") - { - this.split99.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2; - } - else - { - this.split99.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Both; - } JObject _job = JObject.Parse(strJson); JArray array = new JArray(); foreach (var a in _job["rtnData"]["list"]) @@ -720,32 +723,11 @@ } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) return; - - //濡傛灉鏄鏍革紝璇㈤棶瑕佷笉瑕佺敓鎴愯ˉ鏂檅eg - string txt_chkOut = "0"; - if (_inFieldValue == 1 && txt_tbl005.Text.Trim() != "鑹搧閫�鏂�") - { - var frm = new Frm_MesItemTblShow(); - frm.UpdateParent += (ss, ee) => - { - try - { - txt_chkOut = ee.StringSingle; - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - }; - frm.ShowDialog(); - } - //濡傛灉鏄鏍革紝璇㈤棶瑕佷笉瑕佺敓鎴愯ˉ鏂檈nd - var _obj = new { guid = rowGuid, inFieldValue = _inFieldValue, - chkOut = txt_chkOut + }; try { @@ -797,7 +779,6 @@ stringBuilder.Append(dym.dicTxt); } gvMx1.SetFocusedRowCellValue("tld015", stringBuilder.ToString()); - // this.TextTxt = ; }; frm.ShowDialog(); } @@ -808,6 +789,8 @@ { DataRow row = gvMx1.GetDataRow(e.FocusedRowHandle); lbMxGuid.Text = row["tlid"].ToString(); + if (string.IsNullOrEmpty(lbMxGuid.Text)) + return; toolBarMenu1.guidKey = row["tlid"].ToString(); txtWlid.Text = row["tld002"].ToString(); txtWlgg.Text = row["tld004"].ToString(); -- Gitblit v1.9.3