Exemplo n.º 1
0
 public List <string> GetListName()
 {
     using (BalansContext context = new BalansContext())
     {
         return(context.LangVreemdVermogen.Select(Entry => Entry.Name).ToList());
     }
 }
Exemplo n.º 2
0
 public List <string> GetListName()
 {
     using (BalansContext context = new BalansContext())
     {
         return(context.VlottendeActiva.Select(Entry => Entry.Name).ToList());
     }
 }
Exemplo n.º 3
0
 public List <VasteActiva> GetListObjects()
 {
     using (BalansContext context = new BalansContext())
     {
         return(context.VasteActiva.ToList());
     }
 }
Exemplo n.º 4
0
 public void RemoveEntry(string name)
 {
     using (BalansContext context = new BalansContext())
     {
         var EntrytoRemove = context.LangVreemdVermogen.Where(e => e.Name == name).FirstOrDefault();
         context.LangVreemdVermogen.Remove(EntrytoRemove);
         context.SaveChanges();
     }
 }
Exemplo n.º 5
0
 public void AddEntry(string name)
 {
     using (BalansContext context = new BalansContext())
     {
         bool Entryexists = context.LangVreemdVermogen.Where(e => e.Name == name).Any();
         if (Entryexists)
         {
             MessageBox.Show("This entry already exits");
         }
         context.LangVreemdVermogen.Add(new LangVreemdVermogen {
             Name = name
         });
         context.SaveChanges();
     }
 }
Exemplo n.º 6
0
 public void AddEntry(string name)
 {
     using (BalansContext context = new BalansContext())
     {
         bool Entryexists = context.VlottendeActiva.Where(e => e.Name == name).Any();
         if (Entryexists)
         {
             MessageBox.Show("This entry already exits");
         }
         context.VlottendeActiva.Add(new VlottendeActiva {
             Name = name
         });
         context.SaveChanges();
     }
 }
Exemplo n.º 7
0
        public Dictionary <string, int> GetActiva()
        {
            Dictionary <string, int> Activa = new Dictionary <string, int>();

            using (BalansContext context = new BalansContext())
            {
                Activa.Add("Vaste activa", -1);
                foreach (VasteActiva VasteActiva in context.VasteActiva)
                {
                    Activa.Add(VasteActiva.Name, VasteActiva.Value);
                }
                Activa.Add("Vlottende activa", -1);
                foreach (VlottendeActiva VlottendeActiva in context.VlottendeActiva)
                {
                    Activa.Add(VlottendeActiva.Name, VlottendeActiva.Value);
                }
            }
            return(Activa);
        }
Exemplo n.º 8
0
        public Dictionary <string, int> GetPassiva()
        {
            Dictionary <string, int> Passiva = new Dictionary <string, int>();

            using (BalansContext context = new BalansContext())
            {
                Passiva.Add("Eigenvermogen", -1);
                foreach (EigenVermogen EigenVermogen  in context.EigenVermogen)
                {
                    Passiva.Add(EigenVermogen.Name, EigenVermogen.Value);
                }
                Passiva.Add("Langvreemdvermogen", -1);
                foreach (LangVreemdVermogen LangVreemdVermogen in context.LangVreemdVermogen)
                {
                    Passiva.Add(LangVreemdVermogen.Name, LangVreemdVermogen.Value);
                }
                Passiva.Add("Kortvreemdvermogen", -1);
                foreach (KortVreemdVermogen KortVreemdVermogen in context.KortVreemdVermogen)
                {
                    Passiva.Add(KortVreemdVermogen.Name, KortVreemdVermogen.Value);
                }
            }
            return(Passiva);
        }