From dd0af4a5532c251fd655024ba475f72eaf9c93a0 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期一, 18 八月 2025 16:20:10 +0800 Subject: [PATCH] 汇总 --- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs | 310 ++++++++++++++++++-------------------------------- 1 files changed, 113 insertions(+), 197 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs index 98d961d..8d78699 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesShouTuo.cs @@ -1,4 +1,6 @@ using DevExpress.XtraEditors; +using DevExpress.XtraRichEdit.Model; +using Gs.DevApp.DevFrm.Rpt; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; @@ -16,11 +18,8 @@ { string _webServiceName = "MesShouTuoManager/"; List<FilterEntity> _filterList = new List<FilterEntity>(); - string _ucGys = "";//渚涘簲鍟� - string _ucBm = "";//棰嗘枡閮ㄩ棬 - string _ucCk = "";//鍙戞枡浠撳簱 - string _ucHzlx = "";//璐т富绫诲瀷 - string _ucHz = "";//璐т富 + string _ucCk = "";//浠撳簱 + string _ucKh = "";//瀹㈡埛 public Frm_MesShouTuo() { InitializeComponent(); @@ -34,35 +33,33 @@ toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; + toolBarMenu1.btnCaiGouChkClick += ToolBarMenu1_btnCaiGouChkClick; + toolBarMenu1.btnCaiGouFchkClick += ToolBarMenu1_btnCaiGouFchkClick; this.toolBarMenu1.getXmlConfig(); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isSh", "", (value) => + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isCheck", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); - }); + }, tips); Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => { getModel(value); }, (value) => { getPageList(this.pageBar1.CurrentPage); - }); + }, lbGuid); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; - //閫夋嫨搴撳瓨缁勭粐锛堝彉鏄庣粏涓殑鐗╂枡鍜屽彉璐т富锛� - this.txt_qt022.EditChanged += (s, e) => + this.txt_fStockOrgId.EditChanged += (s, e) => { - string _orgId = txt_qt022.GetId(); + string _orgId = txt_fStockOrgId.GetId(); if (string.IsNullOrEmpty(_orgId)) return; - ucLookHuoZhu1.OrgId = _orgId; - ucLookHuoZhu1.HzId = _ucHz; - ucLookHuoZhu1.SetHzLx(_ucHzlx); - txt_qt009.getSuppler(_orgId, _ucBm); - txt_qt018.getSuppler(_orgId, _ucGys); - txt_qt008.getSuppler(_orgId, _ucCk); + txt_fCustId.getSuppler(_orgId, _ucKh); + //2025-08-11鍔犱笂鍙兘鏄唬绠′粨 + txt_fStockId.getSuppler(_orgId, _ucCk, " and a.depot_id in(select [浠撳簱Id] from [dbo].[浠撳簱灞炴� where [鏄惁浠g鑹搧浠揮=1 )"); System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(); sbWhere.Append(" and a.FSubsidiary ='" + _orgId + "'"); var _obj = new PageQueryModel(1, 999999, "item_no", "asc", "", sbWhere.ToString(), ""); @@ -77,50 +74,13 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } - }; - gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; - this.ucBtnPrint1.btnDesignClick += (s, e) => - { - ucBtnPrint1.rptParameter = "rpt_Qtrk{}"; - }; - this.ucBtnPrint1.btnReportClick += (s, e) => - { - ucBtnPrint1.guidKey = ""; - string rowGuid = lbMxGuid.Text.Trim(); - ucBtnPrint1.guidKey = rowGuid; - if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�"); - txt_iCount_1.Focus(); - this.ucBtnPrint1.rptParameter = "return false"; - return; - } - if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�"); - txt_psnQty_1.Focus(); - this.ucBtnPrint1.rptParameter = "return false"; - return; - } - if (lbMxGuid.Text.Trim().Length < 10) - { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�"); - this.ucBtnPrint1.rptParameter = "return false"; - return; - } - this.ucBtnPrint1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim() - + "," + "" - + "," + "" - + "," + txt_iCount_1.Text.Trim() - + "," + txt_psnQty_1.Text.Trim() - + "}"; }; } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } @@ -134,7 +94,7 @@ toolBarMenu1.guidKey = ""; string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_qtck, gridView1); + lbGuid, txt_billNo, gridView1); toolBarMenu1.guidKey = rowGuid; } @@ -157,7 +117,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(); } @@ -190,10 +150,10 @@ { string rowGuid = "", rowName = ""; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_qtck, gridView1, "qtck"); + lbGuid, txt_billNo, gridView1, "billNo"); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) @@ -211,17 +171,19 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); if (xtraTabControl1.SelectedTabPageIndex == 0) { } else Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); getPageList(this.pageBar1.CurrentPage); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -256,10 +218,10 @@ { string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_qtck, gridView1); + lbGuid, txt_billNo, gridView1); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); @@ -273,8 +235,10 @@ gvList.Add(gvMx1); gvList.Add(gvMx2); UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); - ucLookHuoZhu1.Enabled = true; } + //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼 + txt_fStockOrgId.IsReadly = true; + txt_fCustId.IsReadly = true; } /// <summary> /// 鏂板浜嬩欢 @@ -291,7 +255,8 @@ UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); - ucLookHuoZhu1.Enabled = true; + //澧炲姞鏃讹紝榛樿缁勭粐 + string deftOrg = UtilityHelper.GetFirstOrg(txt_fStockOrgId); } /// <summary> /// 淇濆瓨浜嬩欢 @@ -301,64 +266,39 @@ private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) { toolBarMenu1.isSetBtn = false; - string kcZz = txt_qt022.GetId();//搴撳瓨缁勭粐 - string kcBm = txt_qt009.GetId();//搴撳瓨閮ㄩ棬 - string kcGys = txt_qt018.GetId();//搴撳瓨渚涘簲鍟� - string djLx = txt_qt003.Text.Trim();//鍗曟嵁绫诲瀷 - string kcfx = txt_qt019.Text.Trim();//搴撳瓨鏂瑰悜 - string inHzlx = ucLookHuoZhu1.GetHzLx();//璐т富绫诲瀷 - string inHz = ucLookHuoZhu1.GetHzId();//璐т富 - string inRkyy = txt_qt010.Text.Trim();//鍏ュ簱鍘熷洜 - string kcCk = txt_qt008.GetId();//浠撳簱 + string kcZz = txt_fStockOrgId.GetId();//搴撳瓨缁勭粐 + string inRkyy = txt_remark.Text.Trim();//鍘熷洜 + string kcCk = txt_fStockId.GetId();//浠撳簱 + string kh = txt_fCustId.GetId();//瀹㈡埛 if (string.IsNullOrEmpty(kcZz)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨缁勭粐锛�"); - txt_qt022.Focus(); - return; - } - if (string.IsNullOrEmpty(inHzlx)) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富绫诲瀷锛�"); - return; - } - if (string.IsNullOrEmpty(inHz)) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富锛�"); - return; - } - if (txt_qt003.SelectedIndex < 0) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�"); - txt_qt003.Focus(); - return; - } - if (txt_qt019.SelectedIndex <= 0) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨鏂瑰悜锛�"); - txt_qt019.Focus(); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨搴撳瓨缁勭粐锛�"); + txt_fStockOrgId.Focus(); return; } if (string.IsNullOrEmpty(kcCk)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀舵枡浠撳簱锛�"); - txt_qt008.Focus(); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鏀舵枡浠撳簱锛�"); + txt_fStockId.Focus(); + return; + } + if (string.IsNullOrEmpty(kh)) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨瀹㈡埛锛�"); + txt_fCustId.Focus(); return; } var _obj = new { guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓 kcZz = kcZz,//搴撳瓨缁勭粐 - kcBm = kcBm,//搴撳瓨閮ㄩ棬 - kcGys = kcGys,//搴撳瓨渚涘簲鍟� kcCk = kcCk,//搴撳瓨浠撳簱 inRkyy = inRkyy,//鍏ュ簱鍘熷洜 - djLx = djLx,//鍗曟嵁绫诲瀷 - kcfx = kcfx,//搴撳瓨鏂瑰悜 - hzlx = inHzlx,//璐т富绫诲瀷 - inHz = inHz,//璐т富 + kh = kh, list = new List<dynamic>(), }; gvMx1.CloseEditor(); + gvMx1.PostEditor(); gvMx1.UpdateCurrentRow(); if (gvMx1.DataRowCount <= 0) { @@ -371,7 +311,7 @@ if (row != null) { Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); - string _msl = row["qd007"].ToString(); + string _msl = row["Sqsl"].ToString(); if (string.IsNullOrEmpty(_msl)) { MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�"); @@ -381,8 +321,8 @@ { Guid = _guid, ItemId = (row["itemId"].ToString()), - Sqsl = (row["qd007"].ToString()), - Bz = (row["qd010"].ToString()), + Sqsl = (row["Sqsl"].ToString()), + Bz = (row["remark"].ToString()), }); } } @@ -390,23 +330,25 @@ { string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); if (_rtn.rtnCode > 0) { + ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); lbGuid.Text = _rtn.rtnData.outGuid; - txt_qtck.Text = _rtn.rtnData.outNo; + txt_billNo.Text = _rtn.rtnData.outNo; toolBarMenu1.isSetBtn = true; List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gvList.Add(gvMx1); gvList.Add(gvMx2); UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); - ucLookHuoZhu1.Enabled = false; toolBarMenu1.currentAction = ""; + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); } + else + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -417,8 +359,8 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); - PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString()); + gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); + PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "billNo", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try { @@ -433,7 +375,7 @@ { gcMain1.DataSource = dt; gcMain1.ForceInitialize(); - gridView1.BestFitColumns(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain1, gridView1); @@ -454,12 +396,13 @@ } private void getModel(string strGuid) { + gcMx1.DataSource = null; bool isEdit = false; if (toolBarMenu1.currentAction == "add") return; if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -473,22 +416,14 @@ if (_rtn.rtnCode > 0) { dynamic dy = _rtn.rtnData; - _ucGys = dy.qt018; - _ucBm = dy.qt009; - _ucCk = dy.qt008; - _ucHzlx = dy.qt023; - _ucHz = dy.qt024; + _ucCk = dy.fStockId; + _ucKh = dy.fCustId; lbGuid.Text = strGuid; List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gvList.Add(gvMx1); gvList.Add(gvMx2); UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); - _ucGys = ""; - _ucBm = ""; _ucCk = ""; - _ucHzlx = ""; - _ucHz = ""; - ucLookHuoZhu1.Enabled = isEdit; JObject _job = JObject.Parse(strJson); JArray array = new JArray(); foreach (var a in _job["rtnData"]["list"]) @@ -502,6 +437,7 @@ gcMx1.DataSource = dt; gcMx1.ForceInitialize(); gvMx1.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); } else { @@ -519,6 +455,7 @@ gcMx2.DataSource = dt2; gcMx2.ForceInitialize(); gvMx2.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2); } else { @@ -526,11 +463,11 @@ } } else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -538,11 +475,13 @@ { SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit; DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); - gvMx1.SetFocusedRowCellValue("qd002", SelectedDataRow["itemNo"]); - gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]); - gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]); + gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"]); + gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"]); + gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"]); gvMx1.SetFocusedRowCellValue("kcDw", SelectedDataRow["dwName"]); gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"]); + gvMx1.PostEditor(); + gvMx1.UpdateCurrentRow(); } private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) @@ -574,13 +513,15 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - if (_rtn.rtnCode > 0) getModel(lbGuid.Text); + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); + getModel(lbGuid.Text); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } @@ -605,7 +546,25 @@ { _toolCk(0); } + /// <summary> + /// 閲囪喘瀹℃牳 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnCaiGouChkClick(object sender, EventArgs e) + { + _toolCk(40); + } + /// <summary> + /// 閲囪喘鍙嶅鏍� + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnCaiGouFchkClick(object sender, EventArgs e) + { + _toolCk(41); + } /// <summary> /// 宸ュ叿鏉′簨浠� /// </summary> @@ -621,14 +580,21 @@ case 0: strMsg = "鍙嶅鏍�"; break; - }; + case 40: + strMsg = "閲囪喘瀹℃牳"; + break; + case 41: + strMsg = "閲囪喘鍙嶅鏍�"; + break; + } + ; toolBarMenu1.guidKey = ""; string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_qtck, gridView1, "qtck"); + lbGuid, txt_billNo, gridView1, "billNo"); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) @@ -644,75 +610,25 @@ _webServiceName + "EditModelSubmit", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { + MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString()); if (xtraTabControl1.SelectedTabPageIndex == 1) { getModel(lbGuid.Text.Trim()); } - int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); + //娉ㄦ剰锛岃繖閲屽拰鍏跺畠椤甸潰鏈夌偣涓嶄竴鏍� + getPageList(this.pageBar1.CurrentPage); + int rowHandle = gridView1.LocateByValue("guid", rowGuid); gridView1.FocusedRowHandle = rowHandle; - UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, this, _inFieldValue.ToString()); + } + else + MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString()); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } - } - private void GvMx1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) - { - if (e.FocusedRowHandle >= 0) - { - DataRow row = gvMx1.GetDataRow(e.FocusedRowHandle); - lbMxGuid.Text = row["guid"].ToString(); - ucBtnPrint1.guidKey = row["guid"].ToString(); - txtWlid.Text = row["qd002"].ToString(); - txtWlgg.Text = row["qd004"].ToString(); - txtWlmc.Text = row["qd003"].ToString(); - txtQuantity.Text = row["qd007"].ToString();//鐢宠鎬婚噺 - txtYdy.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺 - txtKdy.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺 - } - } - /// <summary> - /// 绉诲嚭鏉$爜 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) - { - var rowhandle = gvMx2.FocusedRowHandle; - if (rowhandle < 0) - return; - if (e.Button.Index == 0) - { - var dr = gvMx2.GetDataRow(rowhandle); - var mxGuid = dr["guid"].ToString(); - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵")) - return; - var _obj = new - { - mxGuid = mxGuid, - inType = "dhtm" - }; - try - { - var strJson = UtilityHelper.HttpPost("", - _webServiceName + "DeleteBarcode", - JsonConvert.SerializeObject(_obj)); - var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) - { - if (_rtn.rtnCode > 0) getModel(lbGuid.Text); - } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } -- Gitblit v1.9.3