public void InitialSetup()
 {
     if (SelectedPeriod == null)
     {
         SelectedPeriod = Periods.First();
         //LoadObservationDataForPeriod();
     }
 }
Example #2
0
 public Period GetPeriod(int periodId)
 {
     if (Periods.Any(c => c.PeriodId == periodId))
     {
         return(Periods.First(c => c.PeriodId == periodId));
     }
     return(null);
 }
Example #3
0
 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;
     }
 }
Example #4
0
        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;
            }
        }