| | |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using MES.Service.Modes; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, picCheckBox, this, "fstatus", "", (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; |
| | | 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); |
| | | this.txt_pba013.getSuppler(""); |
| | | txt_erpSczz.EditChanged += (s, e) => { |
| | | txt_pba013.getSuppler(txt_erpSczz.GetId()); |
| | | }; |
| | | txt_pba013.EditChanged += (s, e) => |
| | | { |
| | | string workGuid = this.txt_pba013.GetGuid(); |
| | | txt_pba016.getSuppler(workGuid); |
| | | string workGuid = this.txt_pba013.GetId(); |
| | | _getListJybz(workGuid); |
| | | }; |
| | | //选择需要入库的明细 |
| | | //选择需要的明细 |
| | | btnSelect.Click += (s, e) => |
| | | { |
| | | if (string.IsNullOrEmpty(this.txt_pba013.GetId())) |
| | |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择车间,才能选择任务单!"); |
| | | return; |
| | | } |
| | | var frm = new SelectWompba(this.txt_pba013.Text); |
| | | var frm = new SelectWompba(this.txt_pba013.GetId()); |
| | | //赋值给明细表 |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = _oldTable; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | |
| | | |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | Task.Delay(100); |
| | | Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <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> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.UserControl.ShowFilter frm = new Gs.DevApp.UserControl.ShowFilter(gridView1.Columns, _filterList); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 查询回调 |
| | |
| | | /// <param name="e"></param> |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 审核事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_hNo, gridView1, "hNo"); |
| | | //toolBarMenu1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定审核吗?")) |
| | | return; |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | | }; |
| | | 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(), false, 999); |
| | | else |
| | | getPageList(1); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 反审核 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_hNo, gridView1); |
| | | // toolBarMenu1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | //MsgHelper.Warning(rowGuid); |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "DeApprove", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1); |
| | | } |
| | | else |
| | | { |
| | | MsgHelper.Warning(_rtn.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | _filterList = e.FilterList; |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <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> |
| | |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | { } |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 刷新事件 |
| | | /// </summary> |
| | |
| | | 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(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | //_filterList.Clear(); |
| | | //if (gridView1.ActiveFilter.Count > 0) |
| | | //{ |
| | | // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | // gridView1.ActiveFilter.Clear(); |
| | | // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | //} |
| | | //getPageList(1); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 审核事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk(1, "EditModelSubmit"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 反审核 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk(0, "EditModelSubmitFSH"); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改事件 |
| | | /// </summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_hNo, gridView1); |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_hNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid, true, 1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | 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); |
| | |
| | | txt_pba013.Focus(); |
| | | return; |
| | | } |
| | | string lineId = txt_pba016.GetId(); |
| | | if (string.IsNullOrEmpty(lineId.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择产线!"); |
| | | txt_pba016.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_pba015.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("计划人数不能为空!"); |
| | | txt_pba015.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | bz = txt_pba009.Text.Trim(), |
| | | cjId = workId, |
| | | cxId = lineId, |
| | | jhrs = txt_pba015.Text.Trim(), |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | |
| | | if (row != null) |
| | | { |
| | | Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | //string _msl = row["quantity"].ToString(); |
| | | //if (string.IsNullOrEmpty(_msl)) |
| | | //string _LineId = row["daa015"].ToString(); |
| | | //if (string.IsNullOrEmpty(_LineId)) |
| | | //{ |
| | | // MsgHelper.ShowError("数量不能为空!"); |
| | | // MsgHelper.ShowError("产线编码不能为空!"); |
| | | // return; |
| | | //} |
| | | string _Pcsl = row["daa008"].ToString(); |
| | | if (string.IsNullOrEmpty(_Pcsl)) |
| | | { |
| | | MsgHelper.ShowError("排产数量不能为空!"); |
| | | return; |
| | | } |
| | | string _Yjkgsj = row["mesStartProd"].ToString(); |
| | | if (string.IsNullOrEmpty(_Yjkgsj)) |
| | | { |
| | | MsgHelper.ShowError("预计开工时间不能为空!"); |
| | | return; |
| | | } |
| | | //string _prepareTime = row["prepareTime"].ToString(); |
| | | //if (string.IsNullOrEmpty(_prepareTime)) |
| | | //{ |
| | | // MsgHelper.ShowError("预计备料时间不能为空!"); |
| | | // return; |
| | | //} |
| | | //string _planPersonnel = row["planPersonnel"].ToString(); |
| | | //if (string.IsNullOrEmpty(_planPersonnel)) |
| | | //{ |
| | | // MsgHelper.ShowError("计划人数!"); |
| | | // return; |
| | | //} |
| | | //string _changeLinetime = row["changeLinetime"].ToString(); |
| | | //if (string.IsNullOrEmpty(_changeLinetime)) |
| | | //{ |
| | | // MsgHelper.ShowError("换线时间不能为空!"); |
| | | // return; |
| | | //} |
| | | string _mesEndProd = row["mesEndProd"].ToString(); |
| | | if (string.IsNullOrEmpty(_mesEndProd)) |
| | | { |
| | | MsgHelper.ShowError("预计完工时间不能为空!"); |
| | | return; |
| | | } |
| | | //string _restTime = row["restTime"].ToString(); |
| | | //if (string.IsNullOrEmpty(_prepareTime)) |
| | | //{ |
| | | // MsgHelper.ShowError("休息时间不能为空!"); |
| | | // return; |
| | | //} |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | | AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["caaGuid"].ToString()), |
| | | LineId = int.Parse(row["daa015"].ToString()),//产线id |
| | | LineId = row["daa015"].ToString(),//产线id |
| | | Yjkgsj = (row["mesStartProd"].ToString()),//预计开工时间 |
| | | Jhrs = row["planPersonnel"].ToString(),//计划人数 |
| | | Hxsj = row["changeLinetime"].ToString(),//换线时间 |
| | | Bz = row["daa009"].ToString(),//备注 |
| | | Blsj = row["prepareTime"].ToString(),//预计备料时间 |
| | | Pcsl = row["daa008"].ToString()//排产数量 |
| | | Pcsl = row["daa008"].ToString(),//排产数量 |
| | | Yjwgsj = row["mesEndProd"].ToString()//预计完工时间 |
| | | }); |
| | | } |
| | | } |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | lbGuid.Text = _rtn.rtnData.outGuid; |
| | | txt_hNo.Text = _rtn.rtnData.outNo; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | private void getPageList(int curPage) |
| | | { |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | |
| | | { |
| | | 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("请先选择你要操作的行!"); |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | } |
| | | else |
| | | { |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | } |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据车间读产线 |
| | | /// </summary> |
| | | /// <param name="workGuid"></param> |
| | | private void _getListJybz(string workGuid) |
| | | { |
| | | rptJYBZ.Items.Clear(); |
| | | if (string.IsNullOrEmpty(workGuid)) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guid = workGuid //主建 |
| | | }; |
| | | var json = JsonConvert.SerializeObject(_obj); |
| | | var _sbSqlWhere = " and 1=1 and dpt_id="+ workGuid; |
| | | var pgq = new PageQueryModel(1, 999999, "a.line_no", "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | "SysDepartmentManager/GetModel", json); |
| | | var _job = JObject.Parse(strReturn); |
| | | var array = new JArray(); |
| | | var d = _job["rtnData"]["list"]; |
| | | foreach (var a in d) array.Add(a); |
| | | var dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); |
| | | var strReturn = UtilityHelper.HttpPost("", "MesWorkshopLineManager/GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | foreach (DataRow dr in dt.Rows) |
| | | { |
| | | rptJYBZ.Items.Add((new CboItemEntity(dr["id"].ToString(), dr["name"].ToString()))); |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | private void rptJYBZ_SelectedIndexChanged(object sender, EventArgs e) |
| | | { |
| | | ComboBoxEdit comboBox = sender as ComboBoxEdit; |
| | |
| | | gvMx1.SetRowCellValue(dataIndex, "daa015", _val); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 工具条事件 |
| | | /// </summary> |
| | | /// <param name="inFieldValue"></param> |
| | | private void _toolCk(int _inFieldValue, string _mth) |
| | | { |
| | | string strMsg = ""; |
| | | switch (_inFieldValue) |
| | | { |
| | | case 1: |
| | | strMsg = "审核"; |
| | | break; |
| | | case 0: |
| | | strMsg = "反审核"; |
| | | break; |
| | | }; |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_hNo, gridView1, "hNo"); |
| | | 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 + _mth, |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | UtilityHelper.SetCheckIco(gridView1, "fstatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |