예제 #1
0
        private void Main_btnDG_Click(object sender, EventArgs e)
        {
            pnl_container.Controls.Clear();
            UF_DocGia ufdg = new UF_DocGia();

            pnl_container.Controls.Add(ufdg);
        }
예제 #2
0
 private void Frm_Main_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Alt == true && e.KeyCode == Keys.NumPad1 || e.Alt == true && e.KeyCode == Keys.D1)
     {
         pnl_container.Controls.Clear();
         UF_QLMuonTra ufMT = new UF_QLMuonTra();
         pnl_container.Controls.Add(ufMT);
     }
     else if (e.Alt == true && e.KeyCode == Keys.NumPad2 || e.Alt == true && e.KeyCode == Keys.D2)
     {
         pnl_container.Controls.Clear();
         UF_NhanVien ufnv = new UF_NhanVien();
         pnl_container.Controls.Add(ufnv);
     }
     else if (e.Alt == true && e.KeyCode == Keys.NumPad3 || e.Alt == true && e.KeyCode == Keys.D3)
     {
         pnl_container.Controls.Clear();
         UF_TaiLieu uftl = new UF_TaiLieu();
         pnl_container.Controls.Add(uftl);
     }
     else if (e.Alt == true && e.KeyCode == Keys.NumPad4 || e.Alt == true && e.KeyCode == Keys.D4)
     {
         pnl_container.Controls.Clear();
         UF_DocGia ufdg = new UF_DocGia();
         pnl_container.Controls.Add(ufdg);
     }
     else if (e.Alt == true && e.KeyCode == Keys.NumPad5 || e.Alt == true && e.KeyCode == Keys.D5)
     {
         pnl_container.Controls.Clear();
         UF_PHIEU ufphieu = new UF_PHIEU();
         pnl_container.Controls.Add(ufphieu);
     }
     else if (e.Alt == true && e.KeyCode == Keys.NumPad6 || e.Alt == true && e.KeyCode == Keys.D7)
     {
         pnl_container.Controls.Clear();
         UF_ThongKe uftk = new UF_ThongKe();
         pnl_container.Controls.Add(uftk);
     }
     else if (e.Alt == true && e.KeyCode == Keys.NumPad7 || e.Alt == true && e.KeyCode == Keys.D7)
     {
         pnl_container.Controls.Clear();
         UF_PhanQuyen ufpq = new UF_PhanQuyen();
         pnl_container.Controls.Add(ufpq);
     }
     else if (e.KeyCode == Keys.Escape)
     {
         DialogResult rs = MessageBox.Show("Bạn muốn đăng xuất?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (rs == DialogResult.Yes)
         {
             Frm_Main.ActiveForm.Close();
         }
     }
 }