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 UpdateNightWorkCell(int col, int row) { if (col != TABLE_COLUMN_HAS) { return; } MaidInfo maid = SelectedMaid; if (maid == null) { return; } bool val = !(bool)dataGridView_night_work[col, row].Value; int workID = rowToNightWorkID[row]; if (!updateNightWorkTable) { maid.SetNightWorkValue(workID, val); } updateNightWorkTable = false; }