void EditClick(object sender, EventArgs e) { GF.selected_id = Convert.ToInt32(btn_dgv.DGV.SelectedRows[0].Cells[btn_dgv.DGV.Columns.Count - 1].Value); using (config_yearly_dayoff_manage editPage = new config_yearly_dayoff_manage()) { editPage.Owner = this; editPage.manage_btn.Text = "UPDATE"; editPage.Text = "EDIT EMPLOYEE YEARLY DAYOFF"; editPage.ShowDialog(); } }
// DELEGATE PART :: BEGIN void AddClick(object sender, EventArgs e) { GF.selected_id = 0; using (config_yearly_dayoff_manage managePage = new config_yearly_dayoff_manage()) { managePage.Owner = this; managePage.manage_btn.Text = "ADD"; managePage.Text = "ADD EMPLOYEE YEARLY DAYOFF"; managePage.ShowDialog(); } }