public void Remove(Guid id) { PeriodInformation period = GetById(id); period.Status = DAL.Entity.Enum.Status.Deleted; Update(period); }
private void ToggleValuesAndInfo(string year) { PeriodInformation currentPeriodInfo = _periodInformations.FirstOrDefault(_ => _.Year.ToString().Equals(year)); IList <WindChange> windChanges = currentPeriodInfo.PeriodWindChanges; IList <double> currentValues = WindChange.GetWindChangesValues(windChanges); MainWindowViewModel mainViewModel = MainWindowViewModel.GetInstance(); mainViewModel.AnalyzeCenterPage.SetWindValues(currentValues); mainViewModel.MenuRightPage.ChangeInformationLabel(currentPeriodInfo?.PeriodInformationLabels); }
public ActionResult Edit(PeriodInformation periodInformation) { if (ModelState.IsValid) { periodInformationService.Update(periodInformation); return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Create(PeriodInformation model) { if (ModelState.IsValid) { periodInformationService.Add(model); return(RedirectToAction("Index")); } else { return(View()); } }
public ActionResult Delete(PeriodInformation periodInformation) { try { periodInformationService.Remove(periodInformation.ID); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
/// <summary> /// Kalmam滤波。 /// </summary> /// <param name="MultiSitePeriodInfo">接收信息</param> /// <param name="lastResult">上次解算结果(用于 Kalman 滤波),若为null则使用初始值计算</param> /// <returns></returns> public override BaseGnssResult CaculateKalmanFilter(PeriodInformation MultiSitePeriodInfo, BaseGnssResult lastResult = null) { if (!this.MatrixBuilder.IsAdjustable) { log.Debug("不适合平差!" + MatrixBuilder.Message); return(null); } // this.Adjustment = new KalmanFilter(MatrixBuilder); this.Adjustment = this.RunAdjuster(BuildAdjustObsMatrix(this.CurrentMaterial)); //固定解 return(BuildResult()); }
/// <summary> /// 初始化 /// </summary> /// <param name="material"></param> public override void Init(PeriodInformation material) { if (material.EnabledPrns.Contains(Prn)) { foreach (var item in material) { if (item[Prn].IsUnstable) { this.HasCycleSlip = true; return; } } this.HasCycleSlip = false; } }
/// <summary> /// 初始化 /// </summary> /// <param name="material"></param> public override void Init(PeriodInformation material) { foreach (var site in material) { if (SiteName == site.SiteName) { this.HasCycleSlip = site.HasCycleSlip(Prn); break; } //if (site[Prn].IsUnstable) //{ // this.HasCycleSlip = true; // return; //} } this.HasCycleSlip = false; }
// GET: PeriodInformation/Edit/5 public ActionResult Edit(Guid id) { PeriodInformation periodInformation = periodInformationService.GetById(id); ViewBag.MainPeriod = periodInformationService.GetActivePeriodInformation().GroupBy(ind => new { ind.LessonYear }).Select(x => new SelectListItem() { Text = x.First().LessonYear, Value = x.First().ID.ToString() }); ViewBag.MainDonem = periodInformationService.GetActivePeriodInformation().GroupBy(ind => new { ind.PeriodName }).Select(x => new SelectListItem() { Text = x.First().PeriodName, Value = x.First().ID.ToString() }); ViewBag.MainPerDonem = periodInformationService.GetActivePeriodInformation().Select(x => new SelectListItem() { Text = x.YearPeriod, Value = x.ID.ToString() }); return(View(periodInformation)); }
public virtual void Init(PeriodInformation epochInfo) { this.Init(epochInfo.First); }
public void Update(PeriodInformation periodInformation) { context.Entry(periodInformation).State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); }
public void Add(PeriodInformation periodInformation) { context.PeriodInformations.Add(periodInformation); context.SaveChanges(); }