/// <summary> /// 讀取已被選擇的資料表 /// </summary> private void ReadCheckList() { CheckList.Clear(); foreach (DataGridViewRow row in dgvTableSchema.Rows) { bool _bSelectTable = (row.Cells[3].Value == null) ? false : ((bool)row.Cells[3].Value) ? true : false; string _CheckTableName = row.Cells[1].Value.ToString().Trim().ToLower(); if (_bSelectTable) { CheckList.Add(_CheckTableName); } } }
private void Continue() { Log.Write("Continue button was clicked"); int count = 0; var checklistModel = SetCheckList(); Log.Write("SetCheckList() was Done"); if (checklistModel == null) { return; } if (WorkItem == null || WorkItem == String.Empty || WorkItem.Length != 6) { MessageBox.Show("Please enter correct (6 digits) workItem Id!"); return; } var checklistCopy = new List <CheckModel>(CheckList); CheckList.Clear(); checklistModel.ForEach(check => { check.GroupNameDone = "GroupNameDone" + count; check.GroupNameNoRelevant = "GroupNameNoRelevant" + count; var existCheck = checklistCopy.FirstOrDefault(c => c.CheckDescription.Equals(check.CheckDescription)); check.IsDoneCheckBox = (existCheck != null) ? existCheck.IsDoneCheckBox : false; count++; CheckList.Add(check); }); FormHeight = 460; CanContinue = false; }