Beispiel #1
0
        /// <summary>
        /// This event fires when the user click on the Cancel Button
        ///     It turns off all the controls to make up Crews
        ///     It deletes the crew that is currently being formed
        ///     It refreshes the Current Crews List
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Cancel_Click(object sender, EventArgs e)
        {
            EmployeeGridView.Visible = false;
            SelectUnitDDL.Visible    = false;
            FleetCategory.ClearSelection();
            Done.Visible          = false;
            Cancel.Visible        = false;
            CreateCrew.Visible    = false;
            MakeCrew.Visible      = true;
            LastCrews.Visible     = true;
            FleetCategory.Visible = false;

            //Deletes the crew in formation.
            InfoUserControl.TryRun(() =>
            {
                if (!string.IsNullOrEmpty(CrewID.Text))
                {
                    int crewId = int.Parse(CrewID.Text);
                    CrewController crewManager = new CrewController();
                    crewManager.DeleteCrew(crewId);
                    CrewID.Text = "";
                    RefreshCurrentCrews();
                }
            });
        }
Beispiel #2
0
 protected void CloseCrewPane()
 {
     RefreshCrewMember();
     RefreshCurrentCrews();
     EmployeeGridView.Visible = false;
     SelectUnitDDL.Visible    = false;
     FleetCategory.ClearSelection();
     Done.Visible       = false;
     CreateCrew.Visible = false;
     Cancel.Visible     = false;
 }