From 78ded57d2cf4fd2cc6ae731a625a4d6528bede49 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 01 八月 2025 11:20:13 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 313 +++++++++++++++++++++++++++++----------------------
1 files changed, 177 insertions(+), 136 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
index b91df66..8ff0765 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -1,4 +1,5 @@
using DevExpress.XtraEditors;
+using Gs.DevApp.DevFrm.Work;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -30,25 +31,29 @@
this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
- toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
- toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
- toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, picCheckBox, this, "isSh", "", (value) =>
+ this.toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+ this.toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
+ this.toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ this.toolBarMenu1.btnCaiGouChkClick += ToolBarMenu1_btnCaiGouChkClick;
+ this.toolBarMenu1.btnCaiGouFchkClick += ToolBarMenu1_btnCaiGouFchkClick;
+ this.toolBarMenu1.btnCaiWuChkClick += ToolBarMenu1_btnCaiWuChkClick;
+ this.toolBarMenu1.btnCaiWuFchkClick += ToolBarMenu1_btnCaiWuFchkClick;
+ 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.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) =>
{
@@ -58,7 +63,7 @@
ucLookHuoZhu1.OrgId = _orgId;
ucLookHuoZhu1.HzId = _ucHz;
ucLookHuoZhu1.SetHzLx(_ucHzlx);
- txt_qt009.getSuppler(_orgId,_ucBm);
+ txt_qt009.getSuppler(_orgId, _ucBm);
txt_qt018.getSuppler(_orgId, _ucGys);
txt_qt008.getSuppler(_orgId, _ucCk);
System.Text.StringBuilder sbWhere = new System.Text.StringBuilder();
@@ -75,51 +80,28 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
};
-
- gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
- this.ucBtnPrint1.btnDesignClick += (s, e) =>
+ //閫夋嫨婧愬崟鏄庣粏
+ txt_qt035.ButtonClick += (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()))
+ string strSrmNo = "";
+ SelectDaa frm = new SelectDaa();
+ frm.UpdateParent += (ss, ee) =>
{
- 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()
- + "}";
+ var lst = new List<dynamic>();
+ lst = ee.DynamicList;
+ strSrmNo = lst[0].guid;
+ txt_qt035.Text = strSrmNo;
+ };
+ frm.ShowDialog();
};
}
+
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);
}
@@ -156,7 +138,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();
}
@@ -192,7 +174,7 @@
lbGuid, txt_qtck, gridView1, "qtck");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -210,17 +192,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);
}
}
@@ -258,7 +242,7 @@
lbGuid, txt_qtck, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -271,9 +255,12 @@
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
gvList.Add(gvMx2);
- UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
+ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
ucLookHuoZhu1.Enabled = true;
}
+ //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼
+ txt_qt022.IsReadly = true;
+ ucLookHuoZhu1.Enabled = false;
}
/// <summary>
/// 鏂板浜嬩欢
@@ -287,10 +274,12 @@
List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gridViews.Add(gvMx1);
gridViews.Add(gvMx2);
- UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
+ 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_qt022);
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -303,7 +292,7 @@
string kcZz = txt_qt022.GetId();//搴撳瓨缁勭粐
string kcBm = txt_qt009.GetId();//搴撳瓨閮ㄩ棬
string kcGys = txt_qt018.GetId();//搴撳瓨渚涘簲鍟�
- string djLx = txt_qt003.Text.Trim();//鍗曟嵁绫诲瀷
+ string djLx = txt_qt003.TextTxt.Trim();//鍗曟嵁绫诲瀷
string kcfx = txt_qt019.Text.Trim();//搴撳瓨鏂瑰悜
string inHzlx = ucLookHuoZhu1.GetHzLx();//璐т富绫诲瀷
string inHz = ucLookHuoZhu1.GetHzId();//璐т富
@@ -311,38 +300,44 @@
string kcCk = txt_qt008.GetId();//浠撳簱
if (string.IsNullOrEmpty(kcZz))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨缁勭粐锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨搴撳瓨缁勭粐锛�");
txt_qt022.Focus();
return;
}
if (string.IsNullOrEmpty(inHzlx))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富绫诲瀷锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璐т富绫诲瀷锛�");
return;
}
if (string.IsNullOrEmpty(inHz))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璐т富锛�");
return;
}
- if (txt_qt003.SelectedIndex < 0)
+ if (txt_qt003.TextTxt.Length < 0)
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
txt_qt003.Focus();
return;
}
if (txt_qt019.SelectedIndex <= 0)
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨鏂瑰悜锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨搴撳瓨鏂瑰悜锛�");
txt_qt019.Focus();
return;
}
- if (string.IsNullOrEmpty(kcCk))
+ if (string.IsNullOrEmpty(kcBm) && string.IsNullOrEmpty(kcGys))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍙戞枡浠撳簱锛�");
- txt_qt008.Focus();
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("閮ㄩ棬鎴栦緵搴斿晢蹇呴』閫変竴涓紒");
+ txt_qt009.Focus();
return;
}
+ //if (string.IsNullOrEmpty(kcCk))
+ //{
+ // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀舵枡浠撳簱锛�");
+ // txt_qt008.Focus();
+ // return;
+ //}
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
@@ -355,6 +350,7 @@
kcfx = kcfx,//搴撳瓨鏂瑰悜
hzlx = inHzlx,//璐т富绫诲瀷
inHz = inHz,//璐т富
+ inSource = txt_qt035.EditValue,//宸ュ崟鍙�
list = new List<dynamic>(),
};
gvMx1.CloseEditor();
@@ -382,6 +378,7 @@
ItemId = (row["itemId"].ToString()),
Sqsl = (row["qd007"].ToString()),
Bz = (row["qd010"].ToString()),
+ Bllb = (row["qd012"].ToString()),
});
}
}
@@ -389,23 +386,26 @@
{
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;
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.panel1.Controls, false, gvList);
+ 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);
}
}
@@ -416,7 +416,7 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -426,16 +426,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;//褰撳墠椤�
@@ -451,14 +451,19 @@
ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
+ /// <summary>
+ /// 璇诲彇瀹炰綋
+ /// </summary>
+ /// <param name="strGuid"></param>
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
@@ -481,8 +486,8 @@
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
gvList.Add(gvMx2);
- UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
- _ucGys ="";
+ UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
+ _ucGys = "";
_ucBm = "";
_ucCk = "";
_ucHzlx = "";
@@ -501,6 +506,7 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
}
else
{
@@ -518,6 +524,7 @@
gcMx2.DataSource = dt2;
gcMx2.ForceInitialize();
gvMx2.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2);
}
else
{
@@ -525,11 +532,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);
}
}
@@ -542,8 +549,15 @@
gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]);
gvMx1.SetFocusedRowCellValue("kcDw", SelectedDataRow["dwName"]);
gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"]);
+ gvMx1.CloseEditor();
+ gvMx1.PostEditor();
+ gvMx1.UpdateCurrentRow();
}
-
+ /// <summary>
+ /// 绉诲嚭鏄庣粏
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
var rowhandle = gvMx1.FocusedRowHandle;
@@ -573,13 +587,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);
}
}
}
@@ -604,7 +620,46 @@
{
_toolCk(0);
}
+ /// <summary>
+ /// 璐㈠姟瀹℃牳
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnCaiWuChkClick(object sender, EventArgs e)
+ {
+ _toolCk(30);
+ }
+ /// <summary>
+ /// 璐㈠姟鍙嶅鏍�
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnCaiWuFchkClick(object sender, EventArgs e)
+ {
+ _toolCk(31);
+ }
+ /// <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>
@@ -620,14 +675,27 @@
case 0:
strMsg = "鍙嶅鏍�";
break;
- };
+ case 30:
+ strMsg = "璐㈠姟瀹℃牳";
+ break;
+ case 31:
+ 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");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
@@ -643,77 +711,50 @@
_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);
+ //int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+ //gridView1.FocusedRowHandle = rowHandle;
+ //UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, this, _inFieldValue.ToString());
+ //娉ㄦ剰锛岃繖閲屽拰鍏跺畠椤甸潰鏈夌偣涓嶄竴鏍�
+ getPageList(this.pageBar1.CurrentPage);
+ int rowHandle = gridView1.LocateByValue("guid", rowGuid);
gridView1.FocusedRowHandle = rowHandle;
- Form parentForm = this.FindForm();
- UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, parentForm, _inFieldValue.ToString());
}
+ else
+ MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
- private void GvMx1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
+ private void rptBl_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs 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;
+ var rowhandle = gvMx1.FocusedRowHandle;
if (rowhandle < 0)
return;
- if (e.Button.Index == 0)
+ UcDictionarySelect frm = new UcDictionarySelect("寮傚父鎻忚堪", " a.s_type='QC寮傚父鎻忚堪' and a.pid<>'00000000-0000-0000-0000-000000000000'");
+ frm.UpdateParent += (ss, ee) =>
{
- var dr = gvMx2.GetDataRow(rowhandle);
- var mxGuid = dr["guid"].ToString();
- if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
- return;
- var _obj = new
+ System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
+ var lst = ee.DynamicList;
+ foreach (dynamic dym in lst)
{
- 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);
+ if (stringBuilder.Length > 0)
+ stringBuilder.Append("|");
+ stringBuilder.Append(dym.dicTxt);
}
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
- }
+ gvMx1.SetFocusedRowCellValue("qd012", stringBuilder.ToString());
+ // this.TextTxt = ;
+ };
+ frm.ShowDialog();
}
}
}
\ No newline at end of file
--
Gitblit v1.9.3