예제 #1
0
        /// <summary>
        /// Set the values of this object to the values of the dummy object, if the dummys value is non-null.
        /// </summary>
        /// <param name="dummy">
        /// The dummy object, representing new values.
        /// </param>
        public void UpdateValues(IDataObject dummy)
        {
            PollingStationDO pollingDummy = dummy as PollingStationDO;

            Contract.Assert(pollingDummy != null);

            this.Address        = pollingDummy.Address ?? this.Address;
            this.PrimaryKey     = pollingDummy.PrimaryKey ?? this.PrimaryKey;
            this.MunicipalityId = pollingDummy.MunicipalityId ?? this.MunicipalityId;
            this.Name           = pollingDummy.Name ?? this.Name;
        }
 /// <summary> Make this polling station the selected polling station. </summary>
 /// <param name="pollingStation">The polling station to be selected.</param>
 public void UpdateSelectedPollingStation(PollingStationDO pollingStation)
 {
     this.cbxPollingStation.SelectedIndex = this.cbxPollingStation.Items.IndexOf(pollingStation);
 }
예제 #3
0
 /// <summary> Initializes a new instance of the <see cref="VoterFilter"/> class. </summary>
 /// <param name="municipality"> The selected municipality (null means not selected).</param>
 /// <param name="pollingStation"> The Selected polling station (null means not selected). </param>
 /// <param name="cprno"> The selected CPR number (0 means not selected). </param>
 public VoterFilter(MunicipalityDO municipality = null, PollingStationDO pollingStation = null, int cprno = 0)
 {
     this.Municipality = municipality;
     this.PollingStation = pollingStation;
     this.CPRNO = cprno;
 }