="justify">}
}
}
.5 Form 5 - Додавання або видалення абонента
using System; System. Collections. Generic; System. ComponentModel; System. Data; System. Drawing; System. Text; System. Windows. Forms; System. Text. RegularExpressions; WindowsApplication1
{partial class Form3: Form
{Form3 ()
{();
} void Form3_Load (object sender, EventArgs e)
{
/ / TODO: This line of code loads data into the «libDataSet1. Абоненти » table. You can move, or remove it, as needed .. абонентиTableAdapter. Fill (this.libDataSet1. Абоненти);. Tables [«Абоненти»]. PrimaryKey=new DataColumn [] {libDataSet1. Tables [«Абоненти»]. Columns [8]};
} void label2_Click (object sender, EventArgs e)
{
} void button1_Click (object sender, EventArgs e)
{
абонентиTableAdapter. Update (libDataSet1); (); a=new Form1 ();. ShowDialog ();. Close ();
} void button3_Click (object sender, EventArgs e)
{(dataGridView1. CurrentRow!=null)
{((int) dataGridView1. CurrentRow. Cells [9]. Value == 0). Rows. RemoveAt (dataGridView1. CurrentRow. Index);. Show («Ви не можете видалити абонента, поки у нього на руках знаходиться хоча б одна книга.»);
}
} void button2_Click (object sender, EventArgs e)
{(textBox1. Text!=«» && textBox2. Text!=«» && textBox3. Text!=«» && textBox5. Text!=«» &&. Text!=«» && Regex. IsMatch (Pass. Text, «^ d + $») && libDataSet1. Tables [«Абоненти»]. Rows. Find (Pass. Text) == null). Tables [«Абоненти»]. Rows. Add (textBox3. Text, textBox1. Text, textBox2. Text, DateOfBirth. Value. Date. ToString (), textBox5. Text, textBox6. Text, HouseNum. Value, ApartNum. Value, Pass. Text, 0);
} void dateTimePicker1_ValueChanged (object sender, EventArgs e)
{
} void numericUpDown1_ValueChanged (object sender, EventArgs e)
{
}
}
}
3.6 Form 6 - Запис і здача книг
System; System. Collections. Generic; System. ComponentModel; System. Data; System. Drawing; System. Text; System. Windows. Forms; System. Text. RegularExpressions; WindowsApplication1
{partial class Form6: Form
{Form6 ()
{();
} void button1_Click (object sender, EventArgs e)
{
взятие_кнігіTableAdapter. Update (libDataSet1);
абонентиTableAdapter. Update (libDataSet1);
кнігіTableAdapter. Update (libDataSet1); (); a=new Form1 ();. ShowDialog ();. Close ();
} void label6_Click (object sender, EventArgs e)
{
} void Form6_Load (object sender, EventArgs e)
{