Beispiel #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmEmployeeDetails newForm = new frmEmployeeDetails();

            newForm.Show();
            this.Hide();
        }
Beispiel #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dgvEmployee.RowCount > 0)
     {
         int rowIndex               = dgvEmployee.CurrentCell.RowIndex;
         int primaryKey             = Convert.ToInt32(dgvEmployee.Rows[rowIndex].Cells[5].Value);
         frmEmployeeDetails newForm = new frmEmployeeDetails(primaryKey);
         newForm.Show();
         this.Hide();
     }
 }