Example #1
0
        bool view_Imp(DatabaseAdapter db)
        {
            //Import i = new Import(db);
            //i.ShowDialog();

            return(true);
        }
Example #2
0
 public Produktverwaltung(DatabaseAdapter db)
 {
     InitializeComponent();
     this.db = db;
     cntrl   = new ControllerProdukt(db, this);
     cntrl.onCreateView();
 }
Example #3
0
        bool view_hauptmenue(DatabaseAdapter db)
        {
            Hauptmenue frm = new Hauptmenue(db);

            frm.ShowDialog();
            return(true);
        }
Example #4
0
        public async void asyncTryToConnect(DatabaseAdapter db)
        {
            DateTime jetzt  = DateTime.Now;
            bool     result = false;

            try
            {
                result = await handleTryToConnect(db);
            }
            catch
            {
                infoBox.Dispatcher.BeginInvoke(new Action(() => { infoBox.Text += "...Verbindungsfehler."; }));
                return;
            }

            if (result)
            {
                TimeSpan difference = DateTime.Now - jetzt;
                infoBox.Dispatcher.BeginInvoke(new Action(() => { infoBox.Text += "...erfolgreich (" + difference.TotalSeconds + " s)"; }));
                Application.Current.Dispatcher.BeginInvoke(new Action(() => { view_Imp(db); }));
            }
            else
            {
                await infoBox.Dispatcher.BeginInvoke((Action)(() => infoBox.Text += "...fehlgeschlagen."));
            }
        }
Example #5
0
 public KriteriumTree(DatabaseAdapter db, Kriterium objekt)
 {
     InitializeComponent();
     cntrl = new ControllerKriterium(db, this);
     cntrl.onCreateView();
     cntrl.anzeigen(objekt);
 }
Example #6
0
 public KriteriumNutzwertVerwaltung(DatabaseAdapter db, Nutzwert objekt)
 {
     InitializeComponent();
     cntrl = new ControllerKriterium(db, this);
     cntrl.onCreateView();
     cntrl.anzeigen(objekt);
 }
Example #7
0
 public Produkt_anlegen(DatabaseAdapter db)
 {
     InitializeComponent();
     this.db = db;
     cprod   = new ControllerProdukt(db, this);
     cprod.anzeigen(new Produkt());
 }
Example #8
0
 public Import(DatabaseAdapter db)
 {
     InitializeComponent();
     this.db = db;
     cp      = new ControllerProjekt(db, this);
     cp.onCreateView();
 }
Example #9
0
        public Controller(DatabaseAdapter db, Window frm)
        {
            this.db = db;

            this.frm = frm;
            onCreateView();
        }
 public NutzwertVerwaltung(DatabaseAdapter db)
 {
     InitializeComponent();
     cntrl = new ControllerNutzwert(db, this);
     //cntrl.onCreateView();
     cntrl.onUpdateData();
 }
Example #11
0
 public Export(DatabaseAdapter db)
 {
     InitializeComponent();
     this.db = db;
     cp      = new ControllerProjekt(db, this);
     textProjektIDexp.Text   = Projekt.getProjektIDtemp().ToString();
     textBezeichnungexp.Text = Projekt.getBezeichnungtemp();
 }
Example #12
0
        bool view_Exp(DatabaseAdapter db)
        {
            Export e = new Export(db);

            e.ShowDialog();

            return(true);
        }
Example #13
0
        public Produkt_aendern(DatabaseAdapter db)
        {
            InitializeComponent();
            this.db = db;
            cntrl   = new ControllerProdukt(db, this);

            textProduktIDaendern.Text   = Produkt.getProduktIDtemp().ToString();
            textBezeichnungaendern.Text = Produkt.getBezeichnungtemp();
        }
Example #14
0
        public Nutzwert getNutzwert(DatabaseAdapter db, int ProjektID = 0, int ProduktID = 0)
        {
            List <Nutzwert> temp_list = db.get(new Nutzwert(KriteriumID: getKriteriumID(), ProjektID: ProjektID, ProduktID: ProduktID));

            if (temp_list.Count > 1 || temp_list.Count < 1)
            {
                throw new NotImplementedException();
            }
            return(temp_list[0]);
        }
Example #15
0
        public Kriterium getKriterium(DatabaseAdapter db)
        {
            Kriterium        temp_kriterium = new Kriterium(ID: getKriteriumID());
            List <Kriterium> temp_list      = db.get(temp_kriterium);

            if (temp_list.Count > 1 || temp_list.Count < 1)
            {
            }
            return(temp_list[0]);
        }
