private void Button_Click_4(object sender, RoutedEventArgs e) { if (cbEvents.Text == "" || cbTypeOfCoin.Text == "" || (cbEvents.Text == "" && cbTypeOfCoin.Text == "")) { MessageBox.Show("Нужно заполнить все поля"); } else { _idCoinType = DCT.CoinType(cbTypeOfCoin.Text); _idEvent = GIVM.LoadID(Queries.GetEventID(cbEvents.Text), "id_event"); QueriesManager.Execute(Queries.AddCoin(_idEvent, _idTeacher, _idCoinType, textBoxComment.Text)); listViewCoinsList.ItemsSource = CLVM.LoadCoinsList(Queries.GetCoinsList(textBlockTeachersName.Text, _iYear, _iSemestr)); listViewRating.ItemsSource = RWM.LoadRating(Queries.GetRatingTotal(_iYear, _iSemestr)); gridCoinsImg.DataContext = CCVM.LoadCoinsCount(Queries.GetCoinsCount(textBlockTeachersName.Text, _iYear, _iSemestr)); cbEvents.Items.Clear(); textBoxComment.Text = ""; stackPanelNewCoin.Visibility = Visibility.Hidden; } }
private void Button_Click_17(object sender, RoutedEventArgs e) { if (cbGrantCoinEvents.Text == "" || cbAddCoinType.Text == "" || (cbGrantCoinEvents.Text == "" && cbAddCoinType.Text == "")) { MessageBox.Show("Нужно заполнить все поля"); } else { _idCoinType = DCT.CoinType(cbAddCoinType.Text); _idEvent = GIVM.LoadID(Queries.GetEventID(cbGrantCoinEvents.Text), "id_event"); QueriesManager.Execute(Queries.AddCoin(_idEvent, _idTeacher, _idCoinType, textBoxCommentCoin.Text)); cbGrantCoinEvents.Items.Clear(); textBoxCommentCoin.Text = ""; stackPanelNewCoinPanel.Visibility = Visibility.Hidden; colorZoneNewNight.Visibility = Visibility.Hidden; stackPanelNewCoinPanel.Visibility = Visibility.Hidden; cbAddCoinType.Items.Clear(); } }
private void Button_Click_13(object sender, RoutedEventArgs e) { if (cbAcceptRequestCoinType.Text == "") { MessageBox.Show("Нужно заполнить все поля"); } else { _idCoinType = DCT.CoinType(cbAddCoinType.Text); AdminMessageList AML = (AdminMessageList)listViewAdminMessageBox.SelectedItems[0]; _idEvent = GIVM.LoadID(Queries.GetEventID(textBlockAcceptRequestEvent.Text), "id_event"); _idTeacher = GIVM.LoadID(Queries.GetTeacherID(1, sTeacher), "id_teacher"); QueriesManager.Execute(Queries.AddCoin(_idEvent, _idTeacher, _idCoinType, textBoxAcceptRequestComment.Text)); textBoxAcceptRequestComment.Text = ""; QueriesManager.Execute(Queries.UpdateMessageStatus("Принято", AML.ID)); listViewAdminMessageBox.ItemsSource = AMLVM.LoadMAList(Queries.GetAdminMessageListSort("")); colorZoneTeacherPage.Visibility = Visibility.Hidden; gridResponce.Visibility = Visibility.Hidden; listViewRating.ItemsSource = RWM.LoadRating(Queries.GetRatingTotal(_iYear, _iSemestr)); } }