Exemplo n.º 1
0
 private void btnDangNhap_Click(object sender, EventArgs e)
 {
     tblNhanVien = new XLNHANVIEN();
     DataRow[] r = tblNhanVien.Select("Username='******' and Password ='******'");
     if (r.Count() > 0)
     {
         fMain.Text = "Quản lý Nhà Sách - Chào" + r[0]["TenNV"].ToString();
         fMain.maNV = r[0]["MaNV"].ToString();
         fMain.enableControl((int)r[0]["MaLTK"]);
         this.Close();
     }
 }
Exemplo n.º 2
0
 private void btnDN_Click(object sender, EventArgs e)
 {
     tblNHANVIEN = new XLNHANVIEN();
     DataRow[] r = tblNHANVIEN.Select("Username='******' and Password ='******'");
     if (r.Count() > 0)
     {
         fMain.Text = "Quản lý Tiệm Sửa Chữa Laptop - Chào " + r[0]["TenNV"].ToString();
         fMain.maNV = r[0]["MaNV"].ToString();
         this.Close();
     }
     else
     {
         MessageBox.Show("Sai tên tài khoản hoặc mật khẩu !!!");
     }
 }
Exemplo n.º 3
0
 private void btndangnhap_Click(object sender, EventArgs e)
 {
     tblNhanVien = new XLNHANVIEN();
     DataRow[] r = tblNhanVien.Select("Username='******' and Password = '******'");
     if (r.Count() > 0)
     {
         fMain.Text = "Quản Lý Nhà Sách - Chào " + r[0]["TenNV"].ToString();
         fMain.maNV = r[0]["MaNV"].ToString();
         fMain.enableControl((int)r[0]["MaLTK"]);
         this.Close();
     }
     else
     {
         MessageBox.Show("Sai Tên tài khoản hoặc mật khẩu!!!");
     }
 }
Exemplo n.º 4
0
 private void btnDangNhap_Click(object sender, EventArgs e)
 {
     tblNhanVien = new XLNHANVIEN();
     DataRow[] r = tblNhanVien.Select("Username='******' and Password ='******'");
     if (r.Count() > 0)
     {
         fmain.Text = "Quản lý nhà sách - Chào " + r[0]["TenNV"].ToString();
         fmain.maNV = r[0]["MaNV"].ToString();
         fmain.enableControl((int)r[0]["MaLTK"]);
         this.Close();
     }
     else
     {
         MessageBox.Show("Sai tên tà khoản và mật khẩu");
     }
 }
Exemplo n.º 5
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     
         tblNhanVien = new XLNHANVIEN();
         var r = tblNhanVien.Select("Username='******' and Password = '******'");
         if (r.Count() > 0)
         {
             nhanvien f = (nhanvien)this.MdiParent;
             f.Text = "Quản lí Nhà Sách - Chào" + r[0]["TenNV"].ToString();
             f.maNV = r[0]["MaNV"].ToString();
             f.EnableControl((int)r[0]["MaLTK"]);
             this.Close();
         }
         else
             MessageBox.Show("Sai tên tài khoản và mật khẩu!!!");
     
 }
Exemplo n.º 6
0
        private void btnDangnhap_Click(object sender, EventArgs e)
        {
            tblNhanVien = new XLNHANVIEN();
            var r = tblNhanVien.Select("Username='******' and Password='******'");

            if (r.Count() > 0)
            {
                NhanVien f = (NhanVien)this.MdiParent;
                f.Text = "Quản Lý Nhà Sách - Chào" + r[0]["TenNV"].ToString();
                f.maNV = r[0]["MaNV"].ToString();
                f.enableControl((int)r[0]["MaLTK"]);
                this.Close();
            }
            else
            {
                MessageBox.Show("Sai tài khoản hoặc mật khẩu!!");
            }
        }
Exemplo n.º 7
0
        private void btdangnhap_Click(object sender, EventArgs e)
        {
            tbnhnavien = new XLNHANVIEN();
            var r = tbnhnavien.Select("Username= '******'and Password='******'");

            if (r.Count() > 0)
            {
                formmain f = (formmain)this.MdiParent;
                f.Text = "Quản lý Nhà sách -Chào" + r[0]["TENNV"].ToString();
                f.maNV = r[0]["MaNV"].ToString();
                f.enablecontrol((int)r[0]["MaLTK"]);
                this.Close();
            }
            else
            {
                MessageBox.Show("Sai tên đăng nhập hoặc mật khẩu");
            }
        }
Exemplo n.º 8
0
        private void btnDangNhap_Click(object sender, EventArgs e)
        {
            tblNhanVien = new XLNHANVIEN();
            var r = tblNhanVien.Select("Username='******'and Password='******' ");

            if (r.Count() > 0)
            {
                frmMain f = (frmMain)this.MdiParent;
                f.Text = "Quản Lý Nhà Sách - Chào " + r[0]["TenNV"].ToString();
                f.maNV = r[0]["MaNV"].ToString();
                f.enableControl((int)r[0]["MaLTK"]);

                this.Close();
            }
            else
            {
                MessageBox.Show("Sai Tên Đăng Nhập Và Mật Khẩu!!! Vui lòng thử lại!");
            }
        }
Exemplo n.º 9
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            tblNhanVien = new XLNHANVIEN();
            DataRow[] r = tblNhanVien.Select("Username='******' and Password = '******'");
            if (txtTenDangNhap.Text == "" || txtMatKhau.Text == "")
            {
                MessageBox.Show("Vui lòng điền tên đăng nhập và mật khẩu!");
                return;
            }
            if (r.Count() > 0)
            {
                frmMain f = (frmMain)this.MdiParent;
                fMain.Text = "Tiệm sách Tri Thức - Chào " + r[0]["TenNV"].ToString();
                fMain.maNV = r[0]["MaNV"].ToString();
                fMain.enableControl((int)r[0]["MaLTK"]);

                this.Close();
            }
            else
            {
                MessageBox.Show("Sai tên đăng nhập hoặc mật khẩu!!!");
            }
        }