private void btnLogin_Click(object sender, RoutedEventArgs e) { DAOUser dao = new DAOUser(); TOUser ver = new TOUser(); ver = dao.Login(user.User_name, user.User_password); if (ver.User_id != 0) { ACTIndex index = new ACTIndex(ver); index.Show(); this.Close(); } else { Xceed.Wpf.Toolkit.MessageBox.Show("Crecendicais incorretas ou não cadastradas.", "Erro!", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MCSales = ((MCSales.View.ACTIndex)(target)); return; case 2: this.CanvasHeader = ((System.Windows.Controls.Canvas)(target)); return; case 3: this.imgHeader = ((System.Windows.Controls.Image)(target)); return; case 4: this.imgAdm = ((System.Windows.Controls.Image)(target)); return; case 5: this.imgInfo = ((System.Windows.Controls.Image)(target)); return; case 6: this.imgAbc = ((System.Windows.Controls.Image)(target)); return; case 7: this.imgVip = ((System.Windows.Controls.Image)(target)); return; case 8: this.imgHw = ((System.Windows.Controls.Image)(target)); return; case 9: this.imgTi = ((System.Windows.Controls.Image)(target)); return; case 10: this.imgWeb = ((System.Windows.Controls.Image)(target)); return; case 11: this.btnCRUD_student = ((System.Windows.Controls.Button)(target)); #line 45 "..\..\..\View\ACTIndex.xaml" this.btnCRUD_student.Click += new System.Windows.RoutedEventHandler(this.btnCRUD_student_Click); #line default #line hidden return; case 12: this.btnCRUD_user = ((System.Windows.Controls.Button)(target)); #line 46 "..\..\..\View\ACTIndex.xaml" this.btnCRUD_user.Click += new System.Windows.RoutedEventHandler(this.btnCRUD_user_Click); #line default #line hidden return; case 13: this.CanvasMonday = ((System.Windows.Controls.Canvas)(target)); return; case 14: this.lblMonday = ((System.Windows.Controls.Label)(target)); return; case 15: this.btnMondayVacancys = ((System.Windows.Controls.Button)(target)); #line 49 "..\..\..\View\ACTIndex.xaml" this.btnMondayVacancys.Click += new System.Windows.RoutedEventHandler(this.btnMondayVacancys_Click); #line default #line hidden return; case 16: this.lblMondayVacancys = ((System.Windows.Controls.Label)(target)); return; case 17: this.CanvasTuesday = ((System.Windows.Controls.Canvas)(target)); return; case 18: this.lblTuesday = ((System.Windows.Controls.Label)(target)); return; case 19: this.btnTuesdayVacancys = ((System.Windows.Controls.Button)(target)); #line 54 "..\..\..\View\ACTIndex.xaml" this.btnTuesdayVacancys.Click += new System.Windows.RoutedEventHandler(this.btnTuesdayVacancys_Click); #line default #line hidden return; case 20: this.lblTuesdayVacancys = ((System.Windows.Controls.Label)(target)); return; case 21: this.CanvasWednesday = ((System.Windows.Controls.Canvas)(target)); return; case 22: this.lblWednesday = ((System.Windows.Controls.Label)(target)); return; case 23: this.btnWednesdayVavancys = ((System.Windows.Controls.Button)(target)); #line 59 "..\..\..\View\ACTIndex.xaml" this.btnWednesdayVavancys.Click += new System.Windows.RoutedEventHandler(this.btnWednesdayVavancys_Click); #line default #line hidden return; case 24: this.lblWednesdayVacancys = ((System.Windows.Controls.Label)(target)); return; case 25: this.CanvasThursday = ((System.Windows.Controls.Canvas)(target)); return; case 26: this.lblThursday = ((System.Windows.Controls.Label)(target)); return; case 27: this.btnThursdayVacancys = ((System.Windows.Controls.Button)(target)); #line 64 "..\..\..\View\ACTIndex.xaml" this.btnThursdayVacancys.Click += new System.Windows.RoutedEventHandler(this.btnThursdayVacancys_Click); #line default #line hidden return; case 28: this.lblThursdayVacancys = ((System.Windows.Controls.Label)(target)); return; case 29: this.CanvasFriday = ((System.Windows.Controls.Canvas)(target)); return; case 30: this.lblFriday = ((System.Windows.Controls.Label)(target)); return; case 31: this.btnFridayVacancys = ((System.Windows.Controls.Button)(target)); #line 69 "..\..\..\View\ACTIndex.xaml" this.btnFridayVacancys.Click += new System.Windows.RoutedEventHandler(this.btnFridayVacancys_Click); #line default #line hidden return; case 32: this.lblFridayVacancys = ((System.Windows.Controls.Label)(target)); return; case 33: this.CanvasSaturday = ((System.Windows.Controls.Canvas)(target)); return; case 34: this.lblSaturday = ((System.Windows.Controls.Label)(target)); return; case 35: this.btnSaturdayVacancys = ((System.Windows.Controls.Button)(target)); #line 74 "..\..\..\View\ACTIndex.xaml" this.btnSaturdayVacancys.Click += new System.Windows.RoutedEventHandler(this.btnSaturdayVacancys_Click); #line default #line hidden return; case 36: this.lblSaturdayVacancys = ((System.Windows.Controls.Label)(target)); return; case 37: this.btnCRUD_class = ((System.Windows.Controls.Button)(target)); #line 77 "..\..\..\View\ACTIndex.xaml" this.btnCRUD_class.Click += new System.Windows.RoutedEventHandler(this.btnCRUD_class_Click); #line default #line hidden return; case 38: this.tblStudents = ((System.Windows.Controls.DataGrid)(target)); return; case 39: this.ColumnCod = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 40: this.ColumnName = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 41: this.ColumnSubscribeDay = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 42: this.ColumnClassDay = ((System.Windows.Controls.DataGridTextColumn)(target)); return; case 43: this.label = ((System.Windows.Controls.Label)(target)); return; case 44: this.imgHeaderClass = ((System.Windows.Controls.Image)(target)); return; case 45: this.lblTeacher = ((System.Windows.Controls.Label)(target)); return; case 46: this.lblTime = ((System.Windows.Controls.Label)(target)); return; case 47: this.headeMenu = ((System.Windows.Controls.Label)(target)); return; case 48: this.btnLogOut = ((System.Windows.Controls.Button)(target)); #line 94 "..\..\..\View\ACTIndex.xaml" this.btnLogOut.Click += new System.Windows.RoutedEventHandler(this.btnLogOut_Click); #line default #line hidden return; case 49: this.lblWellcome = ((System.Windows.Controls.Label)(target)); return; case 50: this.lblTeacher_Name = ((System.Windows.Controls.Label)(target)); return; case 51: this.lblClass_Time = ((System.Windows.Controls.Label)(target)); return; case 52: this.btnViewCurrentClass = ((System.Windows.Controls.Button)(target)); #line 102 "..\..\..\View\ACTIndex.xaml" this.btnViewCurrentClass.Click += new System.Windows.RoutedEventHandler(this.btnViewCurrentClass_Click); #line default #line hidden return; case 53: this.lblCount = ((System.Windows.Controls.Label)(target)); return; case 54: this.lblRegistersFound = ((System.Windows.Controls.Label)(target)); return; case 55: this.lblCount_Vacancy = ((System.Windows.Controls.Label)(target)); return; case 56: this.lblVacancys = ((System.Windows.Controls.Label)(target)); return; case 57: this.lblDay = ((System.Windows.Controls.Label)(target)); return; case 58: this.btnResetTable = ((System.Windows.Controls.Button)(target)); #line 112 "..\..\..\View\ACTIndex.xaml" this.btnResetTable.Click += new System.Windows.RoutedEventHandler(this.btnResetTable_Click); #line default #line hidden return; case 59: this.lblNoVancacys = ((System.Windows.Controls.Label)(target)); return; } this._contentLoaded = true; }