| | |
| | | using Gs.DevApp.DevFrm.Work; |
| | | using DevExpress.XtraGrid.Drawing; |
| | | using Gs.DevApp.DevFrm.Work; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlTypes; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | ToolBox.MsgHelper.ShowError(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | |
| | | string _lotNo = txt_lotNo.Text.Trim(); |
| | | if (string.IsNullOrEmpty(_lotNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请先选择工单!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择工单!"); |
| | | return; |
| | | } |
| | | var frm = new SelectFqcBox(_lotNo); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | // 读取缺陷等级 |
| | | getRptDefectLevel(); |
| | | //工序 |
| | | txt_fmrmode.getSuppler("", " and isnull(isBack,0)=1"); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 批量录入 |
| | | /// </summary> |
| | |
| | | string strGuid = lbGuid.Text.Trim(); |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtn.rtnMsg); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError(_rtn.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | int intHandle = this.gvMx1.FocusedRowHandle; |
| | | if (intHandle < 0) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:请选择检验项目!"); |
| | | ToolBox.MsgHelper.ShowError("提示:请选择检验项目!"); |
| | | return; |
| | | } |
| | | if (e.KeyCode == Keys.Enter) |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | |
| | | lbGuid, txt_releaseNo, gridView1, "releaseNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?")) |
| | |
| | | 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> |
| | |
| | | string _kbList = txt_kbList.Text.Trim(); |
| | | if (txt_djType.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("单据类型不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("单据类型不能为空!"); |
| | | txt_djType.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_lotNo.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("工单号不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("工单号不能为空!"); |
| | | txt_lotNo.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_kbList.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("送检箱码不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("送检箱码不能为空!"); |
| | | txt_kbList.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_kbSl.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("送检数量不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("送检数量不能为空!"); |
| | | txt_kbList.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_txt_fbatchQty.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("抽检数量不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("抽检数量不能为空!"); |
| | | txt_fbatchQty.Focus(); |
| | | return; |
| | | } |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(_txt_fbatchQty)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请输入正确的抽检数量!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的抽检数量!"); |
| | | txt_fbatchQty.Focus(); |
| | | return; |
| | | } |
| | | if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(txt_kbSl.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请输入正确的送检数量!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的送检数量!"); |
| | | txt_kbList.Focus(); |
| | | return; |
| | | } |
| | | if (Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_txt_fbatchQty) > Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_kbSl.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("抽检数量不能大于送检数量!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("抽检数量不能大于送检数量!"); |
| | | txt_fbatchQty.Focus(); |
| | | return; |
| | | } |
| | | //当不合格时的检查 |
| | | string _txt_fngHandle = txt_fngHandle.Text.Trim(); |
| | | string _txt_fmrmode = txt_fmrmode.GetCode(); |
| | | string _txt_fmrmode = txt_fmrmode.SelectedText.Trim(); |
| | | string _txt_fzrId = txt_fzrId.GetId(); |
| | | string _txt_workNo = txt_workNo.Text.Trim(); |
| | | string _txt_zrType = txt_zrType.Text.Trim(); |
| | |
| | | { |
| | | if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) |
| | | { |
| | | MsgHelper.Warning("当不合格时,请填写违规信息!"); |
| | | MsgHelper.ShowError("当不合格时,请填写违规信息!"); |
| | | txt_msg.Focus(); |
| | | return; |
| | | } |
| | | |
| | | if (txt_fngHandle.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请选择处置结果!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("当不合格时,请选择处置结果!"); |
| | | txt_fngHandle.Focus(); |
| | | return; |
| | | } |
| | | if (txt_zrType.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请选择责任判定!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("当不合格时,请选择责任判定!"); |
| | | txt_zrType.Focus(); |
| | | return; |
| | | } |
| | | if (_txt_fzrId.Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请选择责任人!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("当不合格时,请选择责任人!"); |
| | | txt_fzrId.Focus(); |
| | | return; |
| | | } |
| | | //当处置结果为反工时,要选择工序和反工编号 |
| | | if (txt_fngHandle.SelectedIndex == 1) |
| | | { |
| | | if (string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(_txt_workNo)) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.ShowError("当不合格时,请填写反工单号!"); |
| | | // txt_workNo.Focus(); |
| | | // return; |
| | | //} |
| | | if (string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当不合格时,请填选择反工工序!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("当不合格时,请填选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要填写反工单号!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("不需要填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | if (!string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要选择反工工序!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("不需要选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | |
| | | { |
| | | 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_releaseNo.Text = _rtn.rtnData.outNo; |
| | | toolBarMenu1.isSetBtn = true; |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | getModel(lbGuid.Text, "0"); |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | private void getPageList(int curPage) |
| | | { |
| | | gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | // _sbSqlWhere += " and isnull(fsubmit,0)=0"; |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | private void getModel(string strGuid, string guid5) |
| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | } |
| | | getGxList(dy.aboutGuid.ToString()); |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | private void getGxList(string daaGuid) |
| | | { |
| | | txt_fmrmode.Properties.Items.Clear(); |
| | | var _obj = new |
| | | { |
| | | guid = daaGuid, |
| | | }; |
| | | var json = JsonConvert.SerializeObject(_obj); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", "WomdaaManager/GetGyList", json); |
| | | var dd = UtilityHelper.ReturnToList(strReturn); |
| | | var dt = dd.rtnData; |
| | | foreach (DataRow row in dt.Rows) |
| | | { |
| | | txt_fmrmode.Properties.Items.Add(row["processNo"].ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | |
| | | { |
| | | if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) |
| | | { |
| | | MsgHelper.Warning("单据为不合格时,请填写违规信息!"); |
| | | MsgHelper.ShowError("单据为不合格时,请填写违规信息!"); |
| | | return; |
| | | } |
| | | string _txt_fngHandle = txt_fngHandle.Text.Trim(); |
| | | string _txt_fmrmode = txt_fmrmode.GetCode(); |
| | | string _txt_fmrmode = txt_fmrmode.SelectedText.Trim(); |
| | | string _txt_fzrId = txt_fzrId.GetId(); |
| | | string _txt_workNo = txt_workNo.Text.Trim(); |
| | | string _txt_msg = txt_msg.TextTxt; |
| | | string _txt_zrType = txt_zrType.Text.Trim(); |
| | | if (txt_fngHandle.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择处置结果!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择处置结果!"); |
| | | txt_fngHandle.Focus(); |
| | | return; |
| | | } |
| | | if (txt_zrType.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任判定!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择责任判定!"); |
| | | txt_zrType.Focus(); |
| | | return; |
| | | } |
| | | if (_txt_fzrId.Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择责任人!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择责任人!"); |
| | | txt_fzrId.Focus(); |
| | | return; |
| | | } |
| | | //当处置结果为反工时,要选择工序和反工编号 |
| | | if (txt_fngHandle.SelectedIndex == 1) |
| | | { |
| | | if (string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(_txt_workNo)) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请填写反工单号!"); |
| | | // txt_workNo.Focus(); |
| | | // return; |
| | | //} |
| | | if (string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请填选择反工工序!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请填选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(_txt_workNo)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要填写反工单号!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("不需要填写反工单号!"); |
| | | txt_workNo.Focus(); |
| | | return; |
| | | } |
| | | if (!string.IsNullOrEmpty(_txt_fmrmode)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("不需要选择反工工序!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("不需要选择反工工序!"); |
| | | txt_fmrmode.Focus(); |
| | | return; |
| | | } |
| | |
| | | _webServiceName + "EditModelSubmit", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg); |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnData.outMsg); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim(), "0"); |
| | |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnData.outMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |