123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- 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 FamiliaStudentsAnis
- {
- public partial class Form6 : Form
- {
- private int j;
- private int i;
- public object True { get; private set; }
- public Form6()
- {
- InitializeComponent();
- }
- private void студентыBindingNavigatorSaveItem_Click(object sender, EventArgs e)
- {
- this.Validate();
- this.студентыBindingSource.EndEdit();
- this.tableAdapterManager.UpdateAll(this.studentDataSet);
- }
- private void Form6_Load(object sender, EventArgs e)
- {
- // TODO: данная строка кода позволяет загрузить данные в таблицу "studentDataSet.Студенты". При необходимости она может быть перемещена или удалена.
- this.студентыTableAdapter.Fill(this.studentDataSet.Студенты);
- }
- private void button1_Click(object sender, EventArgs e)
- {
- DataGridViewColumn col = студентыDataGridView.Columns[listBox1.SelectedIndex];
- if (radioButton1.Checked)
- студентыDataGridView.Sort(col, ListSortDirection.Ascending);
- else
- студентыDataGridView.Sort(col, ListSortDirection.Descending);
- }
- private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- button1.Enabled = true;
- }
- private void radioButton1_CheckedChanged(object sender, EventArgs e)
- {
- }
- private void button4_Click(object sender, EventArgs e)
- {
- for (int i = 0; i < студентыDataGridView.ColumnCount; i++);
- for (int j = 0; j < студентыDataGridView.ColumnCount; j++);
- {
- студентыDataGridView[i, j].Style.BackColor = Color.White;
- студентыDataGridView[i, j].Style.BackColor = Color.Black;
- }
- for (int i = 0; i < студентыDataGridView.ColumnCount; i++);
- for (int j = 0; j < студентыDataGridView.ColumnCount; j++);
- if (студентыDataGridView[i, j].Value != null) ;
- if (студентыDataGridView[i, j].Value.ToString().IndexOf(textBox1.Text) > -1)
- {
- студентыDataGridView[i, j].Style.BackColor = Color.AliceBlue;
- студентыDataGridView[i, j].Style.ForeColor = Color.Blue;
- }
- }
- private void студентыDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- }
- private void button2_Click(object sender, EventArgs e)
- {
- студентыBindingSource.Filter = "ФИО = '" + comboBox1.Text + "'";
- }
- private void button3_Click(object sender, EventArgs e)
- {
- студентыBindingSource.Filter = "";
- }
- private void button5_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- }
- }
|