private void DeleteCruise(Object sender, EventArgs e) { if (!PicesSipperVariables.AllowUpdates()) { return; } if (cruise == null) { return; } CruiseDialog sd = new CruiseDialog(cruise, dbConn, runLog, false, true); sd.ShowDialog(); this.Text = this.ToString(); if (sd.CruiseDeleted) { if (this.Parent != null) { this.Parent.Nodes.Remove(this); return; } this.Text = "Cruise[" + cruise.CruiseName + "] ***Deleted***"; this.ContextMenuStrip = null; this.cruise = null; } } /* DeleteCruise */
private void EditCruiseParameters(Object sender, EventArgs e) { if (cruise == null) { return; } CruiseDialog sd = new CruiseDialog(cruise, dbConn, runLog, false, false); sd.ShowDialog(); this.Text = this.ToString(); LoadStationDetails(); }
private void AddNewCruiseButton_Click(object sender, EventArgs e) { if (!PicesSipperVariables.AllowUpdates()) { MessageBox.Show(this, "Updates are not allowed.", "Cruise Maintenance", MessageBoxButtons.OK); return; } PicesSipperCruise newCruise = new PicesSipperCruise(); CruiseDialog cd = new CruiseDialog(newCruise, DbConn(), runLog, true, false); cd.ShowDialog(this); if (cd.CruiseAdded) { CruiseTreeList.Nodes.Add(new TreeNodeCruise(DbConn(), runLog, newCruise)); } }