|
|
@@ -254,7 +254,7 @@ namespace PRSDesktop
|
|
|
foreach (var record in records)
|
|
|
{
|
|
|
mySheet.Range[iRow, 1].Text = record.Name;
|
|
|
- mySheet.Range[iRow, iCol].Number = Math.Truncate(record.Hours * 100.0F) / 100.0F;
|
|
|
+ mySheet.Range[iRow, iCol].Number = Convert.ToDouble(Math.Truncate(record.Hours * 100) / 100);
|
|
|
iRow++;
|
|
|
}
|
|
|
|
|
|
@@ -293,8 +293,8 @@ namespace PRSDesktop
|
|
|
public int Packets { get; set; }
|
|
|
|
|
|
//public double QAHours { get; set; }
|
|
|
- public double Hours { get; set; }
|
|
|
- public double LostTime { get; set; }
|
|
|
+ public decimal Hours { get; set; }
|
|
|
+ public decimal LostTime { get; set; }
|
|
|
}
|
|
|
|
|
|
public class HistoryViewModel
|
|
|
@@ -462,8 +462,8 @@ namespace PRSDesktop
|
|
|
Staff.Add(record);
|
|
|
}
|
|
|
|
|
|
- var hrs = row.Get<ManufacturingHistory, TimeSpan>(x => x.QADuration).TotalHours +
|
|
|
- row.Get<ManufacturingHistory, TimeSpan>(x => x.WorkDuration).TotalHours;
|
|
|
+ var hrs = row.Get<ManufacturingHistory, TimeSpan>(x => x.QADuration).TotalHoursDecimal() +
|
|
|
+ row.Get<ManufacturingHistory, TimeSpan>(x => x.WorkDuration).TotalHoursDecimal();
|
|
|
if (Entity.IsEntityLinkValid<ManufacturingHistory, ManufacturingPacketLink>(x => x.Packet, row))
|
|
|
record.Hours += hrs;
|
|
|
else
|
|
|
@@ -501,8 +501,8 @@ namespace PRSDesktop
|
|
|
|
|
|
var record = value.FirstOrDefault(x => string.Equals(x.Name, staff));
|
|
|
record.Packets = record.Packets + row.Get<ManufacturingHistory, int>(x => x.WorkCompleted);
|
|
|
- record.Hours = record.Hours + row.Get<ManufacturingHistory, TimeSpan>(x => x.QADuration).TotalHours +
|
|
|
- row.Get<ManufacturingHistory, TimeSpan>(x => x.WorkDuration).TotalHours;
|
|
|
+ record.Hours = record.Hours + row.Get<ManufacturingHistory, TimeSpan>(x => x.QADuration).TotalHoursDecimal() +
|
|
|
+ row.Get<ManufacturingHistory, TimeSpan>(x => x.WorkDuration).TotalHoursDecimal();
|
|
|
}
|
|
|
}
|
|
|
}
|