public Form1() { InitializeComponent(); JobMethods.LoadJobList(Jobs, path, dataGridView1); dataGridView1.Update(); // schedule_Timer(Jobs); }
private void button3_Click(object sender, EventArgs e)//edit { jobSchedule Job = (jobSchedule)dataGridView1.CurrentRow.DataBoundItem; EditForm edit = new EditForm(); edit.EditJob(Job); DialogResult dr = edit.ShowDialog(); if (dr == DialogResult.OK) { dataGridView1.Refresh(); } JobMethods.SaveJobList(Jobs, path); }
private void button1_Click(object sender, EventArgs e)//add { job = new jobSchedule(); EditForm edit = new EditForm(); edit.EditJob(job); DialogResult dr = edit.ShowDialog(); if (dr == DialogResult.OK) { Jobs.Add(job); DataGridRefresh(); } JobMethods.SaveJobList(Jobs, path); }
private void button2_Click(object sender, EventArgs e)//delete { JobMethods.DeleteSelectedJob(Jobs, dataGridView1, path); }