| | |
| | | { |
| | | // 选择匀速时:启用匀速抽样数,禁用随机抽样数 |
| | | 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 = ""; // 清空随机抽样数 |
| | | |
| | | if (int.TryParse(txt_SampleSize1.Text.Trim(), out int size)) |
| | |
| | | { |
| | | // 选择随机时:启用随机抽样数,禁用匀速抽样数 |
| | | 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 = ""; // 清空匀速抽样数 |
| | | |
| | | if (int.TryParse(txt_SampleSize2.Text.Trim(), out int size)) |
| | |
| | | { |
| | | // 未选择或其他情况:两个输入框都禁用 |
| | | 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 = ""; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | else if (currentSampleMethod == "随机") |
| | | { |
| | | txt_SampleSize2.Properties.ReadOnly = false; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.White; |
| | | |
| | | txt_SampleSize1.Properties.ReadOnly = true; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.LightGray; |
| | | } |
| | | else |
| | | { |
| | | // 未选择时两个都禁用 |
| | | txt_SampleSize1.Properties.ReadOnly = true; |
| | | txt_SampleSize1.Properties.Appearance.BackColor = Color.LightGray; |
| | | |
| | | txt_SampleSize2.Properties.ReadOnly = true; |
| | | txt_SampleSize2.Properties.Appearance.BackColor = Color.LightGray; |
| | | } |
| | | } |
| | | |
| | |
| | | RPB014 = row["RPB014"]?.ToString(), |
| | | RPB015 = row["RPB015"]?.ToString(), |
| | | RPB016 = row["RPB016"]?.ToString(), |
| | | RPB017 = row["RPB017"]?.ToString(), |
| | | RPB018 = row["RPB018"]?.ToString(), |
| | | RPB019 = row["RPB019"]?.ToString(), |
| | | RPB020 = row["RPB020"]?.ToString(), |
| | | Remark = row["Remark"]?.ToString(), |
| | | Seq = row["Seq"]?.ToString(), |
| | | }); |