public void InitialSetup() { if (SelectedPeriod == null) { SelectedPeriod = Periods.First(); //LoadObservationDataForPeriod(); } }
public Period GetPeriod(int periodId) { if (Periods.Any(c => c.PeriodId == periodId)) { return(Periods.First(c => c.PeriodId == periodId)); } return(null); }
public ReceiptBookVM() { allLiquidationFixedDatas.Select(lfd => lfd.period).Distinct().ToList().ForEach(p => Periods.Add(p, p.ToString("MMMM/yyyy").ToUpper())); if (Periods.Count > 0) { Period = Periods.First().Key; } }
public ReceiptVM() { allLiquidationFixedDatas.Select(lfd => lfd.period).Distinct().ToList().ForEach(p => Periods.Add(p, p.ToString("MMMM/yyyy").ToUpper())); allLiquidationFixedDatas.ForEach(lfd => { if (lfd.Employees_liquidated.Where(el => el.issue).Count() == lfd.Employees_liquidated.Count()) { lfd.emited = true; } else { if (lfd.Employees_liquidated.Where(el => el.issue).Count() > 0) { lfd.generated = true; } } }); LiquidationFixedDatas = new ObservableCollection <Liquidation_fixed_datas>(allLiquidationFixedDatas); if (Periods.Count > 0) { Period = Periods.First().Key; } }