Пример #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)
        {
            MunicipalityDO municipalityDummy = dummy as MunicipalityDO;

            Contract.Assert(municipalityDummy != null);

            this.Address = municipalityDummy.Address ?? this.Address;
            this.City    = municipalityDummy.City ?? this.City;
            this.Id      = municipalityDummy.Id ?? this.Id;
            this.Name    = municipalityDummy.Name ?? this.Name;
        }
 /// <summary> Make this municipality the selected municipality. </summary>
 /// <param name="municipality">The municipality to be selected.</param>
 public void UpdateSelectedMunicipality(MunicipalityDO municipality)
 {
     this.cbxMunicipalities.SelectedIndex = this.cbxMunicipalities.Items.IndexOf(municipality);
 }
Пример #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;
 }