private void DayClick(Object sender, EventArgs e) { Label control = (Label)sender; string[] data; if (control.Tag != null) { data = control.Tag.ToString().Split('~'); if (data[0] == "W" || data[0] == "R" || data[0] == "A") { Changes change = new Changes(int.Parse(data[1]), (data[2] + "-" + data[3] + "-" + data[4]), data[0]); Form Change = new frmChange(change); if (Change.ShowDialog() == DialogResult.OK) { FillHeaders(); FillTable(); this.Refresh(); } } else { Personnel person = new Personnel(); person = database.getPerson(int.Parse(control.Tag.ToString())); Form Person = new frmEditPerson(person); if (Person.ShowDialog() == DialogResult.OK) { ClearForm(); init(); FillHeaders(); FillTable(); this.Refresh(); } } } }
private void btnAddPersonnel_Click(object sender, EventArgs e) { Form Person = new frmEditPerson(); if (Person.ShowDialog() == DialogResult.OK) { ClearForm(); init(); FillHeaders(); FillTable(); this.Refresh(); } }