private void button_Click(object sender, RoutedEventArgs e) { AddLeave addLeave = new AddLeave(); addLeave.mode = 1; addLeave.empid = empid; addLeave.Show(); }
private void edit_Click(object sender, RoutedEventArgs e) { var x = ((Leave)datagridview.SelectedItem); AddLeave addLeave = new AddLeave(); addLeave.leaveid = x.LeaveID; addLeave.mode = 2; addLeave.empid = empid; addLeave.Show(); }