Ejemplo n.º 1
0
        private void toolStripMenuDangNhap_Click(object sender, EventArgs e)
        {
            if (f_DangNhap == null || f_DangNhap.IsDisposed)//dang nhap he thong
            {
                f_DangNhap = new frmDangNhap();
                //f_DangNhap.FormBorderStyle = FormBorderStyle.None;

                f_DangNhap.MdiParent = this;
                f_DangNhap.Show();
            }
            else
                f_DangNhap.Activate();
            //loadData();
        }
Ejemplo n.º 2
0
        private void loadData()
        {
            if (frmDangNhap.TenDN != "")
            {
                frmDangNhap f = new frmDangNhap();
                int         i = Convert.ToInt32(Q);
                //MessageBox.Show(i.ToString());

                switch (i)
                {
                case 0:
                {
                    //tsmBaoCao.Enabled = false;
                    //tsmLuongBong.Enabled = false;
                    tsmThongTin.Enabled  = true;
                    tsmTuyenDung.Enabled = true;
                    tsmTimKiem.Enabled   = true;
                    break;
                }

                case 1:
                {
                    tsmBaoCao.Enabled    = true;
                    tsmLuongBong.Enabled = true;
                    tsmThongTin.Enabled  = true;
                    tsmTuyenDung.Enabled = true;
                    tsmTimKiem.Enabled   = true;
                    break;
                }

                case 2:
                {
                    tsmBaoCao.Enabled              = true;
                    tsmLuongBong.Enabled           = true;
                    tsmThongTin.Enabled            = true;
                    tsmTuyenDung.Enabled           = true;
                    tsmTimKiem.Enabled             = true;
                    toolStripMenuPhanQuyen.Enabled = true;
                    break;
                }
                }
            }
        }
Ejemplo n.º 3
0
 public void frmMain_Load(object sender, EventArgs e)
 {
     tsmBaoCao.Enabled              = false;
     tsmLuongBong.Enabled           = false;
     tsmThongTin.Enabled            = false;
     tsmTuyenDung.Enabled           = false;
     tsmTimKiem.Enabled             = false;
     toolStripMenuPhanQuyen.Enabled = false;
     if (frmDangNhap.TenDangNhap == null)
     {
         f_DangNhap           = new frmDangNhap();
         f_DangNhap.MdiParent = this;
         f_DangNhap.Show();
     }
     else
     {
         loadData();
     }
 }
Ejemplo n.º 4
0
        public void frmMain_Load(object sender, EventArgs e)
        {


            expandablePanel1ThanhChucNang.Enabled = true;
            toolStripBtnChiLuong.Enabled = false;
            toolStripBtnChamCong.Enabled = false;
            toolStripBtnHopDong.Enabled = false;
            toolStripBtnKhenThuong.Enabled = false;
            toolStripBtnNghiViec.Enabled = false;
            toolStripBtnTuyenDung.Enabled = false;
            toolStripBtnChucVu.Enabled = false;
            toolStripBtnNhanVien.Enabled = false;
            toolStripBtnUngVien.Enabled = false;
            tsmBaoCao.Enabled = false;
            tsmLuongBong.Enabled = false;
            tsmThongTin.Enabled = false;
            tsmTuyenDung.Enabled = false;
            tsmTimKiem.Enabled = false;
            sideBarPanelBaoCao.Enabled = false;
            sideBarPanelLuongBong.Enabled = false;
            sideBarPanelThongTin.Enabled = false;
            sideBarPanelTimKiem.Enabled = false;
            sideBarPanelTuyenDung.Enabled = false;
            toolStripMenuPhanQuyen.Enabled = false;
            if (frmDangNhap.TenDangNhap == null)
            {

                f_DangNhap = new frmDangNhap();
                //f_DangNhap.FormBorderStyle = FormBorderStyle.None;
                f_DangNhap.MdiParent = this;
                f_DangNhap.Show();


            }
            else
            {
                loadData();
            }
        }
Ejemplo n.º 5
0
        private void loadData()
        {
           
            if (frmDangNhap.TenDN !="")
            {
                frmDangNhap f = new frmDangNhap();
                int i = Convert.ToInt32(Q);
                //MessageBox.Show(i.ToString());
               
                switch (i)
                {
                    case 0:
                        {
                            toolStripBtnKhenThuong.Enabled =true;
                            toolStripBtnNghiViec.Enabled = true;
                            toolStripBtnTuyenDung.Enabled = true;
                            toolStripBtnChucVu.Enabled = true;
                            toolStripBtnNhanVien.Enabled = true;
                            toolStripBtnUngVien.Enabled = true;
                            //tsmBaoCao.Enabled = false;
                            //tsmLuongBong.Enabled = false;
                            tsmThongTin.Enabled = true;
                            tsmTuyenDung.Enabled = true;
                            tsmTimKiem.Enabled = true;
                            //sideBarPanelBaoCao.Enabled = false;
                            //sideBarPanelLuongBong.Enabled = false;
                            sideBarPanelThongTin.Enabled = true;
                            sideBarPanelTimKiem.Enabled = true;
                            sideBarPanelTuyenDung.Enabled = true;
                            toolStripMenuHopDong.Enabled = false;
                            break;
                        }
                    case 1:
                        {
                            toolStripBtnHopDong.Enabled =true;
                            toolStripBtnChamCong.Enabled = true;
                            toolStripBtnChiLuong.Enabled = true;
                            toolStripBtnKhenThuong.Enabled = true;
                            toolStripBtnNghiViec.Enabled = true;
                            toolStripBtnTuyenDung.Enabled = true;
                            toolStripBtnChucVu.Enabled = true;
                            toolStripBtnNhanVien.Enabled = true;
                            toolStripBtnUngVien.Enabled = true;
                            tsmBaoCao.Enabled = true;
                            tsmLuongBong.Enabled = true;
                            tsmThongTin.Enabled = true;
                            tsmTuyenDung.Enabled = true;
                            tsmTimKiem.Enabled = true;
                            sideBarPanelBaoCao.Enabled = true;
                            sideBarPanelLuongBong.Enabled = true;
                            sideBarPanelThongTin.Enabled = true;
                            sideBarPanelTimKiem.Enabled = true;
                            sideBarPanelTuyenDung.Enabled = true;
                            toolStripMenuHopDong.Enabled = true;
                            break;
                        }
                    case 2:
                        {
                            toolStripBtnHopDong.Enabled = true;
                            toolStripBtnChamCong.Enabled = true;
                            toolStripBtnChiLuong.Enabled = true;
                            toolStripBtnKhenThuong.Enabled = true;
                            toolStripBtnNghiViec.Enabled = true;
                            toolStripBtnTuyenDung.Enabled = true;
                            toolStripBtnChucVu.Enabled = true;
                            toolStripBtnNhanVien.Enabled = true;
                            toolStripBtnUngVien.Enabled = true;
                            tsmBaoCao.Enabled = true;
                            tsmLuongBong.Enabled = true;
                            tsmThongTin.Enabled = true;
                            tsmTuyenDung.Enabled = true;
                            tsmTimKiem.Enabled = true;
                            sideBarPanelBaoCao.Enabled = true;
                            sideBarPanelLuongBong.Enabled = true;
                            sideBarPanelThongTin.Enabled = true;
                            sideBarPanelTimKiem.Enabled = true;
                            sideBarPanelTuyenDung.Enabled = true;
                            toolStripMenuHopDong.Enabled = true;
                            toolStripMenuPhanQuyen.Enabled =true;
                            
                            

                            break;
                        }
                }
            }
            
        }