private void LoginAccount(string log, string pass) { if (MasterAccount(log, pass)) { MasterWindow masterWindow = new MasterWindow(login.Text); masterWindow.Show(); this.Close(); } else if (CustomerAccount(log, pass)) { CustomerWindow customerWindow = new CustomerWindow(login.Text); customerWindow.Show(); this.Close(); } else if (AdminAccount(log, pass) || AdminAccount(login.Text, password.Password)) { AdminWindow adminWindow = new AdminWindow(); adminWindow.Show(); this.Close(); } else { MessageBox.Show("Неправильное имя пользователя или пароль"); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.masterWnd = ((Course_Project.MasterWindow)(target)); #line 9 "..\..\MasterWindow.xaml" this.masterWnd.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 9 "..\..\MasterWindow.xaml" this.masterWnd.SizeChanged += new System.Windows.SizeChangedEventHandler(this.MasterWindow_OnSizeChanged); #line default #line hidden return; case 2: this.masterName = ((System.Windows.Controls.Label)(target)); return; case 3: this.editPassword = ((System.Windows.Controls.Button)(target)); #line 24 "..\..\MasterWindow.xaml" this.editPassword.Click += new System.Windows.RoutedEventHandler(this.editPassword_Click); #line default #line hidden return; case 4: this.leaveAccount = ((System.Windows.Controls.Button)(target)); #line 25 "..\..\MasterWindow.xaml" this.leaveAccount.Click += new System.Windows.RoutedEventHandler(this.leaveAccount_Click); #line default #line hidden return; case 5: this.readyButt = ((System.Windows.Controls.Button)(target)); #line 26 "..\..\MasterWindow.xaml" this.readyButt.Click += new System.Windows.RoutedEventHandler(this.readyButt_Click); #line default #line hidden return; case 6: this.pickOrderButt = ((System.Windows.Controls.Button)(target)); #line 27 "..\..\MasterWindow.xaml" this.pickOrderButt.Click += new System.Windows.RoutedEventHandler(this.pickOrderButt_Click); #line default #line hidden return; case 7: this.exit = ((System.Windows.Controls.Button)(target)); #line 29 "..\..\MasterWindow.xaml" this.exit.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 8: #line 31 "..\..\MasterWindow.xaml" ((System.Windows.Controls.TabItem)(target)).MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.TabItem_MouseLeftButtonUp); #line default #line hidden return; case 9: this.acceptedOrders = ((System.Windows.Controls.DataGrid)(target)); return; case 10: this.moreAccepted = ((System.Windows.Controls.MenuItem)(target)); #line 53 "..\..\MasterWindow.xaml" this.moreAccepted.Click += new System.Windows.RoutedEventHandler(this.moreAccepted_Click); #line default #line hidden return; case 11: this.orderId = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 12: this.nameCustomer = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 13: this.laptopProducer = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 14: this.laptopModel = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 15: this.price = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 16: this.orderType = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 17: this.descriptionOfProblem = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 18: #line 69 "..\..\MasterWindow.xaml" ((System.Windows.Controls.TabItem)(target)).MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.TabItem_MouseLeftButtonUp_1); #line default #line hidden return; case 19: this.notAcceptedOrders = ((System.Windows.Controls.DataGrid)(target)); return; case 20: this.moreNotAccepted = ((System.Windows.Controls.MenuItem)(target)); #line 91 "..\..\MasterWindow.xaml" this.moreNotAccepted.Click += new System.Windows.RoutedEventHandler(this.moreNotAccepted_Click); #line default #line hidden return; case 21: this.orderIdNotAccepted = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 22: this.nameCustomerNotAccepted = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 23: this.laptopProducerNotAccepted = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 24: this.laptopModelNotAccepted = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 25: this.priceNotAccepted = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 26: this.orderTypeNotAccepted = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 27: this.descriptionOfProblemNotAccepted = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 28: #line 107 "..\..\MasterWindow.xaml" ((System.Windows.Controls.TabItem)(target)).MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.TabItem_MouseLeftButtonUp_2); #line default #line hidden return; case 29: this.readyOrders = ((System.Windows.Controls.DataGrid)(target)); return; case 30: this.moreReady = ((System.Windows.Controls.MenuItem)(target)); #line 129 "..\..\MasterWindow.xaml" this.moreReady.Click += new System.Windows.RoutedEventHandler(this.moreReady_Click); #line default #line hidden return; case 31: this.orderIdReady = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 32: this.nameCustomerReady = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 33: this.laptopProducerReady = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 34: this.laptopModelReady = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 35: this.priceReady = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 36: this.orderTypeReady = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 37: this.descriptionOfProblemReady = ((System.Windows.Controls.DataGridTextColumn)(target)); return; } this._contentLoaded = true; }