private void btn_CallHistory_Click(object sender, EventArgs e) { Form_AdvancedFunc_SelectRecord Fas = new Form_AdvancedFunc_SelectRecord(); Fas.Show(); Application.DoEvents(); while (!Fas.IsDisposed) { Application.DoEvents(); //this.Enabled = false; } this.Enabled = true; // string SelectDate = ""; SelectDate = Fas.GetDateSelection; PersistentData.CallHistory_Date = Fas.GetDateSelection; dt = DBOperate_Obj.Query_ToleranceStandard_SingleDay(SelectDate); // 更新dgv中的数据 if (dt.Rows.Count > 0 && dt.Rows.Count == 1) { for (int idx_Tolerance = 0; idx_Tolerance < (dt.Columns.Count - 2) / 2; idx_Tolerance++) //75 { dgv_ToleranceSetting.Rows[idx_Tolerance].Cells[3].Value = B515_Standard_Tolerance[2 * idx_Tolerance] = Convert.ToDouble(dt.Rows[0][2 * idx_Tolerance + 2]); //上公差 dgv_ToleranceSetting.Rows[idx_Tolerance].Cells[4].Value = B515_Standard_Tolerance[2 * idx_Tolerance + 1] = Convert.ToDouble(dt.Rows[0][2 * idx_Tolerance + 3]); //下公差 } } }