private void dgvAttendance_MouseDoubleClick(object sender, MouseEventArgs e) { double id = Convert.ToDouble(dgvAttendance.SelectedRows[0].Cells["IDS"].Value.ToString()); AttendanceEdit frm = new AttendanceEdit(); frm.AttendanceGet(id); frm.Show(); }
private void tsbEditLog_Click(object sender, EventArgs e) { if (Convert.ToDouble(cboEmployeesName.SelectedValue) > 0) { AttendanceEdit att = new AttendanceEdit(); att.txtEmployeeIDS.Text = Convert.ToString(cboEmployeesName.SelectedValue); att.Show(); } else { MessageBox.Show("Please choose employee."); } }