private void search_button_Click(object sender, RoutedEventArgs e) { using (ClientDBcontext context = new ClientDBcontext()) { ClientDBsys.Engine.SearchClientEngine _searchClient = new Engine.SearchClientEngine(context); Results = RetriveData(_searchClient); } _home.dataGrid.ItemsSource = Results; }
private void lgoinbutton_Click(object sender, RoutedEventArgs e) { using (var clientDBcontext = new ClientDBcontext()) { Engine.LoginEngine loginEngine = new Engine.LoginEngine(clientDBcontext); //if (loginEngine.CheckUsernamePassword(usernamebox.Text, passwordbox.Text)) if (loginEngine.CheckUsernamePassword("zedEd", "1234")) { ///MessageBox.Show("Test"); //AddWindowterminal ter = new AddWindowterminal(); HomeWindow _homewindow = new HomeWindow(); _homewindow.Show(); this.Close(); } } }
private void add_button_Click(object sender, RoutedEventArgs e) { using (ClientDBcontext context = new ClientDBcontext()) { Engine.AddClientEngine _addClient = new Engine.AddClientEngine(context) { Client = new ClientTable() }; _addClient.Client.FORENAME = foreName_textbox.Text; _addClient.Client.SURNAME = surname_textbox.Text; _addClient.Client.AGE = Int32.Parse(age_textbox.Text); _addClient.Client.ADDRESS = address_textbox.Text; _addClient.Client.CITY_ID = Int32.Parse(cityid_textbox.Text); _addClient.Add(); } Close(); }