From cbb5315301b1490b57497212256c5255e5eb7eb6 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期六, 01 十一月 2025 17:06:58 +0800
Subject: [PATCH] Merge branch 'master' of http://git.gs-mes.com:8080/r/~tjx/GsMesClient
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs | 389 +++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 306 insertions(+), 83 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
index 1ffc9cf..516e938 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -29,19 +30,22 @@
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
- // Gs.DevApp.ToolBox.DragResizeHelp.RegisterControl(this, this.panelControl3, splitContainerControl1.Panel1, label1);
+ toolBarMenu1.btnShouHouChkClick += ToolBarMenu1_btnShouHouChkClick;
+ toolBarMenu1.btnShouHouFchkClick += ToolBarMenu1_btnShouHouFchkClick;
+ toolBarMenu1.btnWjClick += ToolBarMenu1_btnWjClick;
+ this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "chkStatus", "", (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;
//璁剧疆鐢宠缁勭粐
@@ -61,16 +65,141 @@
var rtn = UtilityHelper.ReturnToTablePage(strReturn);
var dt = rtn.rtnData.list;
this.repositoryItemSearchLookUpEdit1.DataSource = dt;
+ // repositoryItemSearchLookUpEdit1.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
+ //Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView2);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
};
+
+ this.gvMx1.InitNewRow += (s, e) =>
+ {
+ string _orgId = txt_fapporgid.GetId();
+ string _orgName = txt_fapporgid.GetName();
+ if (string.IsNullOrEmpty(_orgId)) return;
+ gvMx1.SetFocusedRowCellValue("dcOrg", _orgName);
+ gvMx1.SetFocusedRowCellValue("dcOrgGuid", _orgId);
+ gvMx1.SetFocusedRowCellValue("drOrg", _orgName);
+ gvMx1.SetFocusedRowCellValue("drOrgGuid", _orgId);
+ gvMx1.SetFocusedRowCellValue("drHz", _orgName);
+ gvMx1.SetFocusedRowCellValue("drHzGuid", _orgId);
+ gvMx1.SetFocusedRowCellValue("dcHz", _orgName);
+ gvMx1.SetFocusedRowCellValue("dcHzGuid", _orgId);
+ };
+
+ #region 2025-08-27 澶嶅埗beg
+ btnCopyXls.Click += (s, e) =>
+ {
+ string kcZz = txt_fapporgid.GetId();
+ if (string.IsNullOrEmpty(kcZz))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨鐢宠缁勭粐鍚庢墠鑳戒娇鐢ㄥ鍒跺姛鑳斤紒");
+ txt_fapporgid.Focus();
+ return;
+ }
+ string filePath = AppContext.BaseDirectory + "xlsCopy.xls";
+ if (File.Exists(filePath))
+ {
+ var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.鐗╂枡璋冩嫧.ToString());
+ frm.UpdateParent += (ss, ee) =>
+ {
+ try
+ {
+ string _orgId = txt_fapporgid.GetId();
+ string _orgName = txt_fapporgid.GetName();
+ var lst = ee.DynamicList;
+ DataTable _Table = (DataTable)gcMx1.DataSource;
+ foreach (dynamic dym in lst)
+ {
+ DataRow _row = _Table.NewRow();
+ _row["itemNo"] = dym.itemNo;
+ _row["itemName"] = dym.itemName;
+ _row["itemModel"] = dym.itemModel;
+ _row["itemUnit"] = dym.dwName;
+ _row["itemId"] = dym.itemId;
+ _row["shNum"] = dym.sl;
+ _row["remark"] = dym.bz;
+ //榛樿浠撳簱鍜屼粨搴撴暟閲�
+ _row["dcCk"] = dym.depotName;
+ _row["dcCkGuid"] = dym.depotId;
+ _row["kcQty"] = dym.kcQty;
+ if (!string.IsNullOrEmpty(_orgId))
+ {
+ _row["dcOrg"] = _orgName;
+ _row["dcOrgGuid"] = _orgId;
+ _row["drOrg"] = _orgName;
+ _row["drOrgGuid"] = _orgId;
+ _row["drHz"] = _orgName;
+ _row["drHzGuid"] = _orgId;
+ _row["dcHz"] = _orgName;
+ _row["dcHzGuid"] = _orgId;
+ }
+ _Table.Rows.Add(_row);
+ }
+ gcMx1.BindingContext = new BindingContext();
+ gcMx1.DataSource = _Table;
+ gcMx1.ForceInitialize();
+ gvMx1.CloseEditor();
+ gvMx1.PostEditor();
+ gvMx1.UpdateCurrentRow();
+ gvMx1.BestFitColumns();
+ }
+ catch (Exception ex)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
+ }
+ };
+ frm.ShowDialog();
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("鎵句笉鍒皒lsCopy.xls鏂囦欢锛岃鑱旂郴绠$悊鍛橈紒");
+ }
+ };
+ #endregion
+
+ #region 2025-10-10 鍚戜笅澶嶅埗beg
+ btnDown.Click += (s, e) =>
+ {
+ // 鑾峰彇褰撳墠閫変腑琛岀殑琛屽彿
+ int focusedRowHandle = gvMx1.FocusedRowHandle;
+ if (focusedRowHandle < 0) return;
+
+ // 鑾峰彇褰撳墠琛岀殑鏃堕暱
+ DataRow currentRow = gvMx1.GetDataRow(focusedRowHandle);
+ if (currentRow == null) return;
+ var hourValue = currentRow["drCkGuid"];
+ var hourValue2 = currentRow["drCk"];
+ if (hourValue == null || string.IsNullOrEmpty(hourValue.ToString())) {
+ MsgHelper.ShowError("褰撳墠閫変腑鐨勮鏃犱粨搴擄紝澶嶅埗澶辫触锛�");
+ return;
+ }
+ if (hourValue2 == null) {
+ MsgHelper.ShowError("褰撳墠閫変腑鐨勮鏃犱粨搴擄紝澶嶅埗澶辫触锛�");
+ return;
+ }
+ // 鎵归噺璁剧疆涓嬮潰鎵�鏈夎鐨勬椂闀�
+ for (int i = focusedRowHandle + 1; i < gvMx1.DataRowCount; i++)
+ {
+ var row = gvMx1.GetDataRow(i);
+ if (row != null)
+ {
+ row["drCkGuid"] = hourValue;
+ row["drCk"] = hourValue2;
+ }
+ }
+ gvMx1.RefreshData();
+ };
+ #endregion
}
+
+
+
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);
}
@@ -93,7 +222,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();
}
@@ -127,7 +256,7 @@
{
string rowGuid = "", rowName = "";
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_fBillNo, gridView1, "fBillNo");
+ lbGuid, txt_fBillNo, gridView1, "FBillNo");
if (string.IsNullOrEmpty(rowGuid))
{
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -148,20 +277,20 @@
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);
}
-
}
/// <summary>
@@ -194,7 +323,7 @@
private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "billno");
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo");
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -203,14 +332,19 @@
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
- getModel(lbGuid.Text.Trim());
+ getModel(rowGuid);
}
else
{
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
- UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
+ UtilityHelper.ChangeEnableByControl(splitMx1.Panel1.Controls, true, gvList);
}
+ //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼渚涘簲鍟嗗拰缁勭粐srm,绂佺敤
+ txt_fapporgid.IsReadly = true;
+ txt_ftranstype.ReadOnly = true;
+ txt_fOwnerTypeIdHead.ReadOnly = true;
+ txt_fOwnerTypeInIdHead.ReadOnly = true;
}
/// <summary>
/// 鏂板浜嬩欢
@@ -223,8 +357,10 @@
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gridViews.Add(gvMx1);
- UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
+ UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+ //澧炲姞鏃讹紝榛樿缁勭粐
+ string deftOrg = UtilityHelper.GetFirstOrg(txt_fapporgid);
}
/// <summary>
@@ -250,28 +386,28 @@
//}
if (txt_fTransferDirect.SelectedIndex <= 0)
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冩嫧鏂瑰悜锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璋冩嫧鏂瑰悜锛�");
txt_fTransferDirect.Focus();
return;
}
if (string.IsNullOrEmpty(sqOrg))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鐢宠缁勭粐锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鐢宠缁勭粐锛�");
txt_fapporgid.Focus();
return;
}
- if (txt_fOwnerTypeIdHead.SelectedIndex <= 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨嚭璐т富绫诲瀷锛�");
- txt_fOwnerTypeIdHead.Focus();
- return;
- }
- if (txt_fOwnerTypeInIdHead.SelectedIndex <= 0)
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨叆璐т富绫诲瀷锛�");
- txt_fOwnerTypeInIdHead.Focus();
- return;
- }
+ //if (txt_fOwnerTypeIdHead.SelectedIndex <= 0)
+ //{
+ // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨嚭璐т富绫诲瀷锛�");
+ // txt_fOwnerTypeIdHead.Focus();
+ // return;
+ //}
+ //if (txt_fOwnerTypeInIdHead.SelectedIndex <= 0)
+ //{
+ // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨叆璐т富绫诲瀷锛�");
+ // txt_fOwnerTypeInIdHead.Focus();
+ // return;
+ //}
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
@@ -286,6 +422,7 @@
list = new List<dynamic>(),
};
gvMx1.CloseEditor();
+ gvMx1.PostEditor();
gvMx1.UpdateCurrentRow();
if (gvMx1.DataRowCount <= 0)
{
@@ -353,21 +490,24 @@
{
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_fBillNo.Text = _rtn.rtnData.outNo;
toolBarMenu1.isSetBtn = true;
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
- UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
+ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
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);
}
}
/// <summary>
@@ -390,7 +530,11 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and a.FAPPORGID in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -400,16 +544,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;//褰撳墠椤�
@@ -433,7 +577,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -450,7 +594,7 @@
lbGuid.Text = strGuid;
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
- UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
+ UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
JObject _job = JObject.Parse(strJson);
JArray array = new JArray();
foreach (var a in _job["rtnData"]["list"])
@@ -464,6 +608,7 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
}
else
{
@@ -471,15 +616,24 @@
}
}
else
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
-
+ /// <summary>
+ /// 瀹岀粨
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnWjClick(object sender, EventArgs e)
+ {
+ _toolCk(2);
+ }
/// <summary>
/// 瀹℃牳浜嬩欢
/// </summary>
@@ -500,7 +654,27 @@
{
_toolCk(0);
}
+ /// <summary>
+ /// 鍞悗瀹℃牳
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnShouHouChkClick(object sender, EventArgs e)
+ {
+ _toolCk(20);
+ }
+ /// <summary>
+ /// 鍞悗鍙嶅鏍�
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnShouHouFchkClick(object sender, EventArgs e)
+ {
+ _toolCk(21);
+ }
/// <summary>
/// 宸ュ叿鏉′簨浠�
/// </summary>
@@ -516,13 +690,23 @@
case 0:
strMsg = "鍙嶅鏍�";
break;
- };
+ case 2:
+ strMsg = "瀹岀粨";
+ break;
+ case 20:
+ strMsg = "鍞悗瀹℃牳";
+ break;
+ case 21:
+ strMsg = "鍞悗鍙嶅鏍�";
+ break;
+ }
+ ;
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "fBillNo");
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
@@ -538,24 +722,40 @@
_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);
+ gridView1.FocusedRowHandle = rowHandle;
+ if (_inFieldValue <= 1)
+ UtilityHelper.SetCheckIco(gridView1, "chkStatus", "FAPPROVEBY", "FAPPROVEDATE", picCheckBox, this, _inFieldValue.ToString());
}
- int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
- gridView1.FocusedRowHandle = rowHandle;
- UtilityHelper.SetCheckIco(gridView1, "chkStatus", "FAPPROVEBY", "FAPPROVEDATE", picCheckBox, this, _inFieldValue.ToString());
+ else
+ {
+ //娉ㄦ剰锛岃繖閲屽拰鍏跺畠椤甸潰鏈夌偣涓嶄竴鏍�
+ getPageList(this.pageBar1.CurrentPage);
+ int rowHandle = gridView1.LocateByValue("guid", rowGuid);
+ gridView1.FocusedRowHandle = rowHandle;
+ }
}
+ else
+ MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
-
}
+
+
+ /// <summary>
+ /// 閫夋嫨鐗╂枡
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e)
{
SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
@@ -565,10 +765,20 @@
gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString());
gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"].ToString());
gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
+ gvMx1.SetFocusedRowCellValue("dcCk", SelectedDataRow["depotName"]);
+ gvMx1.SetFocusedRowCellValue("dcCkGuid", SelectedDataRow["depotId"]);
+ gvMx1.SetFocusedRowCellValue("kcQty", SelectedDataRow["kcQty"]);
gvMx1.CloseEditor();
+ gvMx1.PostEditor();
gvMx1.UpdateCurrentRow();
+ gvMx1.BestFitColumns();
}
+ /// <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;
@@ -598,13 +808,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);
}
}
}
@@ -642,18 +854,21 @@
return;
var dr = gvMx1.GetDataRow(rowhandle);
var strOrgGuid = dr["dcOrgGuid"].ToString();
+ var strItemId = dr["itemId"].ToString();
if (string.IsNullOrEmpty(strOrgGuid))
{
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭缁勭粐锛�");
+ MsgHelper.ShowError("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭缁勭粐锛�");
return;
- };
- SelectCk frm = new SelectCk(strOrgGuid);
+ }
+ ;
+ SelectCk frm = new SelectCk(strOrgGuid, strItemId);
frm.UpdateParent += (ss, ee) =>
{
var lst = new List<dynamic>();
lst = ee.DynamicList;
gvMx1.SetFocusedRowCellValue("dcCk", lst[0].name);
gvMx1.SetFocusedRowCellValue("dcCkGuid", lst[0].guid);
+ gvMx1.BestFitColumns();
};
frm.ShowDialog();
}
@@ -670,15 +885,17 @@
var dr = gvMx1.GetDataRow(rowhandle);
if (dr["dcCkGuid"] == null)
{
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭浠撳簱锛�");
+ MsgHelper.ShowError("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭浠撳簱锛�");
return;
- };
+ }
+ ;
var strCkGuid = dr["dcCkGuid"].ToString();
if (string.IsNullOrEmpty(strCkGuid))
{
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭浠撳簱锛�");
+ MsgHelper.ShowError("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭浠撳簱锛�");
return;
- };
+ }
+ ;
SelectCw frm = new SelectCw(strCkGuid);
frm.UpdateParent += (ss, ee) =>
{
@@ -722,18 +939,21 @@
return;
var dr = gvMx1.GetDataRow(rowhandle);
var strOrgGuid = dr["drOrgGuid"].ToString();
+ var strItemId = dr["itemId"].ToString();
if (string.IsNullOrEmpty(strOrgGuid))
{
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨叆缁勭粐锛�");
+ MsgHelper.ShowError("鎻愮ず锛氳鍏堥�夋嫨璋冨叆缁勭粐锛�");
return;
- };
- SelectCk frm = new SelectCk(strOrgGuid);
+ }
+ ;
+ SelectCk frm = new SelectCk(strOrgGuid, strItemId);
frm.UpdateParent += (ss, ee) =>
{
var lst = new List<dynamic>();
lst = ee.DynamicList;
gvMx1.SetFocusedRowCellValue("drCk", lst[0].name);
gvMx1.SetFocusedRowCellValue("drCkGuid", lst[0].guid);
+ gvMx1.BestFitColumns();
};
frm.ShowDialog();
}
@@ -750,15 +970,17 @@
var dr = gvMx1.GetDataRow(rowhandle);
if (dr["drCkGuid"] == null)
{
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨叆浠撳簱锛�");
+ MsgHelper.ShowError("鎻愮ず锛氳鍏堥�夋嫨璋冨叆浠撳簱锛�");
return;
- };
+ }
+ ;
var strCkGuid = dr["drCkGuid"].ToString();
if (string.IsNullOrEmpty(strCkGuid))
{
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨叆浠撳簱锛�");
+ MsgHelper.ShowError("鎻愮ず锛氳鍏堥�夋嫨璋冨叆浠撳簱锛�");
return;
- };
+ }
+ ;
SelectCw frm = new SelectCw(strCkGuid);
frm.UpdateParent += (ss, ee) =>
{
@@ -778,14 +1000,14 @@
private void rptDrHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
var rowhandle = gvMx1.FocusedRowHandle;
- if (rowhandle < 0)
- return;
+ //if (rowhandle < 0)
+ // return;
int _drhzlx = txt_fOwnerTypeInIdHead.SelectedIndex;
- if (_drhzlx <= 0)
- {
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨叆璐т富绫诲瀷锛�");
- return;
- }
+ //if (_drhzlx <= 0)
+ //{
+ // MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨叆璐т富绫诲瀷锛�");
+ // return;
+ //}
SelectHz frm = new SelectHz("", _drhzlx.ToString());
frm.UpdateParent += (ss, ee) =>
{
@@ -793,6 +1015,7 @@
lst = ee.DynamicList;
gvMx1.SetFocusedRowCellValue("drHz", lst[0].name);
gvMx1.SetFocusedRowCellValue("drHzGuid", lst[0].guid);
+
};
frm.ShowDialog();
}
@@ -805,14 +1028,14 @@
private void rptDcHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
{
var rowhandle = gvMx1.FocusedRowHandle;
- if (rowhandle < 0)
- return;
+ //if (rowhandle < 0)
+ // return;
int _drhzlx = txt_fOwnerTypeIdHead.SelectedIndex;
- if (_drhzlx <= 0)
- {
- MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭璐т富绫诲瀷锛�");
- return;
- }
+ //if (_drhzlx <= 0)
+ //{
+ // MsgHelper.Warning("鎻愮ず锛氳鍏堥�夋嫨璋冨嚭璐т富绫诲瀷锛�");
+ // return;
+ //}
SelectHz frm = new SelectHz("", _drhzlx.ToString());
frm.UpdateParent += (ss, ee) =>
{
--
Gitblit v1.9.3