Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
        //Load Grocer List with permission public/private/shared
        private void button7_Click(object sender, EventArgs e)
        {
            dataGridView1.DataSource = null;
            comboBox1.DataSource     = null;

            if (radioButton1.Checked)
            {
                comboBox1.DataSource = db.Load_Grocery_List("public");
                label4.Text          = "Public Grocery Lists";
                button6.Enabled      = false;
            }
            else if (radioButton2.Checked)
            {
                comboBox1.DataSource = db.Load_Grocery_List("private");
                label4.Text          = "User Grocery Lists";
                button6.Enabled      = true;
            }
            else if (radioButton3.Checked)
            {
                comboBox1.DataSource = db.Load_Grocery_List("shared");
                label4.Text          = "Shared from other \n users Grocery Lists";
                button6.Enabled      = false;
            }
        }