Fixed exception thrown when qty is not a number.
This commit is contained in:
@@ -601,19 +601,17 @@ namespace ExportDXF.Forms
|
||||
.GroupBy(c => c.ReferencedConfiguration)
|
||||
.Select(group => group.First());
|
||||
|
||||
//var itemNumber = table.Text[rowIndex, itemNoColumnIndex].PadLeft(2, '0');
|
||||
//var rev = 'A';
|
||||
if (distinctComponents.Count() == 1)
|
||||
{
|
||||
var qtyString = table.DisplayedText[rowIndex, qtyColumnIndex];
|
||||
int qty = 0;
|
||||
|
||||
int.TryParse(qtyString, out qty);
|
||||
|
||||
if (distinctComponents.Count() > 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
items.Add(new Item
|
||||
{
|
||||
PartName = table.DisplayedText[rowIndex, partNoColumnIndex],
|
||||
Quantity = int.Parse(table.DisplayedText[rowIndex, qtyColumnIndex]),
|
||||
Quantity = qty,
|
||||
Description = table.DisplayedText[rowIndex, descriptionColumnIndex],
|
||||
ItemNo = table.DisplayedText[rowIndex, itemNoColumnIndex],
|
||||
Component = distinctComponents.First()
|
||||
|
||||
Reference in New Issue
Block a user