Esempio n. 1
0
        private void Form_TPB_Load(object sender, EventArgs e)
        {
            //form Thông tin cá nhân và đổi mật khẩu

            btnThoat.Hide();
            NhanVien pbt_tpb = nvbll.kiemTraDangNhap_PhongBanThuong_TPB(FormDangNhap._tenDN, FormDangNhap._MK);
            NhanVien pbt_nv  = nvbll.kiemTraDangNhap_PhongBanThuong_NV(FormDangNhap._tenDN, FormDangNhap._MK);
            NhanVien pda_tpb = nvbll.kiemTraDangNhap_PhongDuAn_TPB(FormDangNhap._tenDN, FormDangNhap._MK);
            NhanVien pda_nv  = nvbll.kiemTraDangNhap_PhongDuAn_NV(FormDangNhap._tenDN, FormDangNhap._MK);

            if (pbt_tpb != null)
            {
                rbPage_PhongThuong_NV.Dispose();
                rbPage_PhongDuAn_TPB.Dispose();
                rbPage_PhongDuAn_NV.Dispose();
                Form_ThongTinCaNhan form = new Form_ThongTinCaNhan();
                form.MdiParent = this;
                form.Show();
                f_TTCN = false;
            }
            else if (pbt_nv != null)
            {
                rbPage_PhongThuong_TPB.Dispose();
                rbPage_PhongDuAn_TPB.Dispose();
                rbPage_PhongDuAn_NV.Dispose();
                Form_ThongTinCaNhan form = new Form_ThongTinCaNhan();
                form.MdiParent = this;
                form.Show();
                f_TTCN = false;
            }
            else if (pda_tpb != null)
            {
                rbPage_PhongThuong_TPB.Dispose();
                rbPage_PhongThuong_NV.Dispose();
                rbPage_PhongDuAn_NV.Dispose();
                Form_ThongTinCaNhan form = new Form_ThongTinCaNhan();
                form.MdiParent = this;
                form.Show();
                f_TTCN = false;
            }
            else if (pda_nv != null)
            {
                rbPage_PhongThuong_TPB.Dispose();
                rbPage_PhongThuong_NV.Dispose();
                rbPage_PhongDuAn_TPB.Dispose();
                Form_ThongTinCaNhan form = new Form_ThongTinCaNhan();
                form.MdiParent = this;
                form.Show();
                f_TTCN = false;
            }
            else
            {
                MessageBox.Show("Lỗi ");
            }
        }
Esempio n. 2
0
        public void loadFormThongTin()
        {
            Form_ThongTinCaNhan form = new Form_ThongTinCaNhan();

            if (f_TTCN == true)
            {
                form.MdiParent = this;
                form.Show();

                f_TTCN = false;
            }

            else if (f_TTCN == false)
            {
                // form.MdiParent = this;
                form.Activate();
                // form.Focus();
                // form.ActiveControl.Focus();
                // tabbedView1.Controller.Activate();
            }
        }