Compare commits
No commits in common. "048964a4665be08699ba79c29ab6e4b559525356" and "541bbf2a93822cdcce5299fad0b59102ae72afb6" have entirely different histories.
048964a466
...
541bbf2a93
@ -74,11 +74,10 @@ namespace FarmMapsBlight
|
|||||||
cropfieldItem = await _farmmapsApiService.GetItemAsync(_settings.CropfieldItemCode);
|
cropfieldItem = await _farmmapsApiService.GetItemAsync(_settings.CropfieldItemCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
DateTime adviceDate = DateTime.Now.Date;
|
|
||||||
DateTime plantingDate = new DateTime(2020, 3, 20);
|
DateTime plantingDate = new DateTime(2020, 3, 20);
|
||||||
DateTime emergeDate = new DateTime(2020, 5, 20);
|
DateTime emergeDate = new DateTime(2020, 5, 20);
|
||||||
|
|
||||||
var blightItem = await _blightService.CreateAdvice(cropfieldItem, adviceDate, plantingDate, emergeDate);
|
var blightItem = await _blightService.CreateAdvice(cropfieldItem, plantingDate, emergeDate);
|
||||||
if (blightItem == null)
|
if (blightItem == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -25,14 +25,13 @@ namespace FarmMapsBlight
|
|||||||
_generalService = generalService;
|
_generalService = generalService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Item> CreateAdvice(Item cropfieldItem, DateTime adviceDate, DateTime plantingDate, DateTime emergeDate)
|
public async Task<Item> CreateAdvice(Item cropfieldItem, DateTime plantingDate, DateTime emergeDate)
|
||||||
{
|
{
|
||||||
var taskRequest = new TaskRequest()
|
var taskRequest = new TaskRequest()
|
||||||
{
|
{
|
||||||
TaskType = "vnd.farmmaps.task.blight"
|
TaskType = "vnd.farmmaps.task.blight"
|
||||||
};
|
};
|
||||||
|
|
||||||
taskRequest.attributes["d"] = DateTime.Now.Date.ToString("o");
|
|
||||||
taskRequest.attributes["plantingDate"] = plantingDate.ToUniversalTime().ToString("o");
|
taskRequest.attributes["plantingDate"] = plantingDate.ToUniversalTime().ToString("o");
|
||||||
taskRequest.attributes["emergeDate"] = emergeDate.ToUniversalTime().ToString("o");
|
taskRequest.attributes["emergeDate"] = emergeDate.ToUniversalTime().ToString("o");
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Update="appsettings.json">
|
<None Update="appsettings.json">
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user