Exemplo n.º 1
0
 public MainViewModel()
 {
     _dal     = new DAL();
     Kupcis   = new KupcisViewModel(_dal);
     Robas    = new RobasViewModel(_dal);
     RevRobas = new RevRobasViewModel(_dal, Robas.Robas);
     Racunis  = new RacunisViewModel(_dal, Kupcis.Kupcis, Robas.Robas);
 }
Exemplo n.º 2
0
        public MainViewModel()
        {
            var dal = new DAL();

            Kupcis = new KupcisViewModel(dal);
            Robas  = new RobasViewModel(dal);
            var revRobas = dal.GetRevRoba().Select(x => new RevRobaViewModel(x, Robas.Robas));

            Racunis = new RacunisViewModel(dal, Kupcis.Kupcis, revRobas);

            var TempFolder = Path.Combine(Path.GetTempPath(), "Stampa");

            if (Directory.Exists(TempFolder))
            {
                Directory.Delete(TempFolder, true);
            }
        }