Ejemplo n.º 1
0
        private void AddDeploymentButton_Click(object sender, EventArgs e)
        {
            if (!allowUpdates)
            {
                return;
            }

            if (this.addingNewStation)
            {
                MessageBox.Show(this, "Can only add deployments after the Station entry has been inserted into database.", "Add a New Station.", MessageBoxButtons.OK);
                return;
            }
            PicesSipperDeployment deployment = new PicesSipperDeployment(station.CruiseName, station.StationName);

            deployment.Latitude  = station.Latitude;
            deployment.Longitude = station.Longitude;
            if (Deployments.Nodes.Count < 1)
            {
                deployment.DeploymentNum = "A";
            }

            DeploymentDialog dd = new DeploymentDialog(deployment, true, false);

            dd.ShowDialog(this);
            LoadDeploymentDetails();
        }
Ejemplo n.º 2
0
        private void  EditDeploymentParameters(Object sender, EventArgs e)
        {
            DeploymentDialog sdd = new DeploymentDialog(deployment, false, false);

            sdd.ShowDialog();
            Text = ToString();
        }
Ejemplo n.º 3
0
        private void  DeleteDeployment(Object sender, EventArgs e)
        {
            if (!allowUpdates)
            {
                return;
            }

            DeploymentDialog sdd = new DeploymentDialog(deployment, false, true);

            sdd.ShowDialog();
            if (sdd.DeploymentDeleted)
            {
                if (this.Parent != null)
                {
                    Parent.Nodes.Remove(this);
                    return;
                }
                this.ContextMenuStrip = null;
                Text       = "Deployment[" + deployment.DeploymentNum + "]   ***Deleted***";
                deployment = null;
            }
        } /* DeleteDeployment */
Ejemplo n.º 4
0
        } /* DeleteStation */

        private void  AddANewDeployment(Object sender, EventArgs e)
        {
            if (!PicesSipperVariables.AllowUpdates())
            {
                return;
            }

            if (station == null)
            {
                return;
            }
            PicesSipperDeployment deployment = new PicesSipperDeployment(station.CruiseName, station.StationName);

            deployment.Latitude      = station.Latitude;
            deployment.Longitude     = station.Longitude;
            deployment.DeploymentNum = nextDeploymentNum;

            DeploymentDialog dd = new DeploymentDialog(deployment, true, false);

            dd.ShowDialog();
            LoadDeploymentDetails();
            this.Text = this.ToString();
        }