private void UpdataToolStripMenuItem_Click(object sender, EventArgs e) { if (PipulsInfo.SelectedItems.Count > 0) { FullName = PipulsInfo.SelectedItems[0].SubItems[1].Text; Birthdays = PipulsInfo.SelectedItems[0].SubItems[2].Text; StPass = PipulsInfo.SelectedItems[0].SubItems[3].Text; StHome = PipulsInfo.SelectedItems[0].SubItems[4].Text; StHomeInfo = PipulsInfo.SelectedItems[0].SubItems[5].Text; StHealth = PipulsInfo.SelectedItems[0].SubItems[6].Text; Stbehvior = PipulsInfo.SelectedItems[0].SubItems[7].Text; StShool = PipulsInfo.SelectedItems[0].SubItems[8].Text; StPolice = PipulsInfo.SelectedItems[0].SubItems[9].Text; StMName = PipulsInfo.SelectedItems[0].SubItems[10].Text; StFName = PipulsInfo.SelectedItems[0].SubItems[11].Text; StBr_Sist = PipulsInfo.SelectedItems[0].SubItems[12].Text; StFamNote = PipulsInfo.SelectedItems[0].SubItems[13].Text; StMWork = PipulsInfo.SelectedItems[0].SubItems[14].Text; StFWork = PipulsInfo.SelectedItems[0].SubItems[15].Text; IsChange = true; AddPerson CreatPupil = new AddPerson(); CreatPupil.ShowDialog(); IsChange = false; if (Changed) { Changed = false; string data = PipulsInfo.SelectedItems[0].SubItems[0].Text; int i = 1; while (Allclass[Nnow][i++].IndexOf(data + "|") != 0) { ; } i--; Allclass[Nnow][i] = PipulsInfo.SelectedItems[0].SubItems[0].Text + "|" + FullName + "|" + Birthdays + "|" + StPass + "|" + StHome + "|" + StHomeInfo + "|" + StHealth + "|" + Stbehvior + "|" + StShool + "|" + StPolice + "|" + StMName + "|" + StFName + "|" + StBr_Sist + "|" + StFamNote + "|" + StMWork + "|" + StFWork; ChangeClass(); } } else { MessageBox.Show("Выберите ученика"); } }
private void addToolStripMenuItem_Click(object sender, EventArgs e) { if (Nnow >= 0) { AddPerson CreatPupil = new AddPerson(); CreatPupil.ShowDialog(); kol[Nnow]++; ListViewItem lvi = new ListViewItem(new string[] { (kol[Nnow] - 1).ToString(), FullName, Birthdays, StPass, StHome, StHomeInfo, StHealth, Stbehvior, StShool, StPolice, StMName, StFName, StBr_Sist, StFamNote, StMWork, StFWork }); PipulsInfo.Items.Add(lvi); Array.Resize(ref Allclass[Nnow], kol[Nnow]); Allclass[Nnow][kol[Nnow] - 1] = (kol[Nnow] - 1).ToString() + "|" + FullName + "|" + Birthdays + "|" + StPass + "|" + StHome + "|" + StHomeInfo + "|" + StHealth + "|" + Stbehvior + "|" + StShool + "|" + StPolice + "|" + StMName + "|" + StFName + "|" + StBr_Sist + "|" + StFamNote + "|" + StMWork + "|" + StFWork; } else { MessageBox.Show("Класс не выбран"); } }