// "ADD" button click Event. private void button_addSch_Click(object sender, EventArgs e) { addForm = new DataAddForm(label_DateTemp, this, false); addForm.gboxSetting(gbox[gbox_index]); addForm.setDbConnect(dbConnect); addForm.Show(); }
// "Modify" button click Event. private void button_modifySch_Click(object sender, EventArgs e) { string[] datalist = new string[2]; string text = listView_Schedule.SelectedItems[0].SubItems[1].Text.ToString(); bool actCheck = listView_Schedule.SelectedItems[0].SubItems[2].Text == "Y" ? true : false; datalist = listView_Schedule.SelectedItems[0].SubItems[0].Text.Split(':'); addForm = new DataAddForm(label_DateTemp, this, true); addForm.gboxSetting(gbox[gbox_index]); addForm.setDbConnect(dbConnect); addForm.setSelectData(datalist, text, actCheck); addForm.Show(); }