private static void UpdateCell(CompareCell cell, DiffOption diffOption, ObservableCollection <CompareRowVM> rows) { if (diffOption == null) { return; } if (diffOption.IsPartialMatch) { //Get and save the list of GroupId when matches partially Code contains ROWID cell.CompareValue = Options.COMPARE_VALUE_PARTIALMATCH_CODE; CompareRowVM targetRow = FindByStringId(rows, diffOption.Code); cell.TargetTitle = targetRow.Title; } else { //In the case of ○ or ×, save as is. cell.CompareValue = diffOption.Code; cell.TargetTitle = null; } }
private void UpdateViewModel(ObservableCollection <CompareRowVM> rows, CompareRow existRowModel) { if (existRowModel == null) { return; } //always use an up-to-date title //Use an existing memo Memo = existRowModel.Memo; //Update the value of the cell. there may be a variable of the same variable name in the same StudyUnit selectedDiffOptions.Clear(); foreach (CompareCell cell in rowModel.Cells) { //Get an existing cell that corresponds to the cell CompareCell existCell = existRowModel.FindCell(cell.ColumnStudyUnitId); //if the cell is existent, convert to DiffOption corresponding to it DiffOption diffOption = FindDiffOption(rows, existCell); //Add to DiffOption(Onthe screen selectedDiffOptions will be updated) selectedDiffOptions.Add(diffOption); } }
private static void UpdateCell(CompareCell cell, DiffOption diffOption, ObservableCollection<CompareRowVM> rows) { if (diffOption == null) { return; } if (diffOption.IsPartialMatch) { //部分一致の場合CodeにはROWIDが入っているのでそこから行のGroupIdのリストをとりだして保存 cell.CompareValue = Options.COMPARE_VALUE_PARTIALMATCH_CODE; CompareRowVM targetRow = FindByStringId(rows, diffOption.Code); cell.TargetTitle = targetRow.Title; } else { //○ OR ×の場合はそのまま保存 cell.CompareValue = diffOption.Code; cell.TargetTitle = null; } }