Example #1
0
        private void btntruyvan_Click(object sender, EventArgs e)
        {
            foreach (Form mdiChild in Main.ActiveForm.MdiChildren)
            {
                if (mdiChild.Name == "frmTimKetQua")
                {
                    mdiChild.Activate();
                    mdiChild.Close();
                }
            }
            frmTimKetQua uc = new frmTimKetQua();

            uc._truyvan  = "hopdong";
            uc._Key_id   = txtmahopdong.Text.Trim();
            uc.MdiParent = Main.ActiveForm;
            uc.Show();
        }
Example #2
0
 private void txtmasoxe_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         foreach (Form mdiChild in Main.ActiveForm.MdiChildren)
         {
             if (mdiChild.Name == "frmTimKetQua")
             {
                 mdiChild.Activate();
                 mdiChild.Close();
             }
         }
         frmTimKetQua uc = new frmTimKetQua();
         uc._truyvan  = "xe";
         uc._Key_id   = txtmasoxe.Text.Trim();
         uc.MdiParent = Main.ActiveForm;
         uc.Show();
     }
 }