Beispiel #1
0
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            BALEquipe dalequipe = new BALEquipe();

            try
            {
                int returnValue = dalequipe.CreateEquipe("");
                if (returnValue > 0)
                {
                    Page.RegisterClientScriptBlock("message", "<script>alert('Country is created successfully')</script>");
                    //txtCountryName.Text = string.Empty;
                }
                else
                {
                    Page.RegisterClientScriptBlock("message", "<script>alert('Incorrect User Inputs.')</script>");
                }
            }
            catch (Exception ex)
            {
                clsLogging logError = new clsLogging();
                logError.WriteLog(ex);
            }
        }
        protected void ddlJoueur_SelectedIndexChanged(object sender, EventArgs e)
        {
            string    JoueurName = string.Empty;
            BALJoueur balJoueur  = new BALJoueur();

            try
            {
                //JoueurName = balJoueur.getJoueurByID(ddlJoueur.SelectedValue);
                //if (string.IsNullOrEmpty(JoueurName))
                //{
                //    Page.RegisterClientScriptBlock("message", "<script>alert('Joueur Id is not found.')</script>");
                //}
                //else
                //{
                //    txtEditJoueurName.Text = JoueurName;
                //}
            }
            catch (Exception ex)
            {
                clsLogging logError = new clsLogging();
                logError.WriteLog(ex);
            }
        }
Beispiel #3
0
        protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e)
        {
            string     countryName = string.Empty;
            BALCountry balCountry  = new BALCountry();

            try
            {
                countryName = balCountry.getCountryByID(ddlCountry.SelectedValue);
                if (string.IsNullOrEmpty(countryName))
                {
                    Page.RegisterClientScriptBlock("message", "<script>alert('Country Id is not found.')</script>");
                }
                else
                {
                    txtEditCountryName.Text = countryName;
                }
            }
            catch (Exception ex)
            {
                clsLogging logError = new clsLogging();
                logError.WriteLog(ex);
            }
        }
        public string CreateEquipe(string contryName)
        {
            BALEquipe equipe = new BALEquipe();

            try
            {
                int returnValue = equipe.CreateEquipe(contryName);
                if (returnValue > 0)
                {
                    return("Country is created successfully ");
                }
                else
                {
                    return("Incorrect User Inputs.");
                }
            }
            catch (Exception ex)
            {
                clsLogging logError = new clsLogging();
                logError.WriteLog(ex);
            }
            return("hello");
        }
Beispiel #5
0
        protected void btnCreate_Click(object sender, EventArgs e)
        {
            BALJoueur balJoueur = new BALJoueur();

            try
            {
                int returnValue = balJoueur.CreateJoueur(txtJoueurName.Text, txtJoueurPrenom.Text, rdSexe1.Checked, 1);
                if (returnValue > 0)
                {
                    Page.RegisterClientScriptBlock("message", "<script>alert('Joueur is created successfully')</script>");
                    txtJoueurName.Text = string.Empty;
                    binding(null);
                }
                else
                {
                    Page.RegisterClientScriptBlock("message", "<script>alert('Incorrect User Inputs.')</script>");
                }
            }
            catch (Exception ex)
            {
                clsLogging logError = new clsLogging();
                logError.WriteLog(ex);
            }
        }
        private void binding(string searchCountry)
        {
            try
            {
                var balCountry          = new BAL.BALUser();
                List <PROP.PROPUser> Pl = balCountry.getUser(searchCountry);

                var us = Pl.FirstOrDefault(x => x.UserName == UserName.Text && x.Password == Password.Text);
                if (us != null)
                {
                    Session["User"] = UserName.Text;
                    Response.Redirect("../");
                }
                else
                {
                    FailureText.Text = "Les donnee ne son pas corect !";
                }
            }
            catch (Exception ex)
            {
                clsLogging logError = new clsLogging();
                logError.WriteLog(ex);
            }
        }