| | |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Data; |
| | | using System.Net; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | { |
| | | public partial class Frm_MesQaItemsDetect01 : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | string _strTag = "N:不合格"; |
| | | string _webServiceName = "MesQaItemsDetect01Manager/"; |
| | | List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | public Frm_MesQaItemsDetect01() |
| | |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | },lbGuid); |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | txtJianYan.KeyDown += TxtJianYan_KeyDown; |
| | |
| | | xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged; |
| | | gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; |
| | | btnIpt.Click += BtnIpt_Click; |
| | | btnYcReport.Click += BtnYcReport_Click; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 批量录入 |
| | | /// </summary> |
| | |
| | | private void BtnIpt_Click(object sender, EventArgs e) |
| | | { |
| | | bool bl = btnLoad.Enabled; |
| | | Frm_MesQaItemsDetect01Input frm = new Frm_MesQaItemsDetect01Input(this.lbGuid.Text.Trim(),bl); |
| | | Frm_MesQaItemsDetect01Input frm = new Frm_MesQaItemsDetect01Input(this.lbGuid.Text.Trim(), bl); |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定提交检验吗?")) |
| | | return; |
| | | if (txt_fcheckResu.Text.Trim() == "不合格") |
| | | if (txt_fcheckResu.Text.Trim() == _strTag) |
| | | { |
| | | if (string.IsNullOrEmpty(txt_remarks.Text.Trim())) |
| | | if (string.IsNullOrEmpty(txt_fngDesc.Text.Trim())) |
| | | { |
| | | MsgHelper.Warning("单据为不合格时,请填写备注说明!"); |
| | | MsgHelper.Warning("单据为不合格时,请填写异常备注说明!"); |
| | | return; |
| | | } |
| | | }; |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | if ( txt_fcheckResu.Text.Trim()== "N:不合格" && string.IsNullOrEmpty(txt_remarks.Text.Trim())) |
| | | if (txt_fcheckResu.Text.Trim() == _strTag && string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("当检验结果不合格时,请填写备注说明!"); |
| | | txt_remarks.Focus(); |
| | | txt_fngDesc.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | remarks = txt_remarks.Text.Trim(), |
| | | fngDesc = txt_fngDesc.TextTxt.Trim(), |
| | | }; |
| | | try |
| | | { |
| | |
| | | this.setEable(false); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | // _sbSqlWhere += " and isnull(fsubmit,0)=0"; |
| | | 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 |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | | btnYcReport.ToolTip = dy.toGuid.ToString(); |
| | | lbGuid.Text = strGuid; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | |
| | | ucUpFileList1.getFileList(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据检验项目读取抽样结果 |
| | | /// </summary> |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | private void setEable(bool bl) { |
| | | |
| | | private void setEable(bool bl) |
| | | { |
| | | txtJianYan.ReadOnly = !bl; |
| | | btnLoad.Enabled = bl; |
| | | btnIpt.Text = ( bl==true?"录入样本":"查看样本"); |
| | | btnIpt.Text = (bl == true ? "录入样本" : "查看样本"); |
| | | } |
| | | |
| | | #region 打开父亲窗口委托 |
| | | public event EventHandler<UpdateParentEventArgs> ToUpdateParent; |
| | | private void BtnYcReport_Click(object sender, EventArgs e) |
| | | { |
| | | string _toGuid = (btnYcReport.ToolTip == null ? "" : btnYcReport.ToolTip.ToString()); |
| | | if (string.IsNullOrEmpty(_toGuid)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单无异常报告,查看失败!"); |
| | | return; |
| | | } |
| | | if (ToUpdateParent != null) |
| | | { |
| | | List<string> lst = new List<string>(); |
| | | lst.Add("Gs.DevApp.DevFrm.QC.MesQcExceptional");//类名 |
| | | lst.Add(_toGuid);//异常报告主键 |
| | | lst.Add("tab1");//其它 |
| | | ToUpdateParent?.Invoke(this, |
| | | new UpdateParentEventArgs { StringList = lst }); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |