Example #1
0
        private void customerToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            SearchCustomer search = new SearchCustomer();

            search.MdiParent = this;
            search.Show();
        }
Example #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     SearchCustomer SearchCus = new SearchCustomer();
     SearchCus.ShowDialog();
     if (SearchCus.DialogResult == DialogResult.OK)
     {
         TxtIDCli.Text= SearchCus.dataGridView1.Rows[SearchCus.dataGridView1.CurrentRow.Index].Cells[0].Value.ToString();
         TxtNaCli.Text = SearchCus.dataGridView1.Rows[SearchCus.dataGridView1.CurrentRow.Index].Cells[1].Value.ToString();
         TxtAdCli.Text = SearchCus.dataGridView1.Rows[SearchCus.dataGridView1.CurrentRow.Index].Cells[2].Value.ToString();
         
     }
 }
Example #3
0
        private void BtnCustomer_Click(object sender, EventArgs e)
        {
            SearchCustomer SearchCus = new SearchCustomer();

            SearchCus.ShowDialog();
            if (SearchCus.DialogResult == DialogResult.OK)
            {
                TxtID.Text              = SearchCus.dataGridView1.Rows[SearchCus.dataGridView1.CurrentRow.Index].Cells[0].Value.ToString();
                LblCustomerName.Text    = SearchCus.dataGridView1.Rows[SearchCus.dataGridView1.CurrentRow.Index].Cells[1].Value.ToString();
                LblCustomerAddress.Text = SearchCus.dataGridView1.Rows[SearchCus.dataGridView1.CurrentRow.Index].Cells[2].Value.ToString();
                TxtIDPro.Focus();
            }
        }