WellData.cs 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using WebApplication3.Models;
  6. namespace WebApplication3.Clases
  7. {
  8. //public struct TextRates
  9. //{
  10. // string init;
  11. // string finish;
  12. // string rate;
  13. //}
  14. public class WellData
  15. {
  16. public WellData()
  17. {
  18. Rates = new List<TimeSerieInterno>();
  19. //StringRates = new List<TextRates>();
  20. }
  21. public bool ActiveFlag { get; set; }
  22. public string WellName { get; set; }
  23. public string X { get; set; }
  24. public string Y { get; set; }
  25. public string ZMin { get; set; }
  26. public string ZMax { get; set; }
  27. public int ScreenIntervals { get; set; }
  28. public string Bot { get; set; }
  29. public string Top { get; set; }
  30. public int PumpPeriods { get; set; }
  31. public List<TimeSerieInterno> Rates { get; set; }
  32. public Pozo ToPozo(uint acuifero, uint simId)
  33. {
  34. Pozo p = new Pozo();
  35. p.IdAquifero = acuifero;
  36. p.IdSimulacion = simId;
  37. p.X = this.X;
  38. p.Y = this.Y;
  39. //p.Maximo = float.Parse(this.ZMax);
  40. p.Maximo = ZMax;
  41. //p.Minimo = float.Parse(this.ZMin);
  42. p.Minimo = ZMin;
  43. p.Nombre = this.WellName;
  44. p.Active = (this.ActiveFlag) ? (uint)1 : (uint)0;
  45. return p;
  46. }
  47. public WellData Copy()
  48. {
  49. WellData wellData = new WellData();
  50. wellData.ActiveFlag = this.ActiveFlag;
  51. wellData.Bot = this.Bot;
  52. wellData.PumpPeriods = this.PumpPeriods;
  53. wellData.Rates = this.Rates;
  54. return wellData;
  55. }
  56. }
  57. }