/// <summary> /// Initializes a new instance of the <see cref="EditStationForm"/> class. /// </summary> public EditStationForm(StationsForm form) { this.stationLogic = SWKM.Setup.IoC.Resolve<StationLogic>(); this.stationForm = form; InitializeComponent(); this.Text = this.footerLbl.Text = "Dodaj nową stację"; }
/// <summary> /// Initializes a new instance of the <see cref="EditStationForm"/> class. /// </summary> /// <param name="form">The form.</param> /// <param name="stationId">The station id.</param> public EditStationForm(StationsForm form, int stationId) : this(form) { var station = this.stationLogic.GetStation(stationId); this.stationId = stationId; if (station != null) { this.Text = String.Format("Edytuj {0} stację", station.Object.NAME); this.footerLbl.Text = this.Text; this.stationName.Text = station.Object.NAME; this.stationAddress.Text = station.Object.ADDRESS; this.isAvailableCbx.Checked = station.Object.ISAVAILABLE; } }