void addBook_FormClosed(object sender, EventArgs e) { add = null; Book.Save(); Giving.Save(); Student.Save(); }
private void Dell_Click(object sender, EventArgs e) { int n = GivGrid.SelectedCells[0].RowIndex; globals.GivtList.RemoveAt(n); System.IO.File.Delete(@"Givs.xml"); Giving.Save(); Print(); }
private void toolStripButton1_Click(object sender, EventArgs e) { int k = 0; int n = GivGrid.SelectedCells[0].RowIndex; foreach (Giving o in globals.GivtList) { string s = GivGrid.Rows[n].Cells["ID"].Value.ToString(); if (o.id == s) { k = globals.GivtList.IndexOf(o); } } globals.GivtList[k].status = true; System.IO.File.Delete(@"Givs.xml"); Giving.Save(); GivGrid.Rows.Clear(); Print(); }
private void button2_Click(object sender, EventArgs e) { string reader = TicketBox.Text; if (Reader_Search(reader)) { string giv = givBox.Text; string get = getBox.Text; string[] books = tmp.ToArray(); Giving ng = new Giving(reader, get, books); globals.GivtList.Add(ng); Giving.Save(); this.Close(); } else { MessageBox.Show(this, "Такого читателя нет", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } }
private void Save_Click(object sender, EventArgs e) { System.IO.File.Delete(@"Givs.xml"); Giving.Save(); }
private void GivList_FormClosing(object sender, FormClosingEventArgs e) { Giving.Save(); }
private void Main_FormClosed(object sender, FormClosedEventArgs e) { Giving.Save(); Student.Save(); Book.Save(); }