Ejemplo n.º 1
0
        private void bBtnStudent_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Form frm = this.CheckExists(typeof(frmSinhVien));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                frmSinhVien frmSinhVien = new frmSinhVien();
                frmSinhVien.MdiParent = this;
                frmSinhVien.Show();
            }
        }
Ejemplo n.º 2
0
        public frmMain()
        {
            InitializeComponent();
            this.Text         = "FORM MAIN";
            lbMaGVLogin.Text  = Program.username;
            lbHoTenLogin.Text = Program.mHoten;
            lbGroupLogin.Text = Program.mGroup;
            if (Program.mGroup == "User")
            {
                bBtnTaoTK.Enabled       = false;
                bBtnDiemTongKet.Enabled = false;
                bBtnDiemThi.Enabled     = false;
                bBtnDSLop.Enabled       = false;
                bBtnPhieuDiem.Enabled   = false;
                bBtnGrade.Enabled       = false;
                bBtnDiemMH.Enabled      = false;
                bBtnFee.Enabled         = false;
                bBtnHPLop.Enabled       = false;
                btnDongHocPhi.Enabled   = false;
            }
            if (Program.mGroup != "PKeToan")
            {
                bBtnFee.Enabled       = false;
                bBtnHPLop.Enabled     = false;
                btnDongHocPhi.Enabled = false;
            }
            else
            {
                bBtnClass.Enabled       = false;
                bBtnGrade.Enabled       = false;
                bBtnSubject.Enabled     = false;
                bBtnGrade.Enabled       = false;
                bBtnDiemTongKet.Enabled = false;
                bBtnDiemThi.Enabled     = false;
                bBtnDSLop.Enabled       = false;
                bBtnPhieuDiem.Enabled   = false;
                bBtnGrade.Enabled       = false;
                bBtnDiemMH.Enabled      = false;
            }


            if (!Program.mChinhanh.ToString().Trim().Equals("2"))
            {
                Form frm = this.CheckExists(typeof(frmSinhVien));
                if (frm != null)
                {
                    frm.Activate();
                }
                else
                {
                    frmSinhVien frmSinhVien = new frmSinhVien();
                    frmSinhVien.MdiParent = this;
                    frmSinhVien.Show();
                }
            }
            else
            {
                Form frm = this.CheckExists(typeof(frmDongHocPhi));
                if (frm != null)
                {
                    frm.Activate();
                }
                else
                {
                    frmDongHocPhi frmDongHocPhi = new frmDongHocPhi();
                    frmDongHocPhi.MdiParent = this;
                    frmDongHocPhi.Show();
                }
            }
        }