private void button_Click(object sender, RoutedEventArgs e) { AddOvertime addOvertime = new AddOvertime(); addOvertime.mode = 1; addOvertime.empid = empid; addOvertime.Show(); }
private void edit_Click(object sender, RoutedEventArgs e) { var x = ((DMSIClass._Overtime)datagridview.SelectedItem); AddOvertime addOvertime = new AddOvertime(); addOvertime.overtimeid = x.OvertimeID; addOvertime.mode = 2; addOvertime.empid = empid; addOvertime.Show(); }