using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using WebApplication3.Models; namespace WebApplication3.Clases { public class ZoneBalance { public uint Id { get; set; } public string Zone { get; set; } public int StressPeriod { get; set; } public ZoneData In { get; set; } public ZoneData Out { get; set; } public string TotalInOut { get; set; } public string PercentDiscrepancy { get; set; } /* 0-> Balance normal con conexion a otras zonas * 1-> Balance acumulativo de la Zona 0 * 2-> Balance del periodo de stress concreto de la Zona 0 */ public int Type { get; set; } public ZoneBalance() { In = new ZoneData(); Out = new ZoneData(); } public ZoneBalance(BalanceHidrico bh) { Zone = bh.Zona; StressPeriod = (int)bh.StressPeriod; TotalInOut = bh.TotalZona; Id = bh.Id; //PercentDiscrepancy = bh.PercentDiscrepancy; } public void SetInOutData(ZoneData dataIn, ZoneData dataOut) { In = dataIn; Out = dataOut; } public BalanceHidrico ToBalanceHidrico(uint? simulacionId) { BalanceHidrico bh = new BalanceHidrico(); bh.StressPeriod = this.StressPeriod; bh.TotalZona = this.TotalInOut; bh.Zona = this.Zone; bh.IdSimulacion = simulacionId; return bh; } } }