public MainWindow(DAOclients lesClient, DAOtransactions lestransaction) { myclient = lesClient; mytransaction = lestransaction; InitializeComponent(); AppComptableSecretariat.DataContext = new viewModel.viewModeleClient(lesClient); }
public FenetreTransactions(DAOtransactions laTransaction, DAOclients lesClient) { mytransaction = laTransaction; myclient = lesClient; //laTransaction = mytransaction; //lesClient = myclient; InitializeComponent(); }
public GérerClients(DAOclients mydaoClient, DAOtransactions mydaoTransaction) { //mydaoClient = myclient; //mydaoTransaction = mytransaction; mytransaction = mydaoTransaction; myclient = mydaoClient; InitializeComponent(); GererClient.DataContext = new viewModel.viewModeleClient(mydaoClient); }
public FenetreTransactions(DAOclients mydaoClient, DAOtransactions mydaoTransaction) { mytransaction = mydaoTransaction; myclient = mydaoClient; //laTransaction = mytransaction; //lesClient = myclient; InitializeComponent(); Transaction.DataContext = new viewModel.viewModelTransaction(mydaoClient, mydaoTransaction); }
static void Main(string[] args) { Dbal monDbal = new Dbal("LSRGames"); monClient = new Clients(); myDaoClient = new DAOclients(monDbal); matransaction = new Transactions(); myDaoTransaction = new DAOtransactions(monDbal, myDaoClient); // select all transaction : //List<Transactions> lesTransaction = myDaoTransaction.SelectAll(); //foreach (Transactions T in lesTransaction) //{ // Console.WriteLine(T.getIdTransactions()); //} //select by id transaction : //Console.WriteLine(myDaoTransaction.SelectById(1).getMontantTransaction()); //select byid client: //Console.WriteLine(myDaoClient.SelectById(1).getEmailClient()); //select byName name: //Console.WriteLine(myDaoClient.SelectByName("GROUSSAUD").getEmailClient()); //List<Clients> lesClients = myDaoClient.SelectAll(); //foreach (Clients C in lesClients) //{ // Console.WriteLine(C.getAdresseClient()); //} DateTime uneDate = new DateTime(2000 / 01 / 01); Clients monClients = new Clients(4, "julien", "gilbert", "ffef", "sonadresse", uneDate, "client@mail", "0452326895", 60); //myDaoClient.Insert(monClients); //myDaoClient.Update(monClients); myDaoClient.Delete(monClients); List <Clients> lesClients = myDaoClient.SelectAll(); foreach (Clients C in lesClients) { Console.WriteLine(C.getAdresseClient()); } Console.ReadKey(); }
private void Application_Startup(object sender, StartupEventArgs e) { //C'est ici, dans la méthode Application_Startup, qu'on instancie nos objets Dbal et Dao thedbal = new Dbal("LSRGames"); thedaoClient = new DAOclients(thedbal); thedaoTransaction = new DAOtransactions(thedbal, thedaoClient); // Create the startup window //là, on lance la fenêtre souhaitée en instanciant la classe de notre fenêtre MainWindow wnd = new MainWindow(thedaoClient); //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(); }