using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace DiachkovStudents { public partial class Form5 : Form { public Form5() { InitializeComponent(); } private void оценкиBindingNavigatorSaveItem_Click(object sender, EventArgs e) { this.Validate(); this.оценкиBindingSource.EndEdit(); this.tableAdapterManager.UpdateAll(this.рП31ДьячковНикитинСтудентыDataSet1); } private void Form5_Load(object sender, EventArgs e) { // TODO: данная строка кода позволяет загрузить данные в таблицу "рП31ДьячковНикитинСтудентыDataSet1.Оценки". При необходимости она может быть перемещена или удалена. this.оценкиTableAdapter.Fill(this.рП31ДьячковНикитинСтудентыDataSet1.Оценки); } private void кодПредмета1Label_Click(object sender, EventArgs e) { } private void кодПредмета1TextBox_TextChanged(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { try { double num1 = Convert.ToDouble(оценка1TextBox.Text); double num2 = Convert.ToDouble(оценка2TextBox.Text); double num3 = Convert.ToDouble(оценка3TextBox.Text); среднийБаллTextBox.Text = ((num1 + num2 + num3) / 3).ToString(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } } }