Exemple #1
0
 private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == tbLogout)
     {
         new frmLogin().Show();
         this.Close();
     }
     else if (e.Button == tbMuon)
     {
         frmMuonSach frmmuon = new frmMuonSach();
         frmmuon.MdiParent = this;
         frmmuon.Show();
     }
     else if (e.Button == tbTra)
     {
         frmTraSach fTra = new frmTraSach();
         fTra.MdiParent = this;
         fTra.Show();
     }
     else if (e.Button == tbThoat)
     {
         DialogResult rs = MessageBox.Show(this, "Bạn có chắc thoát chương trình chưa", "Thong bao", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (rs == DialogResult.Yes)
         {
             Application.Exit();
         }
     }
 }
Exemple #2
0
        private void mnuMuon_Click(object sender, System.EventArgs e)
        {
            frmMuonSach frmmuon = new frmMuonSach();

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