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