| | |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using Gs.DevApp.DevFrm.QC.Models; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | |
| | | this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick; |
| | | |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 批准 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnPiZhunClick(object sender, EventArgs e) |
| | | { |
| | | //批准 |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_sampleSizeNo, gridView1); |
| | | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "Approval", JsonConvert.SerializeObject(rowGuid)); |
| | |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | } |
| | | /// <summary> |
| | | /// 查询事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <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); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查询回调 |
| | |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews); |
| | | UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | |
| | | UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | txt_createDate.Text = DateTime.Now.ToString("G"); |
| | | txt_createDate.Enabled = false; |
| | | |
| | | txt_ftwoChecked.Text = "False"; |
| | | txt_ftwoChecked.Enabled = false; |
| | | txt_isenabled.Text = "False"; |
| | | txt_isenabled.Enabled = false; |
| | | txt_foneChecked.Text = "False"; |
| | | txt_foneChecked.Enabled = false; |
| | | |
| | | txt_createName.Enabled = false; |
| | | txt_foneCheckor.Enabled = false; |
| | | txt_ftwoCheckor.Enabled = false; |
| | | |
| | | txt_ftwoCheckdate.Enabled = false; |
| | | txt_foneCheckdate.Enabled = false; |
| | | |
| | | txt_fversion.Text = "1"; |
| | | } |
| | | /// <summary> |
| | |
| | | txt_sampleSizeName.Focus(); |
| | | return; |
| | | } |
| | | |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | |
| | | gvMx2.CloseEditor(); |
| | | gvMx2.UpdateCurrentRow(); |
| | | |
| | | var qmaql2 = new List<MesQmAql2>(); |
| | | for (var i = 0; i < gvMx1.DataRowCount; i++) |
| | | { |
| | |
| | | Memo = row["Memo"].ToString() |
| | | }); |
| | | } |
| | | |
| | | var qmaql3 = new List<MesQmAql3>(); |
| | | for (var i = 0; i < gvMx2.DataRowCount; i++) |
| | | { |
| | |
| | | Memo = row["Memo"].ToString() |
| | | }); |
| | | } |
| | | |
| | | if (qmaql2.Count <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("样本量子码不能为空!"); |
| | | return; |
| | | } |
| | | if (qmaql3.Count <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("抽样方案不能为空!"); |
| | | return; |
| | | } |
| | | var _obj = new MesQmAql1 |
| | | { |
| | | Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), |
| | |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gridViews); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | array.Add(a); |
| | | } |
| | | |
| | | DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | } |
| | | |
| | | |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |