Exemplo n.º 1
0
        protected void ClearButton_Click(object sender, EventArgs e)
        {
            TeamList.ClearSelection();
            Coach.Text          = null;
            AssistantCoach.Text = null;
            Wins.Text           = "0";
            Losses.Text         = "0";

            TeamListV2.ClearSelection();
            TeamNameV2.Text       = null;
            CoachNameV2.Text      = null;
            AssistantCoachV2.Text = null;
            WinsV2.Text           = "0";
            LossesV2.Text         = "0";

            TeamListV3.ClearSelection();
            TeamIDV3.Text         = null;
            TeamNameV3.Text       = null;
            CoachV3.Text          = null;
            AssistantCoachV3.Text = null;
            WinsV3.Text           = "0";
            LossesV3.Text         = "0";

            TeamListV4.ClearSelection();
            TeamIDV4.Text         = null;
            TeamNameV4.Text       = null;
            CoachV4.Text          = null;
            AssistantCoachV4.Text = null;
            WinsV4.Text           = "0";
            LossesV4.Text         = "0";
        }
Exemplo n.º 2
0
 protected void Clear(object sender, EventArgs e)
 {
     PlayerID.Text  = "";
     FirstName.Text = "";
     Age.Text       = "";
     GuardianList.ClearSelection();
     TeamList.ClearSelection();
 }
Exemplo n.º 3
0
 protected void ClearButton_Click(object sender, EventArgs e)
 {
     TeamList.ClearSelection();
     Teaminfo            = null;
     Coach.Text          = null;
     AssistantCoach.Text = null;
     Wins.Text           = "0";
     Losses.Text         = "0";
 }
Exemplo n.º 4
0
 protected void Clear_Fields(object sender, EventArgs e)
 {
     GuardianList.ClearSelection();
     TeamList.ClearSelection();
     FirstName.Text           = "";
     LastName.Text            = "";
     Age.Text                 = "";
     Gender.Text              = "";
     AHCN.Text                = "";
     MedicalAlertDetails.Text = "";
 }
 protected void Clear(object sender, EventArgs e)
 {
     TextBox1.Text = "";
     TextBox2.Text = "";
     TextBox3.Text = "";
     GuardianList.ClearSelection();
     TeamList.ClearSelection();
     TextBox6.Text = "";
     TextBox7.Text = "";
     TextBox8.Text = "";
     TextBox9.Text = "";
 }
Exemplo n.º 6
0
 protected void Clear(object sender, EventArgs e)
 {
     PlayerID.Text  = "";
     FirstName.Text = "";
     LastName.Text  = "";
     Age.Text       = "";
     Gender.Text    = "";
     AlbertaHealthCareNumber.Text = "";
     MedicalAlertDetails.Text     = "";
     TeamList.ClearSelection();
     GuardianList.ClearSelection();
 }
Exemplo n.º 7
0
 protected void Clear(object sender, EventArgs e)
 {
     ID.Text        = "";
     FirstName.Text = "";
     LastName.Text  = "";
     Age.Text       = "";
     Gender.Text    = "";
     ABHealth.Text  = "";
     TeamList.ClearSelection();
     GuardianList.ClearSelection();
     MedicalAlert.Text = "";
 }
 protected void Clear(object sender, EventArgs e)
 {
     ID.Text     = "";
     FName.Text  = "";
     LName.Text  = "";
     Age.Text    = "";
     Gender.Text = "";
     HCard.Text  = "";
     MAlert.Text = "";
     TeamList.ClearSelection();
     GuardianList.ClearSelection();
 }
Exemplo n.º 9
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     PlayerID.Text = "";
     TeamList.ClearSelection();
     GuardianList.ClearSelection();
     FirstName.Text               = "";
     LastName.Text                = "";
     Age.Text                     = "";
     RadioMale.Checked            = false;
     RadioFemale.Checked          = false;
     AlbertaHealthcareNumber.Text = "";
     MedicalAlertDetails.Text     = "";
 }
Exemplo n.º 10
0
        protected void DeletePlayer_Click(object sender, EventArgs e)
        {
            int playerid = 0;

            if (string.IsNullOrEmpty(PlayerID.Text))
            {
                errormsgs.Add("Search for a player to delete");
            }
            else if (!int.TryParse(PlayerID.Text, out playerid))
            {
                errormsgs.Add("Player ID is invalid");
            }
            else if (playerid < 1)
            {
                errormsgs.Add("Product ID is invalid");
            }


            if (errormsgs.Count > 0)
            {
                LoadMessageDisplay(errormsgs, "alert alert-danger");
            }
            else
            {
                try
                {
                    PlayerController sysmgr = new PlayerController();

                    int rowsaffected = sysmgr.Player_Delete(playerid);
                    if (rowsaffected > 0)
                    {
                        errormsgs.Add("Player has been deleted");
                        LoadMessageDisplay(errormsgs, "alert alert-success");
                        BindPlayerList();

                        PlayerID.Text = "";
                        GuardianList.ClearSelection();
                        TeamList.ClearSelection();
                        FirstName.Text = "";
                        LastName.Text  = "";
                        Age.Text       = "";
                        Gender.ClearSelection();
                        AlbertaHealthCareNumber.Text = "";
                        MedicalAlertDetails.Text     = "";

                        PlayerList.ClearSelection();
                    }
                    else
                    {
                        errormsgs.Add("Player has not been deleted. Player was not found.");
                        LoadMessageDisplay(errormsgs, "alert alert-info");
                        BindPlayerList();
                    }
                }
                catch (DbUpdateException ex)
                {
                    UpdateException updateException = (UpdateException)ex.InnerException;
                    if (updateException.InnerException != null)
                    {
                        errormsgs.Add(updateException.InnerException.Message.ToString());
                    }
                    else
                    {
                        errormsgs.Add(updateException.Message);
                    }
                    LoadMessageDisplay(errormsgs, "alert alert-danger");
                }
                catch (DbEntityValidationException ex)
                {
                    foreach (var entityValidationErrors in ex.EntityValidationErrors)
                    {
                        foreach (var validationError in entityValidationErrors.ValidationErrors)
                        {
                            errormsgs.Add(validationError.ErrorMessage);
                        }
                    }
                    LoadMessageDisplay(errormsgs, "alert alert-danger");
                }
                catch (Exception ex)
                {
                    errormsgs.Add(GetInnerException(ex).ToString());
                    LoadMessageDisplay(errormsgs, "alert alert-danger");
                }
            }
        }