private void New_Click(object sender, EventArgs e) { Vid novoe = new Vid(); novoe.ShowDialog(); dataGridView1.DataSource = FILE_WORK.ReadTable(); }
private void Delete_Click(object sender, EventArgs e) { int ind = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value); FILE_WORK.Delete(ind); dataGridView1.DataSource = FILE_WORK.ReadTable(); }
public Details(int _id) { string st = FILE_WORK.ReadLine(_id); string[] ss = st.Split(';'); id = Convert.ToInt32(ss[0]); nazv = ss[1]; vid = ss[2]; opisanie = (ss[3]); }
private void FillData() { dataGridView1.DataSource = FILE_WORK.ReadTable(); dataGridView1.AutoSize = false; dataGridView1.RowHeadersWidth = 20; dataGridView1.Columns[0].Width = 30; dataGridView1.Columns[1].Width = 150; dataGridView1.Columns[2].Visible = false; dataGridView1.Columns[3].Visible = false; }
public void Save() { FILE_WORK.UpDate(id, nazv, vid, opisanie); }