Beispiel #1
0
        private void ByByWindows(object sender, FormClosedEventArgs e)
        {
            Form frm;

            if (sender is Form)
            {
                frm = (Form)sender;
                if (frm == frmLietKeTinhGia)
                {
                    frmLietKeTinhGia = null;
                }
                if (frm == frmBangGiaGiay)
                {
                    frmBangGiaGiay = null;
                }
                if (frm == frmBangGiaThanhPham)
                {
                    frmBangGiaThanhPham = null;
                }
                if (frm == frmBangGiaInNhanh)
                {
                    frmBangGiaInNhanh = null;
                }
                if (frm == frmBangGiaInNhanhMay)
                {
                    frmBangGiaInNhanhMay = null;
                }
                if (frm == frmTinhThu)
                {
                    frmTinhThu = null;
                }
            }
        }
Beispiel #2
0
 private void btnKeQuaChaoGia_Click(object sender, EventArgs e)
 {
     if (frmLietKeTinhGia == null)
     {
         frmLietKeTinhGia             = new LietKeTinhGiaForm();
         frmLietKeTinhGia.KieuSapXep  = SapXepTinhGiaS.Khong;
         frmLietKeTinhGia.FormClosed += new FormClosedEventHandler(ByByWindows);
         //frmLietKeTinhGia.MdiParent = this;
         frmLietKeTinhGia.Show();
     }
     else
     {
         frmLietKeTinhGia.Focus();
     }
 }