public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (TransportOrderNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderYear?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DocumentTransportNo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureCustomerName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureCity?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DepartureState?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationCity?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestinationState?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Qty?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrderWeight?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Volume?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Pallet?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (RetiredDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DeliveryDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Note?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (CallCustomerBefore?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Telephone?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DayClosed?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Urgent?.GetHashCode() ?? 0); return(hashCode); }
public void SaveSetting(XElement element) { element.Add(new XAttribute("Name", Name)); element.Add(new XAttribute("Descripting", Description)); element.Add(new XAttribute("Urgent", Urgent.ToString())); element.Add(new XAttribute("Enabled", Enabled.ToString())); element.Add(new XAttribute("EventDateTime", EventDateTime.ToString(CultureInfo.InvariantCulture))); }
public void SaveSetting(XElement element) { element.Add(new XAttribute("Name", Name)); element.Add(new XAttribute("Descripting", Description)); element.Add(new XAttribute("Urgent", Urgent.ToString())); element.Add(new XAttribute("Enabled", Enabled.ToString())); element.Add(new XAttribute("EventTime", EventTime.ToString(CultureInfo.InvariantCulture))); foreach (DayOfWeek weekDay in ActiveWeekDays) { element.Add(new XElement("ActiveWeekDay", new XAttribute("Name", weekDay.ToString()))); } }
public IActionResult Update(UpdateUrgentDto model) { if (ModelState.IsValid) { Urgent urgent = _urgentService.GetById(model.Id); urgent.Definition = model.Definition; _urgentService.Update(urgent); return(RedirectToAction("Index")); } return(View(model)); }
public IActionResult Post([FromBody] ProductionRequest t) { List <OrganizationProductions> organizationProductionsList = new List <OrganizationProductions>(); Parallel.ForEach(t.organizations, organization => { OrganizationProductions organizationProductions = new OrganizationProductions(); List <CentralProductions> centralProductionsList = new List <CentralProductions>(); Parallel.ForEach(organization.centrals, central => { CentralProductions centralProductions = new CentralProductions(); Parallel.ForEach(t.types, type => { if (type == 0) { string kgupString = Api.GetRequest($"https://seffaflik.epias.com.tr/transparency/service/production/dpp?organizationEIC={organization.etso}&uevcbEIC={central.eic}&startDate={t.start}&endDate={t.end}"); JsonElement json = JsonDocument.Parse(kgupString).RootElement; var kgoek = new KgupOrEak(); foreach (var hour in json.GetProperty("body").GetProperty("dppList").EnumerateArray()) { var field = new KgupOrEakField { date = hour.GetProperty("tarih").GetString(), sum = hour.GetProperty("toplam").GetDouble() }; kgoek.hourly.Add(field); } kgoek.hourly = kgoek.hourly.OrderBy(o => o.date).ToList(); foreach (var day in json.GetProperty("body").GetProperty("statistics").EnumerateArray()) { var field = new KgupOrEakField { date = day.GetProperty("tarih").GetString(), sum = day.GetProperty("toplamSum").GetDouble() }; kgoek.daily.Add(field); } kgoek.daily = kgoek.daily.OrderBy(o => o.date).ToList(); centralProductions.types.kgup = kgoek; } else if (type == 1) { string eakString = Api.GetRequest($"https://seffaflik.epias.com.tr/transparency/service/production/aic?organizationEIC={organization.etso}&uevcbEIC={central.eic}&startDate={t.start}&endDate={t.end}"); JsonElement json = JsonDocument.Parse(eakString).RootElement; var kgoek = new KgupOrEak(); foreach (var hour in json.GetProperty("body").GetProperty("aicList").EnumerateArray()) { var field = new KgupOrEakField { date = hour.GetProperty("tarih").GetString(), sum = hour.GetProperty("toplam").GetDouble() }; kgoek.hourly.Add(field); } kgoek.hourly = kgoek.hourly.OrderBy(o => o.date).ToList(); foreach (var day in json.GetProperty("body").GetProperty("statistics").EnumerateArray()) { var field = new KgupOrEakField { date = day.GetProperty("tarih").GetString(), sum = day.GetProperty("toplamSum").GetDouble() }; kgoek.daily.Add(field); } kgoek.daily = kgoek.daily.OrderBy(o => o.date).ToList(); centralProductions.types.eak = kgoek; } else if (type == 2) { string urgentString = Api.GetRequest($"https://seffaflik.epias.com.tr/transparency/service/production/urgent-market-message?startDate={t.start}&endDate={t.end}®ionId=1&uevcbId={central.id}"); JsonElement json = JsonDocument.Parse(urgentString).RootElement; List <Urgent> urgents = new List <Urgent>(); foreach (var u in json.GetProperty("body").GetProperty("urgentMarketMessageList").EnumerateArray()) { var urgent = new Urgent { urgentStartDate = u.GetProperty("caseStartDate").GetString(), hourly = new List <UrgentField>() }; foreach (var h in u.GetProperty("faultDetails").EnumerateArray()) { var urgentField = new UrgentField { date = h.GetProperty("date").GetString(), powerLoss = h.GetProperty("faultCausedPowerLoss").GetDouble() }; urgent.hourly.Add(urgentField); } urgent.hourly = urgent.hourly.OrderBy(o => o.date).ToList(); urgent.type = u.GetProperty("messageType").GetInt32(); urgent.reason = u.GetProperty("reason").GetString(); urgents.Add(urgent); } centralProductions.types.urgent = urgents; } }); centralProductions.name = central.name; centralProductions.id = central.id; centralProductions.eic = central.eic; centralProductionsList.Add(centralProductions); }); organizationProductions.name = organization.name; organizationProductions.etso = organization.etso; organizationProductions.centralProductions = centralProductionsList; organizationProductionsList.Add(organizationProductions); }); return(Ok(organizationProductionsList)); }
public void Update(Urgent entity) { _urgentDal.Update(entity); }
public void Save(Urgent entity) { _urgentDal.Save(entity); }
public void Delete(Urgent entity) { _urgentDal.Delete(entity); }