Esempio n. 1
0
        private void btnThoat1_Click(object sender, EventArgs e)
        {
            fLogin f = new fLogin();

            this.Hide();
            f.ShowDialog();
        }
Esempio n. 2
0
        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
            fLogin lg = new fLogin();

            lg.Show();
        }
Esempio n. 3
0
        private void TrangChu_FormClosing(object sender, FormClosingEventArgs e)
        {
            fLogin lg = new fLogin();

            lg.Close();
            DialogResult d = MessageBox.Show("Bạn có muốn thoát chương trình không?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (d == DialogResult.No)
            {
                e.Cancel = true;
            }
        }
Esempio n. 4
0
        public FrmHome(fLogin _flg, string _tdn)
        {
            InitializeComponent();
            tdn = _tdn;
            fLg = _flg;
            DataProvider _dt = new DataProvider();
            DataTable    dt  = _dt.GetData("select * from ACCOUNT where ACCOUNT.TenDangNhap = '" + tdn + "'");
            string       gt  = dt.Rows[0]["Quyen"].ToString();

            if (gt == "1")
            {
                ribbonTrangChu.Visible = false;
                ribbonThongKe.Visible  = false;
                barBtnQLSach.Enabled   = false;
                barBtnQLPM.Enabled     = false;
                barBtnQLPT.Enabled     = false;
                nBG_QL.Visible         = false;
                nBG_TK.Visible         = false;
            }
            else
            {
                bar_SachDangMuon.Enabled = false;
                bar_LichSu.Enabled       = false;
                nBG_LSMS.Visible         = false;
                rbpG_TK.Visible          = false;
            }
            //lb_ChayChu.Text = "Phần mềm được\n   thực hiện bởi\nPhạm Ngọc Hải\n        và     \nPhạm Minh Hoàng";
            //lb_ChayChu.Text = "Welcome";
            //lb_ChayChu.Top = 1;
            DevExpress.UserSkins.BonusSkins.Register();
            OfficeSkins.Register();
            DevExpress.XtraBars.Helpers.SkinHelper.InitSkinGallery(skinRibbonGalleryBarItem1, true);

            panelCha.Controls.Clear();
            ucIntroduce frm = new ucIntroduce();

            frm.Dock = System.Windows.Forms.DockStyle.Fill;
            panelCha.Controls.Add(frm);
        }
Esempio n. 5
0
        public fTableManage(fLogin _flg, string _tdn)
        {
            InitializeComponent();
            tdn = _tdn;
            fLg = _flg;
            DataProvider _dt = new DataProvider();
            DataTable    dt  = _dt.GetData("select * from ACCOUNT where ACCOUNT.TenDangNhap = '" + tdn + "'");
            string       gt  = dt.Rows[0]["Quyen"].ToString();

            if (gt == "1")
            {
                ribbonTrangChu.Visible = false;
                ribbonThongKe.Visible  = false;
                barBtnQLSach.Enabled   = false;
                barBtnQLPM.Enabled     = false;
                barBtnQLPT.Enabled     = false;
                nBG_QL.Visible         = false;
                nBG_TK.Visible         = false;
            }
            else
            {
                bar_SachDangMuon.Enabled = false;
                bar_LichSu.Enabled       = false;
                nBG_LSMS.Visible         = false;
                rbpG_TK.Visible          = false;
            }

            DevExpress.UserSkins.BonusSkins.Register();
            DevExpress.UserSkins.OfficeSkins.Register();
            DevExpress.XtraBars.Helpers.SkinHelper.InitSkinGallery(skinRibbonGalleryBarItem1, true);

            panelCha.Controls.Clear();
            ucFrmGioiThieu frm = new ucFrmGioiThieu();

            frm.Dock = System.Windows.Forms.DockStyle.Fill;
            panelCha.Controls.Add(frm);
        }