private void frmCustomersRecord1_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.Hide();
     frmCustomers frm = new frmCustomers();
     frm.Show();
 }
 private void profileEntryToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmCustomers frm = new frmCustomers();
     frm.Show();
 }
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try{
            DataGridViewRow dr = dataGridView1.SelectedRows[0];
            this.Hide();
            frmCustomers frm= new frmCustomers();
               frm.Show();
               frm.txtCustomerID.Text = dr.Cells[0].Value.ToString();
               frm.txtCustomerName.Text = dr.Cells[1].Value.ToString();
               frm.txtAddress.Text = dr.Cells[2].Value.ToString();
               frm.txtCity.Text = dr.Cells[3].Value.ToString();
               frm.txtContactNo.Text = dr.Cells[4].Value.ToString();
               frm.txtContactNo1.Text = dr.Cells[5].Value.ToString();
               frm.txtEmail.Text = dr.Cells[6].Value.ToString();
               frm.txtNotes.Text = dr.Cells[7].Value.ToString();
               frm.btnUpdate.Enabled = true;
               frm.btnDelete.Enabled = true;
               frm.btnSave.Enabled = false;
               frm.txtCustomerName.Focus();
             }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }