private void frmEmpRecords_FromClosing(object sender, FormClosingEventArgs e) { this.Hide(); frmEmployee frm = new frmEmployee(); frm.Show(); }
private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { DataGridViewRow row = dataGridView1.SelectedRows[0]; this.Hide(); frmEmployee frmEmp = new frmEmployee(); frmEmp.Show(); frmEmp.txtEmpId.Text = row.Cells[0].Value.ToString(); frmEmp.txtName.Text = row.Cells[1].Value.ToString(); frmEmp.txtSurname.Text = row.Cells[2].Value.ToString(); frmEmp.dateOfbirth.Value = Convert.ToDateTime(row.Cells[3].Value.ToString()); frmEmp.txtContactno.Text = row.Cells[4].Value.ToString(); frmEmp.txtAddress.Text = row.Cells[5].Value.ToString(); frmEmp.txtPosition.Text = row.Cells[6].Value.ToString(); frmEmp.txtEmailAdd.Text = row.Cells[7].Value.ToString(); }
private void employeeInfoToolStripMenuItem_Click(object sender, EventArgs e) { frmEmployee frmEmp = new frmEmployee(); frmEmp.Show(); }