Ejemplo n.º 1
0
     protected override string GetCurrentValue() =>
     ThisControl.Mode == DataMode.ManageCandidates
 ? ElectionsPoliticians.GetIsIncumbentByElectionKeyOfficeKeyPoliticianKey(
         ThisControl.SafeGetElectionKey(), ThisControl.SafeGetOfficeKey(),
         ThisControl.GetPoliticianKeyToEdit(), false)
     .ToString()
 : string.Empty;
Ejemplo n.º 2
0
 protected override bool Update(object newValue)
 {
     if (ThisControl.Mode == DataMode.ManageCandidates)
     {
         ElectionsPoliticians.UpdateIsIncumbentByElectionKeyOfficeKeyPoliticianKey(
             (bool)newValue, ThisControl.SafeGetElectionKey(), ThisControl.SafeGetOfficeKey(),
             ThisControl.GetPoliticianKeyToEdit());
     }
     return(true);
 }
Ejemplo n.º 3
0
 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());
     }
 }