Exemplo n.º 1
0
 private void frmCustomersRecord1_FormClosing(object sender, FormClosingEventArgs e)
 {
     this.Hide();
     frmCustomers frm = new frmCustomers();
     frm.Show();
 }
Exemplo n.º 2
0
 private void customerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmCustomers frm = new frmCustomers();
     frm.Show();
 }
Exemplo n.º 3
0
        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[4].Value.ToString();
               frm.txtLandmark.Text = dr.Cells[3].Value.ToString();
               frm.cmbState.Text = dr.Cells[5].Value.ToString();
               frm.txtZipCode.Text = dr.Cells[6].Value.ToString();
               frm.txtPhone.Text = dr.Cells[7].Value.ToString();
               frm.txtEmail.Text = dr.Cells[8].Value.ToString();
               frm.txtMobileNo.Text = dr.Cells[9].Value.ToString();
               frm.txtTIN.Text = dr.Cells[10].Value.ToString();
               frm.txtNotes.Text = dr.Cells[11].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);
            }
        }