private void DeleteStation(Object sender, EventArgs e) { if (!PicesSipperVariables.AllowUpdates()) { return; } if (station == null) { return; } StationDialog sd = new StationDialog(station, dbConn, runLog, false, true); sd.ShowDialog(); this.Text = this.ToString(); if (sd.StationDeleted) { if (this.Parent != null) { this.Parent.Nodes.Remove(this); return; } this.Text = "Station[" + station.StationName + "] ***Deleted***"; this.ContextMenuStrip = null; this.station = null; } } /* DeleteStation */
private void EditStationParameters(Object sender, EventArgs e) { if (station == null) { return; } StationDialog sd = new StationDialog(station, dbConn, runLog, false, false); sd.ShowDialog(); this.Text = this.ToString(); }
} /* DeleteCruise */ private void AddANewStation(Object sender, EventArgs e) { if (!PicesSipperVariables.AllowUpdates()) { return; } if (cruise == null) { return; } PicesSipperStation station = new PicesSipperStation(cruise); StationDialog dd = new StationDialog(station, dbConn, runLog, true, false); dd.ShowDialog(); LoadStationDetails(); this.Text = this.ToString(); }
private void AddStationButton_Click(object sender, EventArgs e) { if (!allowUpdates) { return; } if (this.addingNewCruise) { MessageBox.Show(this, "Can only add stations after you have updated database with new cruise.", "Add a New Station.", MessageBoxButtons.OK); return; } PicesSipperStation station = new PicesSipperStation(cruise); StationDialog sd = new StationDialog(station, dbConn, runLog, true, false); sd.ShowDialog(this); LoadCruiseDetails(); }