| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | |
| | | using MES.Service.Modes; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm |
| | | { |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | }, tips); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | |
| | | toolBarMenu1.isSetBtn = false; |
| | | if (string.IsNullOrEmpty(txt_depotCode.Text.Trim())) |
| | | { |
| | | MsgHelper.Warning("仓库编码不能为空!"); |
| | | MsgHelper.ShowError("仓库编码不能为空!"); |
| | | txt_depotCode.Focus(); |
| | | return; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(txt_depotName.Text.Trim())) |
| | | { |
| | | MsgHelper.Warning("仓库名称不能为空!"); |
| | | MsgHelper.ShowError("仓库名称不能为空!"); |
| | | txt_depotName.Focus(); |
| | | return; |
| | | } |
| | |
| | | } |
| | | var _obj = new MesDepots |
| | | { |
| | | Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), |
| | | Guid = lbGuid.Text.Trim(), |
| | | DepotCode = txt_depotCode.Text, |
| | | DepotName = txt_depotName.Text, |
| | | Description = txt_description.Text, |
| | | Remark5=txt_remark5.Text.Trim(), |
| | | list = lst |
| | | }; |
| | | |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "EditModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | var gridViews = new List<GridView>(); |
| | |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,a.depot_code", "asc", |
| | | "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |