private void EnterSecurity_Click(object sender, RoutedEventArgs e) { StroitelEntities userDB = new StroitelEntities(); try { if (!String.IsNullOrEmpty(textBox.Text) || !String.IsNullOrEmpty(textBox1.Password)) { var userApp = userDB.user.Where(u => u.login == textBox.Text && u.password == textBox1.Password).FirstOrDefault(); if (userApp != null) { NavigationService.Navigate(new Uri("/SelectedPage.xaml", UriKind.Relative)); } else { MessageBox.Show("Пользователь не существует, проверьте логин и пароль", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Warning); } } else { MessageBox.Show("Заполните все поля данные", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Warning); } } catch (Exception) { MessageBox.Show("Ошибка обработки данных", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Error); } }
public Remonts() { dbContext = new StroitelEntities(); InitializeComponent(); tbDate.Text = Convert.ToString(DateTime.Today.ToString("dd MMMM yyyy")); ListRemonts = new List <емонт>(); }
public wOtchNovinki() { dbContext = new StroitelEntities(); InitializeComponent(); GetData(); }
public wOtchPostTov() { InitializeComponent(); dbContext = new StroitelEntities(); tbSt.Text = "Сформируйте отчет"; tbCount.Text = "0"; tbDate.Text = Convert.ToString(DateTime.Today.ToString("dd MMMM yyyy")); }
public Providers() { dbContext = new StroitelEntities(); InitializeComponent(); ListProviders = new List <Поставщик>(); }
public wNewClient(Clients newClient) { dbContext = new StroitelEntities(); InitializeComponent(); this.DataContext = new ClientValidationModel(); }
public wNewOrders() { dbContext = new StroitelEntities(); InitializeComponent(); this.DataContext = new OrderValidationModel(); }
public wNewProduct(Products newPr) { dbContext = new StroitelEntities(); InitializeComponent(); this.DataContext = new ProductValidationModel(); }
public wNewRemont() { dbContext = new StroitelEntities(); InitializeComponent(); }
public Products() { dbContext = new StroitelEntities(); InitializeComponent(); ListProducts = new List <Товар>(); }
public wOtchClientMogilev() { dbContext = new StroitelEntities(); InitializeComponent(); }
public Employees() { dbContext = new StroitelEntities(); InitializeComponent(); ListEmployees = new List <Сотрудник>(); }
public wNewEmployee(Employees newEmp) { dbContext = new StroitelEntities(); InitializeComponent(); this.DataContext = new EmployerValidationModel(); }
public Clients() { dbContext = new StroitelEntities(); InitializeComponent(); ListClients = new List <Клиент>(); }
public wOtchRemont() { InitializeComponent(); OtchRem = new StroitelEntities(); Start(); }
public Orders() { dbContext = new StroitelEntities(); InitializeComponent(); ListOrders = new List <Заказ>(); }