forked from FarmMaps/FarmMapsApiClient
updated names of output KPI B1 and B2 + added yieldStraw to output (non functional)
This commit is contained in:
@@ -401,8 +401,51 @@ namespace FarmmapsKPI
|
||||
if (kpio.id != null)
|
||||
{
|
||||
if (kpio.id != kpioPrevious.id)
|
||||
{
|
||||
{
|
||||
KPIelementsOfBalance kPIelementsOfBalance = kpio.data.values;
|
||||
//if (kpio.id == "A1") //TtD not functional
|
||||
//{
|
||||
// //Make a new dataList = new line to be written
|
||||
// //Fill the datalist with this kpi
|
||||
// dataList = new List<string>
|
||||
// {
|
||||
// kpio.parentName,
|
||||
// cropfieldItem.Code,
|
||||
// kpio.data.area,
|
||||
// kpio.data.cropTypeCode,
|
||||
// kpio.data.cropTypeName,
|
||||
// kpio.id,
|
||||
// kpio.quantity, // in KPI output quantity is what we call KPIvariable in headerlist of csv file
|
||||
// kpio.value,
|
||||
// kpio.unit,
|
||||
// kpio.targetValue,
|
||||
// kpio.thresholdValue
|
||||
// };
|
||||
// //Write the datalist to a line to the streamwrieter sw for the output csv file
|
||||
// sw.WriteLine(string.Join(",", dataList));
|
||||
// foreach (string elementName in kpio.A1elements)
|
||||
// {
|
||||
// // get A1element from the element called values
|
||||
// string elementValue = (string)kPIelementsOfBalance.GetType().GetProperty(elementName).GetValue(kPIelementsOfBalance, null);
|
||||
// dataList = new List<string>
|
||||
// {
|
||||
// kpio.parentName,
|
||||
// cropfieldItem.Code,
|
||||
// kpio.data.area,
|
||||
// kpio.data.cropTypeCode,
|
||||
// kpio.data.cropTypeName,
|
||||
// kpio.id,
|
||||
// elementName, // specific output variable name for A1 element
|
||||
// elementValue, // specific output value name for A1 element
|
||||
// kpio.unit,
|
||||
// "",
|
||||
// ""
|
||||
// };
|
||||
// //Write the datalist to a line to the streamwrieter sw for the output csv file
|
||||
// sw.WriteLine(string.Join(",", dataList));
|
||||
// }
|
||||
//}
|
||||
//else if (kpio.id == "B1")
|
||||
if (kpio.id == "B1")
|
||||
{
|
||||
//Make a new dataList = new line to be written
|
||||
|
||||
Reference in New Issue
Block a user