Form5.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace muskafidi_students
  11. {
  12. public partial class Form5 : Form
  13. {
  14. public Form5()
  15. {
  16. InitializeComponent();
  17. }
  18. private void оценкиBindingNavigatorSaveItem_Click(object sender, EventArgs e)
  19. {
  20. this.Validate();
  21. this.оценкиBindingSource.EndEdit();
  22. this.tableAdapterManager.UpdateAll(this.studentsssDataSet);
  23. }
  24. private void Form5_Load(object sender, EventArgs e)
  25. {
  26. // TODO: данная строка кода позволяет загрузить данные в таблицу "studentsssDataSet.Оценки". При необходимости она может быть перемещена или удалена.
  27. this.оценкиTableAdapter.Fill(this.studentsssDataSet.Оценки);
  28. }
  29. private void button1_Click(object sender, EventArgs e)
  30. {
  31. Form5.ActiveForm.Hide();
  32. Form1 MyForm2 = new Form1();
  33. MyForm2.ShowDialog();
  34. Close();
  35. }
  36. private void средний_баллTextBox_TextChanged(object sender, EventArgs e)
  37. {
  38. }
  39. private void button2_Click(object sender, EventArgs e)
  40. {
  41. средний_баллTextBox.Text = ((double.Parse(оценка_1TextBox.Text) + double.Parse(оценка_2TextBox.Text) + double.Parse(оценка_3TextBox.Text)) / 3).ToString();
  42. }
  43. }
  44. }