| | |
| | | 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; |
| | | using Newtonsoft.Json; |
| | |
| | | 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; |
| | |
| | | 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); |
| | | }; |
| | | } |
| | | |
| | | 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)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.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_sampleSizeNo, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "AntiAudit", JsonConvert.SerializeObject(rowGuid)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <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_sampleSizeNo, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | |
| | | 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_sampleSizeNo.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = lbGuid.Text.Trim(),//主建 |
| | | |
| | | if (string.IsNullOrEmpty(txt_sampleSizeName.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("标准名称不能为空!"); |
| | | 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++) |
| | | { |
| | | var row = gvMx1.GetDataRow(i); |
| | | if (row != null) |
| | | qmaql2.Add(new MesQmAql2 |
| | | { |
| | | Guid = row["Guid"].ToString().Length > 0 |
| | | ? Guid.Parse(row["Guid"].ToString()) |
| | | : Guid.Empty, |
| | | LotFrom = Convert.ToInt32(row["LotFrom"].ToString()), |
| | | LotTo = Convert.ToInt32(row["LotTo"].ToString()), |
| | | FlevelS1 = row["FlevelS1"].ToString(), |
| | | FlevelS2 = row["FlevelS2"].ToString(), |
| | | FlevelS3 = row["FlevelS3"].ToString(), |
| | | FlevelS4 = row["FlevelS4"].ToString(), |
| | | FlevelI = row["FlevelI"].ToString(), |
| | | FlevelIi = row["FlevelIi"].ToString(), |
| | | FlevelIii = row["FlevelIii"].ToString(), |
| | | Memo = row["Memo"].ToString() |
| | | }); |
| | | } |
| | | |
| | | var qmaql3 = new List<MesQmAql3>(); |
| | | for (var i = 0; i < gvMx2.DataRowCount; i++) |
| | | { |
| | | var row = gvMx2.GetDataRow(i); |
| | | if (row != null) |
| | | qmaql3.Add(new MesQmAql3 |
| | | { |
| | | Guid = row["Guid"].ToString().Length > 0 |
| | | ? Guid.Parse(row["Guid"].ToString()) |
| | | : Guid.Empty, |
| | | FsampleSizeWord = Convert.ToInt32(row["FsampleSizeWord"].ToString()), |
| | | SampleSizeWord = row["SampleSizeWord"].ToString(), |
| | | Aql00010 = Convert.ToInt32(row["Aql00010"].ToString()), |
| | | Aql00015 = Convert.ToInt32(row["Aql00015"].ToString()), |
| | | Aql00025 = Convert.ToInt32(row["Aql00025"].ToString()), |
| | | Aql00040 = Convert.ToInt32(row["Aql00040"].ToString()), |
| | | Aql00065 = Convert.ToInt32(row["Aql00065"].ToString()), |
| | | Aql0010 = Convert.ToInt32(row["Aql0010"].ToString()), |
| | | Aql0015 = Convert.ToInt32(row["Aql0015"].ToString()), |
| | | Aql0025 = Convert.ToInt32(row["Aql0025"].ToString()), |
| | | Aql0040 = Convert.ToInt32(row["Aql0040"].ToString()), |
| | | Aql0065 = Convert.ToInt32(row["Aql0065"].ToString()), |
| | | Aql0100 = Convert.ToInt32(row["Aql0100"].ToString()), |
| | | Aql0150 = Convert.ToInt32(row["Aql0150"].ToString()), |
| | | Aql0250 = Convert.ToInt32(row["Aql0250"].ToString()), |
| | | Aql0400 = Convert.ToInt32(row["Aql0400"].ToString()), |
| | | Aql0650 = Convert.ToInt32(row["Aql0650"].ToString()), |
| | | Aql1000 = Convert.ToInt32(row["Aql1000"].ToString()), |
| | | Memo = row["Memo"].ToString() |
| | | }); |
| | | } |
| | | |
| | | var _obj = new MesQmAql1 |
| | | { |
| | | Guid = lbGuid.Text.Trim().Length > 0 |
| | | ? Guid.Parse(lbGuid.Text.Trim()) |
| | | : Guid.Empty, |
| | | |
| | | SampleSizeNo = txt_sampleSizeNo.Text.Trim(), |
| | | SampleSizeName = txt_sampleSizeName.Text.Trim(), |
| | | Memo = txt_memo.Text.Trim(), |
| | | CreateDate = DateTime.Now, |
| | | FtwoChecked = false, |
| | | Isenabled = false, |
| | | FoneChecked = false, |
| | | Fversion = Convert.ToInt32(txt_fversion.Text.Trim()), |
| | | |
| | | MesQmAql2s = qmaql2, |
| | | MesQmAql3s = qmaql3 |
| | | }; |
| | | |
| | | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |