public Form1() { InitializeComponent(); EnableDisable(1); user = new Users(); db = new LoadFromDB(user); cr_user = new CreateUser(); add_item = new AddItemToList(); user_login = new UserLogin(); comboBox1.DataSource = db.Load_Grocery_List("public"); }
//Login private void button1_Click(object sender, EventArgs e) { user = null; string username = usernameBox.Text; string password = passwordBox.Text; user = user_login.UserLoginCheck(username, password); if (user == null) { EnableDisable(1); } else { EnableDisable(0); label3.Text = "Username: " + user.username; db = new LoadFromDB(user); comboBox2.DataSource = db.Load_Items_List(); } CleanBox(); }