| | |
| | | /// <summary> |
| | | /// 定时刷新 |
| | | /// </summary> |
| | | System.Timers.Timer timer = new System.Timers.Timer(1000); |
| | | System.Timers.Timer timer; |
| | | |
| | | public Frm_MesQaItemsDetect01() |
| | | { |
| | | InitializeComponent(); |
| | | |
| | | #region 设置时间 |
| | | int int32 = 3000; |
| | | string _vanishingSeconds = ConfigurationManager.AppSettings["IqcGetWeight"]; |
| | | if (!string.IsNullOrEmpty(_vanishingSeconds)) |
| | | int32 = int.Parse(_vanishingSeconds); |
| | | timer = new System.Timers.Timer(int32); |
| | | #endregion |
| | | |
| | | this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; |
| | | this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; |
| | | this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | |
| | | gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; |
| | | btnIpt.Click += BtnIpt_Click; |
| | | btnYcReport.Click += BtnYcReport_Click; |
| | | #region 五次重量 |
| | | //关闭时释放timer |
| | | this.Disposed += (s, e) => |
| | | { |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | LoggerHelper.WriteInfoLog("WorkWeight/GetIqcWeight:" + ex.Message); |
| | | } |
| | | }; |
| | | timer.AutoReset = true; // 设置为true表示重复执行,false表示执行一次后停止 |
| | |
| | | _setWeigth(99, ""); |
| | | |
| | | }; |
| | | #endregion |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 提交称重 |
| | |
| | | }; |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", "WorkWeight/EditIqc", JsonConvert.SerializeObject(_obj), false); |
| | | var strReturn = UtilityHelper.HttpPost("", "WorkWeight/EditIqcWeight", JsonConvert.SerializeObject(_obj), false); |
| | | var dd = UtilityHelper.ReturnToDynamic(strReturn); |
| | | if (dd.rtnCode <= 0) |
| | | { |
| | |
| | | string strGuid = lbGuid.Text.Trim(); |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | |
| | | toolBarMenu1.isSetBtn = false; |
| | | if (txt_fcheckResu.Text.Trim() == _strTag && string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当检验结果不合格时,请填写备注说明!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("当检验结果不合格时,请填写备注说明!"); |
| | | txt_fngDesc.Focus(); |
| | | return; |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | } |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |