static bool IsValid(Well well, Dictionary <string, Well> wells, out RejectedReasons reason) { reason = RejectedReasons.Unknown; if (!string.IsNullOrEmpty(well.Name) && !wells.ContainsKey(well.Name)) { reason = RejectedReasons.None; return(true); } else if (string.IsNullOrEmpty(well.Name)) { reason = RejectedReasons.WellNameEmpty; } else if (wells.ContainsKey(well.Name)) { reason = RejectedReasons.DuplicatedName; } return(false); }
static IRow CreateRejectedRow(IRow row, int column, int originalRow, RejectedReasons reason) { row.CreateCell(column, CellType.Numeric).SetCellValue(originalRow + 1); row.CreateCell(column + 1, CellType.String).SetCellValue(Base.Common.GetEnumDescription(reason)); return(row); }