Example #16
0
 private async void asyncDummyKriterien(DatabaseAdapter db)
 {
     for (int i = 0; i <= 80000; i++)
     {
         Kriterium temp_objekt = new Kriterium();
         temp_objekt.setBezeichnung("DUMMY NO " + i);
         infoBox.Dispatcher.BeginInvoke(new Action(() => { infoBox.Text += "."; }));
         db.insert(temp_objekt);
     }
     infoBox.Dispatcher.BeginInvoke(new Action(() => { infoBox.Text += "...Kirtierien-Dummys eingefügt."; }));
 }
Example #17
0
 async Task <bool> handleTryToConnect(DatabaseAdapter db)
 {
     if (db.checkConnection())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #18
0
        public void addUnterKriterium(Kriterium objekt, DatabaseAdapter db)
        {
            if (objekt == null)
            {
                return;
            }
            Kriteriumstruktur temp_objekt = new Kriteriumstruktur(this.KriteriumID, objekt.getKriteriumID());

            if (db.get(temp_objekt).Count() == 0)
            {
                db.insert(temp_objekt);
            }
        }
Example #19
0
        public void removeUnterKriterium(Kriterium objekt, DatabaseAdapter db)
        {
            if (objekt == null)
            {
                return;
            }
            Kriteriumstruktur temp_objekt = new Kriteriumstruktur(this.KriteriumID, objekt.getKriteriumID());

            if (db.get(temp_objekt).Count() > 0)
            {
                db.delete(temp_objekt);
            }
        }
Example #20
0
 public bool isOberKriterium(Kriterium objekt, DatabaseAdapter db)
 {
     foreach (Kriterium temp_krit in this.getOberKriterium(db))
     {
         if (temp_krit.getKriteriumID() == objekt.getKriteriumID())
         {
             return(true);
         }
         if (temp_krit.isOberKriterium(objekt, db))
         {
             return(true);
         }
     }
     return(false);
 }
Example #21
0
        public List <Kriterium> getUnterKriterium(DatabaseAdapter db)
        {
            Kriteriumstruktur temp_objekt = new Kriteriumstruktur(OberKriteriumID: this.getKriteriumID(), UnterKriteriumID: -1);
            List <Kriterium>  return_list = new List <Kriterium>();
            Kriterium         temp_krit;

            foreach (Kriteriumstruktur temp_kritstruktur in db.get(temp_objekt))
            {
                temp_krit = new Kriterium(temp_kritstruktur.getUnterKriteriumID());
                foreach (Kriterium temp_krit2 in db.get(temp_krit))
                {
                    return_list.Add(temp_krit2);
                }
            }
            return(return_list);
        }
Example #22
0
        public List <Kriterium> getRootKriterium(DatabaseAdapter db)
        {
            List <Kriterium> temp_list   = this.getOberKriterium(db);
            List <Kriterium> return_list = new List <Kriterium>();

            if (temp_list.Count == 0)
            {
                return_list.Add(this);
            }
            foreach (Kriterium temp_objekt in temp_list)
            {
                foreach (Kriterium temp_objekt2 in temp_objekt.getRootKriterium(db))
                {
                    return_list.Add(temp_objekt2);
                }
            }
            return(return_list);
        }
Example #23
0
        public List <Kriterium> getOberKriterium(DatabaseAdapter db)
        {
            Kriteriumstruktur temp_objekt = new Kriteriumstruktur(UnterKriteriumID: this.getKriteriumID(), OberKriteriumID: -1);
            List <Kriterium>  return_list = new List <Kriterium>();
            Kriterium         temp_krit;

            foreach (Kriteriumstruktur temp_kritstruktur in db.get(temp_objekt))
            {
                temp_krit = new Kriterium(temp_kritstruktur.getOberKriteriumID());
                foreach (Kriterium temp_krit2 in db.get(temp_krit))
                {
                    return_list.Add(temp_krit2);
                }
            }

            if (return_list.Count > 1)
            {
                throw new NotImplementedException();
            }
            else
            {
                return(return_list);
            }
        }
Example #24
0
 abstract public void exp(Model objekt, DatabaseAdapter db, bool savetofile);
Example #25
0
 public Einstellungen(DatabaseAdapter db)
 {
     this.db = db;
     InitializeComponent();
 }
Example #26
0
 //Hauptverantworticher: Huber
 public ControllerProdukt(DatabaseAdapter db, Window frm) : base(db, frm)
 {
 }
Example #27
0
 public Hauptmenue(DatabaseAdapter db)
 {
     this.db = db;
     InitializeComponent();
 }
Example #28
0
 //Hauptverantworticher: Tektas
 public ControllerProjekt(DatabaseAdapter db, Window frm) : base(db, frm)
 {
 }                                                                         //Konstruktor
 public ControllerKriterium(DatabaseAdapter db, Window frm) : base(db, frm)
 {
 }
 //Erzeugen des Objekts der ControllerKriterium Klasse
 public Kriteriumverwaltung(DatabaseAdapter db)
 {
     InitializeComponent();
     cntrl = new ControllerKriterium(db, this);
     cntrl.onCreateView();
 }