protected override string GetCurrentValue() => ThisControl.Mode == DataMode.ManageCandidates ? ElectionsPoliticians.GetIsIncumbentByElectionKeyOfficeKeyPoliticianKey( ThisControl.SafeGetElectionKey(), ThisControl.SafeGetOfficeKey(), ThisControl.GetPoliticianKeyToEdit(), false) .ToString() : string.Empty;
protected override bool Update(object newValue) { if (ThisControl.Mode == DataMode.ManageCandidates) { ElectionsPoliticians.UpdateIsIncumbentByElectionKeyOfficeKeyPoliticianKey( (bool)newValue, ThisControl.SafeGetElectionKey(), ThisControl.SafeGetOfficeKey(), ThisControl.GetPoliticianKeyToEdit()); } return(true); }
protected override void Log(string oldValue, string newValue) { if (ThisControl.Mode == DataMode.ManageCandidates) { LogDataChange.LogUpdate(ElectionsPoliticians.Column.IsIncumbent, oldValue, newValue, VotePage.UserName, SecurePage.UserSecurityClass, DateTime.UtcNow, ThisControl.SafeGetElectionKey(), ThisControl.SafeGetOfficeKey(), ThisControl.GetPoliticianKeyToEdit()); } }