ÎļþÃû´Ó DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemOut_SCLL.cs ÐÞ¸Ä |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | depot_id.getSuppler(""); |
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå»äºä»¶ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) |
| | | { |
| | | string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); |
| | | if (!string.IsNullOrEmpty(rowGuid)) |
| | | getModel(rowGuid, false, 999); |
| | | } |
| | | /// <summary> |
| | | /// å页äºä»¶ |
| | | /// </summary> |
| | |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// å®¡æ ¸äºä»¶ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk(1); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå®¡æ ¸ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å®¡æ ¸äºä»¶ |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | _toolCk(0); |
| | | } |
| | | /// <summary> |
| | | /// åæ¶äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | } |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | } |
| | |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + ex.Message); |
| | | } |
| | | } |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | private void getModel(string strGuid) |
| | | { |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | } |
| | | |
| | | JArray array1 = new JArray(); |
| | | foreach (var a in _job["rtnData"]["mesInvItemOutItemsList"]) |
| | | { |
| | |
| | | _webServiceName + "DeleteModelMx2", |
| | | JsonConvert.SerializeObject(lst)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å·¥å
·æ¡äºä»¶ |
| | | /// </summary> |
| | | /// <param name="inFieldValue"></param> |
| | | private void _toolCk(int _inFieldValue) |
| | | { |
| | | string strMsg = ""; |
| | | switch (_inFieldValue) |
| | | { |
| | | case 1: |
| | | strMsg = "å®¡æ ¸"; |
| | | break; |
| | | case 0: |
| | | strMsg = "åå®¡æ ¸"; |
| | | break; |
| | | }; |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemOutNo, gridView1, "billNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®" + strMsg + "åï¼")) |
| | | return; |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | | inFieldValue = _inFieldValue, |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "EditModelSubmit", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("æç¤ºï¼" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |