| | |
| | | using DevExpress.ClipboardSource.SpreadsheetML; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Repository; |
| | | using DevExpress.XtraPrinting.Native; |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Configuration; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using System.Windows.Media.Animation; |
| | | |
| | | namespace Gs.DevApp.DevFrm.FQC |
| | | { |
| | |
| | | public Frm_FQCItem() |
| | | { |
| | | InitializeComponent(); |
| | | |
| | | // 绑定事件 |
| | | gridView2.CellValueChanged += gridView2_CellValueChanged; |
| | | gridView3.CellValueChanged += gridView3_CellValueChanged; |
| | |
| | | txt_SampleSize2.Leave += txt_SampleSize2_Leave; |
| | | // 添加抽样方法下拉框事件 |
| | | this.txt_SampleMethod.SelectedIndexChanged += Txt_SampleMethod_SelectedIndexChanged; |
| | | |
| | | //this.toolBarMenu1.getXmlConfig(); |
| | | |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | // 设置GridView参数 |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gridView2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gridView3); |
| | |
| | | // 选择匀速时:启用匀速抽样数,禁用随机抽样数 |
| | | txt_SampleSize1.Properties.ReadOnly = false; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.White; |
| | | |
| | | |
| | | txt_SampleSize2.Properties.ReadOnly = true; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.WhiteSmoke; |
| | | txt_SampleSize2.Text = ""; // 清空随机抽样数 |
| | |
| | | // 选择随机时:启用随机抽样数,禁用匀速抽样数 |
| | | txt_SampleSize2.Properties.ReadOnly = false; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.White; |
| | | |
| | | |
| | | txt_SampleSize1.Properties.ReadOnly = true; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.WhiteSmoke; |
| | | txt_SampleSize1.Text = ""; // 清空匀速抽样数 |
| | |
| | | txt_SampleSize1.Properties.ReadOnly = true; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.WhiteSmoke; |
| | | txt_SampleSize1.Text = ""; |
| | | |
| | | |
| | | txt_SampleSize2.Properties.ReadOnly = true; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.WhiteSmoke; |
| | | txt_SampleSize2.Text = ""; |
| | |
| | | { |
| | | // 根据当前抽样方法值设置输入框状态 |
| | | string currentSampleMethod = txt_SampleMethod.Text.Trim(); |
| | | |
| | | |
| | | if (currentSampleMethod == "匀速") |
| | | { |
| | | txt_SampleSize1.Properties.ReadOnly = false; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.White; |
| | | |
| | | |
| | | txt_SampleSize2.Properties.ReadOnly = true; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.LightGray; |
| | | } |
| | |
| | | { |
| | | txt_SampleSize2.Properties.ReadOnly = false; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.White; |
| | | |
| | | |
| | | txt_SampleSize1.Properties.ReadOnly = true; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.LightGray; |
| | | } |
| | |
| | | // 未选择时两个都禁用 |
| | | txt_SampleSize1.Properties.ReadOnly = true; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.LightGray; |
| | | |
| | | |
| | | txt_SampleSize2.Properties.ReadOnly = true; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.LightGray; |
| | | } |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gridControl1, gridView2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gridControl2, gridView3); |
| | | |
| | | |
| | | // 初始化抽样数输入框状态 |
| | | InitializeSampleSizeControls(); |
| | | } |
| | |
| | | lbGuid, txt_Guid, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | getModel(rowGuid); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | dynamic dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); |
| | | |
| | | |
| | | // 控制明细表可编辑状态 |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gridView2); // 项目标准子表 |
| | |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); |
| | | |
| | | JObject _job = JObject.Parse(strJson); |
| | | |
| | | |
| | | // 处理项目标准子表数据 |
| | | JArray array1 = new JArray(); |
| | | if (_job["rtnData"]["list"] != null) |