private void SetForceDisableAll(object sender, EventArgs e) { MaidInfo maid = SelectedMaid; Debugger.Assert(() => { foreach (var noonWork in ScheduleCSVData.NoonWorkData) { maid.SetWorkValue(noonWork.Value.id, TABLE_COLUMN_HAS, false); } foreach (var nightWork in ScheduleCSVData.NightWorkData) { maid.SetNightWorkValue(nightWork.Value.id, false); maid.UpdateNightWorkValue(nightWork.Value.id); } }, "Failed to force all work disabled"); }
private void OnNightWorkCellChanged(object sender, DataGridViewCellEventArgs e) { if (clearingTables || e.ColumnIndex != TABLE_COLUMN_HAS) { return; } MaidInfo maid = SelectedMaid; if (maid == null) { return; } int workID = rowToNightWorkID[e.RowIndex]; if (!updateNightWorkTable) { maid.UpdateNightWorkValue(workID); } updateNightWorkTable = false; }