2018-05-22 10:11:50 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Core.Main;
|
|
|
|
|
using Core.Main.DataObjects;
|
|
|
|
|
using Core.Main.DataObjects.PTMagicData;
|
|
|
|
|
using Core.MarketAnalyzer;
|
|
|
|
|
|
|
|
|
|
namespace Monitor.Pages {
|
|
|
|
|
public class BagDetailsModel : _Internal.BasePageModelSecure {
|
|
|
|
|
public ProfitTrailerData PTData = null;
|
2024-01-23 19:05:28 +01:00
|
|
|
|
public MiscData MiscData = null;
|
2018-05-22 10:11:50 +02:00
|
|
|
|
public string DCAMarket = "";
|
|
|
|
|
public DCALogData DCALogData = null;
|
|
|
|
|
public DateTimeOffset DateTimeNow = Constants.confMinDate;
|
|
|
|
|
|
|
|
|
|
public void OnGet() {
|
|
|
|
|
// Initialize Config
|
|
|
|
|
base.Init();
|
|
|
|
|
|
|
|
|
|
BindData();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void BindData() {
|
|
|
|
|
DCAMarket = GetStringParameter("m", "");
|
2019-10-13 22:08:48 +02:00
|
|
|
|
PTData = this.PtDataObject;
|
2024-01-23 19:05:28 +01:00
|
|
|
|
MiscData = this.PTData.Misc;
|
2018-05-22 10:11:50 +02:00
|
|
|
|
DCALogData = PTData.DCALog.Find(d => d.Market == DCAMarket);
|
|
|
|
|
|
|
|
|
|
// Convert local offset time to UTC
|
2024-01-23 19:05:28 +01:00
|
|
|
|
TimeSpan offsetTimeSpan = TimeSpan.Parse(MiscData.TimeZoneOffset.Replace("+", ""));
|
2018-05-22 10:11:50 +02:00
|
|
|
|
DateTimeNow = DateTimeOffset.UtcNow.ToOffset(offsetTimeSpan);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|