Exemplo n.º 1
0
 private void submitButton_Click(object sender, EventArgs e)
 {
     ((Event)evtSource.Current).dateKey = DateTime.Parse(mainFrm.getTP().ToShortDateString() + " "
                                                         + this.dateTimePicker.Value.ToShortTimeString());
     result = (Event)evtSource.Current;
     this.Close();
 }
Exemplo n.º 2
0
        private void editButton_Click(object sender, EventArgs e)
        {
            ((Event)evtSource.Current).dateKey = DateTime.Parse(mainFrm.getTP().ToShortDateString() + " "
                                                                + this.dateTimePicker.Value.ToShortTimeString());
            result = (Event)evtSource.Current;
            Event    evt     = result;
            String   dt      = mainFrm.dateLabel.Text;
            string   tString = mainFrm.listView2.SelectedItems[0].SubItems[0].Text;
            Schedule sch     = mainFrm.s.GetByDate(dt);
            string   _dt     = dt + " " + tString;

            if (!evt.dateKey.Equals(DateTime.MinValue))
            {
                mainFrm.evtDb.Edit(evt, _dt);
                mainFrm.UpdateSch(sch, dt);
                mainFrm.SetListView2(sch.Events);
            }
            this.Dispose();
        }