protected void btnUpdate_Click(object sender, EventArgs e) { Client client = (Client)Session["Client"]; int idclient = client.IdClient; string nom = this.txtNom.Text; string prenom = this.txtPrenom.Text; string numero = this.txtNumero.Text; string voie = this.txtVoie.Text; string ville = this.txtVille.Text; string codepostal = this.txtCodePostal.Text; string telephone = this.txtTelephone.Text; string login = this.txtLogin.Text; string password = this.txtPassword.Text; string email = this.txtEmail.Text; bool type = Convert.ToBoolean(this.txtType.Text); DaoClient daoClient = new DaoClient(); daoClient.updateClient(idclient, nom, prenom, numero, voie, ville, codepostal, telephone, login, password, email, type, 13); Response.Redirect("./Compte.aspx"); }
protected void btnValider_Click(object sender, EventArgs e) { try { string email = this.txtEmail.Text; string password = this.txtPassword.Text; DaoClient DaoUtilisateur = new DaoClient(); Client Utilisateur = DaoUtilisateur.GetUtilisateur(email, password); if (Utilisateur != null) { Session["Client"] = Utilisateur; if (Session["Reservation"] != null) { Response.Redirect("Paiement.aspx"); } else { Response.Redirect("BackendEspaceClient.aspx"); } } else { this.lblClient.Visible = true; } } catch (Exception ex) { ((SiteMaster)Page.Master).AddError(ex); } }
public void btnSubmit_Click(object sender, EventArgs e) { try { //RECUPERATION DES VALEURS MODIFIEES Client Utilisateur = (Client)Session["Client"]; string idclient = Utilisateur.IdClient.ToString(); string nom = this.txtNom.Text.Trim().ToUpper(); string prenom = this.txtPrenom.Text.Trim(); string password = this.txtPassword2.Text.Trim(); string email = this.txtEmail.Text.Trim(); string telephone = this.txtTelephone.Text.Trim(); bool type = this.cbxProprio.Checked; //EXECUTION DE LA DAO DaoClient daoClient = new DaoClient(); daoClient.UpdateClient(idclient, nom, prenom, password, email, telephone, type); Session["Client"] = daoClient.GetUtilisateurId(Convert.ToInt32(idclient)); Response.Redirect("BackendEspaceClient.aspx", false); } catch (Exception ex) { ((backend)Page.Master).AddError(ex); } }
public void Application_Startup(object sender, StartupEventArgs e) { //C'est ici, dans la méthode Application_Startup, qu'on instancie nos objets Dbal et Dao mydbal = new Dbal("Escp_Game"); thedaoclients = new DaoClient(mydbal); thedaotheme = new DaoTheme(mydbal); thedaoavis = new DaoAvis(mydbal, thedaoclients, thedaotheme); thedaoobstacles = new DaoObstacle(mydbal, thedaotheme); thedaoville = new DaoVille(mydbal); thedaosalles = new DaoSalle(mydbal, thedaoville, thedaotheme); thedaoutilisateurs = new DaoUtilisateur(mydbal, thedaoville); thedaoreservation = new DaoReservation(mydbal, thedaoclients, thedaosalles, thedaoutilisateurs, thedaotheme); thedaoplacement = new DaoPlacement_Obst(mydbal, thedaoreservation, thedaoobstacles); thedaoheure = new DaoHeure(mydbal); // Create the startup window //là, on lance la fenêtre souhaitée en instanciant la classe de notre fenêtre directeur wnd = new directeur(thedaoavis, thedaoclients, thedaoobstacles, thedaoplacement, thedaoreservation, thedaosalles, thedaotheme, thedaoutilisateurs, thedaoville, thedaoheure); //et on utilise la méthode Show() de notre objet fenêtre pour afficher la fenêtre //exemple: MainWindow lafenetre = new MainWindow(); (et on y passe en paramètre Dbal et Dao au besoin) wnd.Show(); }
protected void ConnexionButton_Click(object sender, EventArgs e) { DaoClient daoClient = new DaoClient(); bool isError = false; string errorMsg = ""; try { Client client = daoClient.GetClient(login.Text, password.Text); if (client != null) { Session[Constants.SESSION_CLIENT] = client; Response.Redirect("Profil.aspx"); } } catch (Exception ex) { isError = true; errorMsg = ex.Message; } if (isError) { connexionError.Text = "<div class=\"alert alert-warning\">" + errorMsg + "</div>"; } else { connexionError.Text = "<div class =\"alert alert-danger\">Identifiant ou mot de passe incorrect</div>"; } }
public Connexion(DaoClient theDaoClient, DaoTransaction theDaoTransaction, DaoUtilisateur theDaoUtilisateur, DaoVille theDaoVille) { vmDaoVille = theDaoVille; vmDaoUser = theDaoUtilisateur; listUser = new List <Utilisateur>(vmDaoUser.SelectAll()); vmDaoClient = theDaoClient; vmDaoTransac = theDaoTransaction; InitializeComponent(); }
protected void lsvClient_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { this.dtpClients.SetPageProperties(e.StartRowIndex, e.MaximumRows, false); DaoClient daoClient = new DaoClient(); this.lsvClient.DataSource = daoClient.GetClients(); this.lsvClient.DataBind(); }
protected void btnActive_Click(object sender, EventArgs e) { int idClient = Convert.ToInt32(((Button)sender).CommandArgument); DaoClient daoClient = new DaoClient(); daoClient.ChangeStatutClient(idClient); this.lsvClient.DataSource = daoClient.GetClients(); this.lsvClient.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { daoClient = new DaoClient(); if (!IsPostBack) { this.gdvClient.DataSource = daoClient.GetClients(); this.gdvClient.DataBind(); } }
public directeur(DaoAvis thedaoavis, DaoClient thedaoclient, DaoObstacle thedaoobstacle, DaoPlacement_Obst thedaoPlacement_Obst, DaoReservation theDaoReservation, DaoSalle thedaosalle, DaoTheme thedaotheme, DaoUtilisateur thedaoutilisateur, DaoVille thedaoville, DaoHeure thedaoheure) { InitializeComponent(); Globale.DataContext = new viewModel.viewModelSalles(thedaoavis, thedaoclient, thedaoobstacle, thedaoPlacement_Obst, theDaoReservation, thedaosalle, thedaotheme, thedaoutilisateur, thedaoville, thedaoheure); grid1.Visibility = Visibility.Hidden; grid2.Visibility = Visibility.Hidden; grid3.Visibility = Visibility.Hidden; grid4.Visibility = Visibility.Hidden; HOME.Visibility = Visibility.Visible; }
public MainWindow(DaoClient theDaoClient, DaoTransaction theDaoTransaction) { //Finir le tuto : https://www.c-sharpcorner.com/UploadFile/mahesh/datagrid-in-wpf/#:~:text=WPF%20DataGrid.,display%20data%20from%20a%20collection.&text=In%20this%20article%2C%20you%20will,load%20data%20from%20a%20collection InitializeComponent(); Grid_Clients.DataContext = new viewModelClient(theDaoClient); Grid_Credits.DataContext = new viewModelCredits(theDaoClient, theDaoTransaction); Grid_Transac.DataContext = new viewModelTransactions(theDaoTransaction); //Grid_Transac.DataContext = new viewModelTransactions(theDaoTransaction); ; }
public Facturation(Dbal dbal, Client leClient) { _client = leClient; _dbal = dbal; _daoClient = new DaoClient(dbal); _daoFacture = new DaoFacture(dbal); InitializeComponent(); Box_Nom.Text = leClient.Nom; Box_Prenom.Text = leClient.Prenom; Selection_Date.Text = DateTime.Now.ToString("d"); }
public MainWindow(DaoFacture daoFacture, DaoClient daoClient, DaoSite daosite, DaoSalle daosalle, DaoPartie daopartie, DaoHoraire daohoraire, DaoObstacle daoobstacle, DaoJoueur daojoeueur) { thedaoFacture = daoFacture; thedaoClient = daoClient; thedaoSite = daosite; thedaoSalle = daosalle; thedaoHoraire = daohoraire; thedaoPartie = daopartie; thedaoObstacle = daoobstacle; thedaoJoueur = daojoeueur; InitializeComponent(); }
public Planning(DaoFacture daoFacture, DaoClient daoClient, DaoSite daosite, DaoSalle daosalle, DaoPartie daopartie, DaoHoraire daohoraire, DaoObstacle daoobstacle, DaoJoueur daojoeueur) { thedaoFacture = daoFacture; thedaoClient = daoClient; thedaoSite = daosite; thedaoSalle = daosalle; thedaoHoraire = daohoraire; thedaoPartie = daopartie; thedaoObstacle = daoobstacle; thedaoJoueur = daojoeueur; InitializeComponent(); MainGrid.DataContext = new viewModel.viewModelPlanning(daoFacture, daoClient, daosite, daosalle, daopartie, daohoraire, daoobstacle, daojoeueur, this); }
private void Application_Startup(object sender, StartupEventArgs e) { mydbal = new Dbal("Escp_Game"); theDaoAvis = new DaoAvis(mydbal, theDaoClient, theDaoTheme); theDaoClient = new DaoClient(mydbal); theDaoObstacle = new DaoObstacle(mydbal, theDaoTheme); theDaoPObstacle = new DaoPlacement_Obst(mydbal, theDaoReservation, theDaoObstacle); theDaoReservation = new DaoReservation(mydbal, theDaoClient, theDaoSalle, theDaoUtilisateur, theDaoTheme); theDaoSalle = new DaoSalle(mydbal, theDaoVille, theDaoTheme); theDaoTheme = new DaoTheme(mydbal); theDaoTransaction = new DaoTransaction(mydbal, theDaoClient, theDaoReservation); theDaoUtilisateur = new DaoUtilisateur(mydbal, theDaoVille); theDaoVille = new DaoVille(mydbal); }
public InfosClient(Client leClient, Dbal dbal) { _client = leClient; _dbal = dbal; _daoClient = new DaoClient(dbal); InitializeComponent(); Box_Nom.Text = leClient.Nom; Box_Prenom.Text = leClient.Prenom; Selection_Date.SelectedDate = leClient.Naissance; Box_Email.Text = leClient.Email; Box_Crédits.Text = leClient.Credit.ToString(); Box_Numero.Text = leClient.Tel; Box_Adress.Text = leClient.Adresse; }
public Création_de_partie(DaoFacture daofacture, DaoClient daoclient, DaoSite daosite, DaoSalle daosalle, DaoPartie daopartie, DaoHoraire daohoraire, DaoObstacle daoobstacle, DaoJoueur daojoueur, Partie partie, Client client) { InitializeComponent(); thedaoFacture = daofacture; thedaoClient = daoclient; thedaoSite = daosite; thedaoSalle = daosalle; thedaoHoraire = daohoraire; thedaoPartie = daopartie; thedaoObstacle = daoobstacle; thedaoJoueur = daojoueur; _partie = partie; _client = client; MainGrid.DataContext = new viewModelPartie(daofacture, daoclient, daohoraire, daosite, daosalle, daopartie, daoobstacle, daojoueur, partie, client, this); }
private void Application_Startup(object sender, StartupEventArgs e) { Dbal dbal = new Dbal("ppe3_mmd", "localhost", "root", "5MichelAnnecy"); DaoFacture daoFacture = new DaoFacture(dbal); DaoClient daoClient = new DaoClient(dbal); DaoSite daoSite = new DaoSite(dbal); DaoSalle daoSalle = new DaoSalle(dbal); DaoPartie daoPartie = new DaoPartie(dbal); DaoHoraire daoHoraire = new DaoHoraire(dbal); DaoObstacle daoObstacle = new DaoObstacle(dbal); DaoJoueur daoJoueur = new DaoJoueur(dbal); MainWindow Wnd = new MainWindow(daoFacture, daoClient, daoSite, daoSalle, daoPartie, daoHoraire, daoObstacle, daoJoueur); Wnd.Show(); }
private void Application_Startup(object sender, StartupEventArgs e) { mydbal = new Dbal("escp_Game"); theDaoClient = new DaoClient(mydbal); theDaoVille = new DaoVille(mydbal); theDaoTheme = new DaoTheme(mydbal); theDaoUtilisateur = new DaoUtilisateur(mydbal, theDaoVille); theDaoSalle = new DaoSalle(mydbal, theDaoVille, theDaoTheme); theDaoReservation = new DaoReservation(mydbal, theDaoClient, theDaoSalle, theDaoUtilisateur, theDaoTheme); theDaoTransaction = new DaoTransaction(mydbal, theDaoClient, theDaoReservation); //bool res = false; Connexion wndco = new Connexion(theDaoClient, theDaoTransaction, theDaoUtilisateur, theDaoVille); wndco.Show(); }
protected void btnValider_Click(object sender, EventArgs e) { string login = this.txtLogin.Text; string password = this.txtPassword.Text; DaoClient daoClient = new DaoClient(); Client client = daoClient.GetClient(login, password); if (client != null) { Session["client"] = client; //this.lblMessage.Text = "<div class=\"alert alert-danger\" role=\"alert\">OK</div>"; Response.Redirect("/EspaceClient/Compte.aspx"); } else { this.lblMessage.Text = "<div class=\"alert alert-danger\" role=\"alert\">Veuillez crée un compte !</div>"; } }
protected void UpdateProfil_Click(object sender, EventArgs e) { int Id = client.IdClient; string Nom = txtNom.Text; string Prenom = txtPrenom.Text; string Email = txtEmail.Text; string Telephone = txtTelephone.Text; bool error = new DaoClient().UpdateClient(Id, Nom, Prenom, Email, Telephone); if (!error) { client.Nom = Nom; client.Prenom = Prenom; client.Email = Email; client.Telephone = Telephone; } Response.Redirect("Profil.aspx"); }
public viewModelPlanning(DaoFacture daoFacture, DaoClient daoClient, DaoSite daoSite, DaoSalle daoSalle, DaoPartie daoPartie, DaoHoraire daoHoraire, DaoObstacle daoObstacle, DaoJoueur daoJoueur, Planning planning) { _wnd = planning; _daoFacture = daoFacture; _daoClient = daoClient; _daoHoraire = daoHoraire; _daoPartie = daoPartie; _daoSalle = daoSalle; _daoSite = daoSite; _daoObstacle = daoObstacle; _daoJoueur = daoJoueur; _listPlanning = new ObservableCollection <Partie>(); _listSalles = new ObservableCollection <Salle>(); ListSites = new ObservableCollection <Site>(_daoSite.GetAllSite()); _listClient = new ObservableCollection <Client>(daoClient.GetAllClient()); DatePlanning = DateTime.Now; researchTextClient = ""; }
public viewModelPartie(DaoFacture daoFacture, DaoClient daoClient, DaoHoraire daoHoraire, DaoSite daoSite, DaoSalle daoSalle, DaoPartie daoPartie, DaoObstacle daoObstacle, DaoJoueur daoJoueur, Partie activePartie, Client activeclient, Création_de_partie création_De_Partie) { _wnd = création_De_Partie; _daoFacture = daoFacture; _daoClient = daoClient; _daoHoraire = daoHoraire; _daoSite = daoSite; _daoSalle = daoSalle; _daoPartie = daoPartie; _daoObstacle = daoObstacle; _daoJoueur = daoJoueur; _activePartie = activePartie; _activeclient = activeclient; _listJoueur = new ObservableCollection <Joueur>(daoJoueur.GetAllJoueur()); _listObstacle = new ObservableCollection <Obstacle>(daoObstacle.GetAllObstacle()); _listJoueurPartie = new ObservableCollection <Joueur>(); _listObstaclePartie = new ObservableCollection <Obstacle>(); researchText = ""; pseudoJoueur = ""; emailJoueur = ""; }
protected void btnValider_Click(object sender, EventArgs e) { try { string nom = this.txtNom.Text.Trim().ToUpper(); string prenom = this.txtPrenom.Text.Trim(); string login = this.TxtLogin.Text.Trim(); string password = this.txtPassword2.Text.Trim(); string email = this.txtEmail2.Text.Trim(); string telephone = this.txtTelephone.Text.Trim(); bool type = this.CbxProprietaire.Checked; string nomAdresse = this.TxtNomAdresse.Text; string numero = this.TextNumero.Text; string voie = this.txtVoie.Text; string codepostal = this.txtCodePostal.Text; string ville = this.txtVille.Text; DaoClient daoClient = new DaoClient(); daoClient.InsertClient(nom, prenom, login, password, email, telephone, type, nomAdresse, numero, voie, codepostal, ville); Client client = daoClient.GetUtilisateur(login, password); Session["Client"] = client; if (Session["Reservation"] != null) { Response.Redirect("Paiement.aspx"); } else { Response.Redirect("Default.aspx"); } } catch (Exception ex) { ((SiteMaster)Page.Master).AddError(ex); } }
protected void btnCreate_Click(object sender, EventArgs e) { string nom = this.txtNom.Text; string prenom = this.txtPrenom.Text; string numero = this.txtNumero.Text; string voie = this.txtVoie.Text; string ville = this.txtVille.Text; string codepostal = this.txtCodePostal.Text; string telephone = this.txtTelephone.Text; string login = this.txtLogin.Text; string password = this.txtPassword.Text; string email = this.txtEmail.Text; bool type = Convert.ToBoolean(this.txtType.Text); DaoClient daoClient = new DaoClient(); daoClient.createClient(nom, prenom, numero, voie, ville, codepostal, telephone, login, password, email, type, 12); Response.Redirect("Connexion.aspx"); }
public CreationClient(Dbal dbal) { _dbal = dbal; _daoClient = new DaoClient(dbal); InitializeComponent(); }
public void Create(DomainEntityClient domainEntity) { DbEntityClient dbEntity = DbEntityClient.DomainEntityToDbEntity(domainEntity); DaoClient.Create(dbEntity); }
public void Delete(int id) { DaoClient.Delete(id); }
public void Update(int id, DomainEntityClient domainEntity) { DbEntityClient dbEntity = DbEntityClient.DomainEntityToDbEntity(domainEntity); DaoClient.Update(id, dbEntity); }
public List <DomainEntityClient> Read() { return(DaoClient.Read().Select(dbEntity => dbEntity.DbEntityToDomainEntity()).ToList()); }