Esempio n. 1
0
        private void btnDangXuat_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            int a = 0;

            a = Program.KetNoi();
            Program.frmChinh.btNhanVien_DMuc.Enabled = false;
            Program.frmChinh.btnDangXuat.Enabled     = false;
            Program.frmChinh.btnTaotaikhoan.Enabled  = false;
            Program.frmChinh.btVattu_DMuc.Enabled    = false;
            Program.frmChinh.btnKho_DMuc.Enabled     = false;
            Program.frmChinh.btnDonDH_DM.Enabled     = false;
            Program.frmChinh.btnPhieuNhap_DM.Enabled = false;
            Program.frmChinh.btnPhieuXuat.Enabled    = false;
            Program.frmChinh.btnXoaTaiKhoan.Enabled  = false;
            Program.frmChinh.btnBaoCao.Enabled       = false;
            Program.frmChinh.MaNV.Text  = "Mã nhân viên: ";
            Program.frmChinh.HoTen.Text = "Họ tên: ";
            Program.frmChinh.Nhom.Text  = "Nhóm: ";
            Form frm = this.CheckExists(typeof(Form_login));

            if (frm != null)
            {
                frm.Activate();
                frm.Show();
            }
            else
            {
                Form_login f = new Form_login();
                f.MdiParent = this;
                f.Show();
            }
        }
Esempio n. 2
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     frmChinh = new frmMain();
     frmDN    = new Form_login();
     Application.Run(frmChinh);
     // Application.Run(frmDN);
 }
Esempio n. 3
0
        private void btnDangnhap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Form frm = this.CheckExists(typeof(Form_login));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                Form_login f = new Form_login();
                f.MdiParent = this;
                f.Show();
            }
        }