Example #1
0
 void addBook_FormClosed(object sender, EventArgs e)
 {
     add = null;
     Book.Save();
     Giving.Save();
     Student.Save();
 }
Example #2
0
        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();
        }
Example #3
0
        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();
        }
Example #4
0
        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;
            }
        }
Example #5
0
 private void Save_Click(object sender, EventArgs e)
 {
     System.IO.File.Delete(@"Givs.xml");
     Giving.Save();
 }
Example #6
0
 private void GivList_FormClosing(object sender, FormClosingEventArgs e)
 {
     Giving.Save();
 }
Example #7
0
 private void Main_FormClosed(object sender, FormClosedEventArgs e)
 {
     Giving.Save();
     Student.Save();
     Book.Save();
 }