| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | | { |
| | | e.Info.DisplayText = (e.RowHandle + 1).ToString(); |
| | | } |
| | | }; |
| | | gridView1.CustomDrawEmptyForeground += (s, e) => |
| | | { |
| | | string str = "暂未查找到匹配的数据!"; |
| | | Font f = new Font("微软雅黑", 16); |
| | | Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | txt_pba013.EditChanged += (s, e) => |
| | | { |
| | | string workGuid = this.txt_pba013.GetGuid(); |
| | |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | |
| | | |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private async void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定审核吗?")) |
| | | return; |
| | | UcLoading _loading = new UcLoading(); |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | | }; |
| | | try |
| | | { |
| | | var strJson = await UtilityHelper.HttpPostAsync("", |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "EditModelSubmit", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | private async void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | |
| | | return; |
| | | } |
| | | //MsgHelper.Warning(rowGuid); |
| | | UcLoading _loading = new UcLoading(); |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | | }; |
| | | try |
| | | { |
| | | var strJson = await UtilityHelper.HttpPostAsync("", |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "DeApprove", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (row != null) |
| | | { |
| | | Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | //string _msl = row["quantity"].ToString(); |
| | | //if (string.IsNullOrEmpty(_msl)) |
| | | //{ |
| | | // MsgHelper.ShowError("数量不能为空!"); |
| | | // return; |
| | | //} |
| | | string _LineId = row["daa015"].ToString(); |
| | | if (string.IsNullOrEmpty(_LineId)) |
| | | { |
| | | MsgHelper.ShowError("产线不能为空!"); |
| | | return; |
| | | } |
| | | string _Pcsl = row["daa008"].ToString(); |
| | | if (string.IsNullOrEmpty(_LineId)) |
| | | { |
| | | MsgHelper.ShowError("排产数量不能为空!"); |
| | | return; |
| | | } |
| | | string _Yjkgsj = row["mesStartProd"].ToString(); |
| | | if (string.IsNullOrEmpty(_LineId)) |
| | | { |
| | | MsgHelper.ShowError("预计开工时间不能为空!"); |
| | | return; |
| | | } |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private async void getPageList(int curPage) |
| | | private void getPageList(int curPage) |
| | | { |
| | | UcLoading _loading = new UcLoading(); |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | _webServiceName + "GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | |
| | | } |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | { |