Пример #1
0
        private void buttonObisati_Click(object sender, EventArgs e)
        {
            Action action;

            action = new DeleteAction(termin);
            DataControllercs.addAction(action);
        }
Пример #2
0
        public override Action GetReverseAction()
        {
            DeleteAction d = new DeleteAction(o);

            d.timeOfCreation = timeOfCreation;
            d.termini        = termini;
            return(d);
        }
Пример #3
0
 private void buttonOrisi_Click(object sender, EventArgs e)
 {
     try {
         int             index       = dataGridView1.CurrentCell.RowIndex;
         DataGridViewRow selectedRow = dataGridView1.Rows[index];
         string          id          = selectedRow.Cells[0].Value.ToString();
         System.Diagnostics.Debug.WriteLine(id);
         //brisanje ovde
         Software     software = DataManger.GetSoftverID(id);
         DeleteAction d        = new DeleteAction(software);
         DataControllercs.addAction(d);
     }
     catch {
     }
 }
Пример #4
0
 private void buttonObrisi_Click(object sender, EventArgs e)
 {
     try
     {
         int             index       = dataGridView1.CurrentCell.RowIndex;
         DataGridViewRow selectedRow = dataGridView1.Rows[index];
         string          id          = selectedRow.Cells[0].Value.ToString();
         System.Diagnostics.Debug.WriteLine(id);
         Predmet      predmet = DataManger.getPredmetByID(id);
         DeleteAction d       = new DeleteAction(predmet);
         DataControllercs.addAction(d);
     }
     catch
     {
     }
 }
Пример #5
0
        private void buttonObrisiPredmet_Click(object sender, EventArgs e)
        {
            Predmet p = listBoxPredmeti.SelectedItem as Predmet;

            if (p != null)
            {
                listBoxPredmeti.Items.Remove(p);
                if (!isCreate)
                {
                    if (!actionAdded)
                    {
                        DataControllercs.addAction(editAction);
                        actionAdded = true;
                    }

                    DeleteAction d = new DeleteAction(p);
                    DataControllercs.addAction(d);
                }
            }
        }
Пример #6
0
        internal override void excuteAction()
        {
            o.Delete();
            DeleteAction deleteA;

            if (o is Smer)
            {
                Smer s = o as Smer;
                termini = DataManger.getTerminsBySmer(s);
            }
            else if (o is Predmet)
            {
                Predmet p = o as Predmet;
                termini = DataManger.getTerminsByPredmet(p);
            }
            foreach (Termin t in termini)
            {
                deleteA = new DeleteAction(t);
                deleteA.excuteAction();
            }
            base.excuteAction();
        }