Esempio n. 1
0
        public addNewMembership()
        {
            InitializeComponent();
            db      = new baza();
            dt      = new DateTime();
            dtUntil = new DateTime();
            model   = new List <model>();
            user    = new List <korisnik>();
            model   = db.SelectModel();
            user    = db.Select();
            foreach (model m in model)
            {
                listBoxModel.Items.Add(m);
            }

            foreach (korisnik k in user)
            {
                listBoxUser.Items.Add(k);
            }
        }
Esempio n. 2
0
 public editAll(dataToSend dts)
 {
     InitializeComponent();
     tableName        = dts.getTableName;
     db               = new baza();
     tableFieldNames  = new List <string>();
     tableFieldValues = new List <string>();
     listTextBox      = new List <TextBox>();
     listLabel        = new List <Label>();
     MessageBox.Show(dts.getNumber);
     if (dts.getNumber == "1")
     {
         actor = new List <glumac>();
         actor = db.SelectActor();
         createInterface(actor);
     }
     else if (dts.getNumber == "2")
     {
         model = new List <model>();
         model = db.SelectModel();
         createInterface(model);
     }
     else if (dts.getNumber == "3")
     {
         user = new List <korisnik>();
         user = db.Select();
         createInterface(user);
     }
     else if (dts.getNumber == "4")
     {
         address = new List <adresa>();
         address = db.SelectAddress();
         createInterface(address);
     }
     else if (dts.getNumber == "5")
     {
         movie = new List <film>();
         movie = db.SelectMovie();
         createInterface(movie);
     }
     else if (dts.getNumber == "6")
     {
         distributor = new List <distributer>();
         distributor = db.SelectDistributor();
         createInterface(distributor);
     }
     else if (dts.getNumber == "7")
     {
         nationality = new List <nacionalnost>();
         nationality = db.SelectNationality();
         createInterface(nationality);
     }
     else if (dts.getNumber == "8")
     {
         director = new List <redatelj>();
         director = db.SelectDirector();
         createInterface(director);
     }
     //txtBoxField1.Margin = new Thickness(10, 10, 10, 10);
     //stackPanelMain.Children.Add(txtBoxField1);
     //stackPanelMain.Children.Add(textBoxField2);
 }