Beispiel #1
0
        protected override void EditRow()
        {
            TimeSlot timeSlot        = _context.TimeSlots.Find(tblTimeSlot.Rows[tblTimeSlot.CurrentCell.RowIndex].Cells["colId"].Value);
            var      frmTimeSlotEdit = new TimeSlotEdit(timeSlot);

            frmTimeSlotEdit.ShowDialog();
            if (frmTimeSlotEdit.DialogResult == DialogResult.Cancel)
            {
                return;
            }

            Save();
        }
Beispiel #2
0
        protected override void AddRow()
        {
            TimeSlot timeSlot        = new TimeSlot();
            var      frmTimeSlotEdit = new TimeSlotEdit(timeSlot);

            frmTimeSlotEdit.ShowDialog();
            if (frmTimeSlotEdit.DialogResult == DialogResult.Cancel)
            {
                return;
            }
            DataService.context.TimeSlots.Add(timeSlot);
            Save();
        }