示例#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();
        }