private void myEventDelete_Click(object sender, EventArgs e)
        {
            login log  = new login();
            int   iden = log.identity();

            string       sql = "DELETE ROW FROM InterestTable WHERE (title = ? AND user = ?)";
            OleDbCommand cmd = new OleDbCommand(sql, con);

            try
            {
                con.Open();

                cmd.Parameters.AddWithValue("@title", title.Text);
                cmd.Parameters.AddWithValue("@user", iden);

                cmd.ExecuteNonQuery();
                MessageBox.Show("Το event διαγράφηκε από τα αποθηκευμένα :(");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            con.Close();
            this.Close();
            myEvents my = new myEvents();

            my.Show();
        }
Beispiel #2
0
        private void linkLabel1_LinkClicked_1(object sender, LinkLabelLinkClickedEventArgs e)
        {
            login        log = new login();
            int          id  = log.identity();
            string       sql = "SELECT * FROM InterestTable WHERE [user]=" + id + "";
            OleDbCommand cmd = new OleDbCommand(sql, con);

            adapter1 = new OleDbDataAdapter(cmd);
            adapter1.Fill(table1);
            if (table1.Rows.Count == 0)
            {
                MessageBox.Show("Δεν υπάρχουν αποθηκευμένα event για παρακολούθηση!");
            }
            else
            {
                myEvents my = new myEvents();
                my.Show();
            }
        }