コード例 #1
0
        private void btnThoat1_Click(object sender, EventArgs e)
        {
            fLogin f = new fLogin();

            this.Hide();
            f.ShowDialog();
        }
コード例 #2
0
ファイル: TrangChu.cs プロジェクト: GLinh1210/QuanLyThuVien
        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
            fLogin lg = new fLogin();

            lg.Show();
        }
コード例 #3
0
ファイル: TrangChu.cs プロジェクト: GLinh1210/QuanLyThuVien
        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;
            }
        }
コード例 #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);
        }
コード例 #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);
        }