| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm.QC |
| | |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | | gridViews.Add(gvMx3); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gridViews); |
| | | } |
| | | } |
| | |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | | gridViews.Add(gvMx3); |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); |
| | | UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | UtilityHelper.SetDefaultTable(gcMx3, gvMx3); |
| | | txt_createDate.Text = DateTime.Now.ToString("G"); |
| | | txt_fversion.Text = "1"; |
| | | } |
| | |
| | | gvMx2.CloseEditor(); |
| | | gvMx2.PostEditor(); |
| | | gvMx2.UpdateCurrentRow(); |
| | | gvMx3.CloseEditor(); |
| | | gvMx3.PostEditor(); |
| | | gvMx3.UpdateCurrentRow(); |
| | | try |
| | | { |
| | | var qmaql2 = new List<MesQmAql2>(); |
| | |
| | | }); |
| | | } |
| | | } |
| | | var qmaql4 = new List<MesQmAql4>(); |
| | | for (var i = 0; i < gvMx3.DataRowCount; i++) |
| | | { |
| | | var row = gvMx3.GetDataRow(i); |
| | | if (row != null) |
| | | { |
| | | if (string.IsNullOrEmpty(row["aqlType"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("拒收质量水平不能为空!"); |
| | | return; |
| | | } |
| | | qmaql4.Add(new MesQmAql4 |
| | | { |
| | | Guid = UtilityHelper.ToGuid(row["Guid"].ToString()), |
| | | AqlType = Convert.ToDecimal(row["AqlType"].ToString()), |
| | | AqlTypeCr = row["AqlTypeCr"].ToString(), |
| | | AqlTypeMa = row["AqlTypeMa"].ToString(), |
| | | AqlTypeMi = row["AqlTypeMi"].ToString(), |
| | | }); |
| | | } |
| | | } |
| | | if (qmaql2.Count <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("样本量子码不能为空!"); |
| | |
| | | if (qmaql3.Count <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("抽样方案不能为空!"); |
| | | return; |
| | | } |
| | | if (qmaql4.Count <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("AQL抽样基准不能为空!"); |
| | | return; |
| | | } |
| | | var _obj = new MesQmAql1 |
| | |
| | | FoneChecked = false, |
| | | Fversion = Convert.ToInt32(txt_fversion.Text.Trim()), |
| | | MesQmAql2s = qmaql2, |
| | | MesQmAql3s = qmaql3 |
| | | MesQmAql3s = qmaql3, |
| | | MesQmAql4s = qmaql4 |
| | | }; |
| | | try |
| | | { |
| | |
| | | List<GridView> gridViews = new List<GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | gridViews.Add(gvMx2); |
| | | gridViews.Add(gvMx3); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gridViews); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | |
| | | List<GridView> gvList = new List<GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | gvList.Add(gvMx3); |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | | JArray mesQmAql3s = new JArray(); |
| | | JArray mesQmAql4s = new JArray(); |
| | | foreach (var a in _job["rtnData"]["mesQmAql2s"]) |
| | | { |
| | | array.Add(a); |
| | |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx3, gvMx3); |
| | | } |
| | | |
| | | foreach (var a in _job["rtnData"]["mesQmAql4s"]) |
| | | { |
| | | mesQmAql4s.Add(a); |
| | | } |
| | | DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(mesQmAql4s.ToString()); |
| | | if (dt2.Rows.Count > 0) |
| | | { |
| | | gcMx3.BindingContext = new BindingContext(); |
| | | gcMx3.DataSource = dt2; |
| | | gcMx3.ForceInitialize(); |
| | | // gvMx3.BestFitColumns(); |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx3, gvMx3); |
| | | } |
| | | } |
| | | else |