Ejemplo n.º 1
0
        private void Main_Load(object sender, EventArgs e)
        {
            dataDataContext db  = new dataDataContext();
            var             Lst = (from s in db.TaiKhoans where s.userid == id select s).ToList();
            // ListViewItem ls = new ListViewItem();
            dataDataContext db1  = new dataDataContext();
            int             us   = Lst[0].userid;
            var             Lst2 = (from s in db1.NhanViens where s.userid == us select s).ToList();

            if (Lst[0].role.ToString() == "True")
            {
                danhMụcNhânViênToolStripMenuItem.Enabled       = true;
                quảnLýCácRàngBuộcToolStripMenuItem1.Enabled    = true;
                thốngKêToolStripMenuItem.Enabled               = true;
                quảnLýDanhMụcTàiKhoảnToolStripMenuItem.Enabled = true;
                toolStripButton5.Enabled = true;
                toolStripLabel5.Enabled  = true;
                MessageBox.Show("Xin Chao " + Lst2[0].TenNv.ToString() + "\nChức vụ admin", "\nChức vụ admin");
            }
            else
            {
                MessageBox.Show("Xin Chao " + Lst2[0].TenNv.ToString() + "\nChức vụ user", "\nChức vụ user");
            }
            // MessageBox.Show(Lst[0].role.ToString());
            frmThongKePhieuMuon ds = new frmThongKePhieuMuon();

            ds.MdiParent = this;
            ds.Show();
        }
Ejemplo n.º 2
0
        private void toolStripLabel5_Click(object sender, EventArgs e)
        {
            frmThongKePhieuMuon ds = new frmThongKePhieuMuon();

            ds.MdiParent = this;
            ds.Show();
        }