Beispiel #1
0
        public bool taomoi()
        {
            laydulieu ld = new laydulieu();

            if (ld.thucthitruyvan(" insert into nhanvien(manhanvien,hoten,diachi,tendangnhap,matkhau,quyenhan) values ('" + manhanvien + "',N'" + hoten + "',N'" + diachi + "',N'" + tendangnhap + "','" + matkhau + "','" + quyenhan + "')") == 1)
            {
                ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
        public bool xoabo()
        {
            laydulieu ld = new laydulieu();

            if (ld.thucthitruyvan(" delete from nhanvien where manhanvien= '" + manhanvien + "'") == 1)
            {
                ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
        public bool capnhat()
        {
            laydulieu ld = new laydulieu();

            if (ld.thucthitruyvan(" update nhanvien set manhanvien='" + manhanvien + "',hoten=N'" + hoten + "',diachi=N'" + diachi + "',tendangnhap=N'" + tendangnhap + "' where manhanvien='" + manhanvien + "'") == 1)
            {
                ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #4
0
        public bool doimatkhau(string moi)
        {
            laydulieu ld = new laydulieu();

            matkhau = moi;
            if (ld.thucthitruyvan(" update nhanvien set matkhau=N'" + moi + "' where manhanvien='" + manhanvien + "'") == 1)
            {
                ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #5
0
        public bool nangquyen(string quyenmoi)
        {
            this.quyenhan = quyenmoi;
            laydulieu ld = new laydulieu();

            if (ld.thucthitruyvan(" update nhanvien set quyenhan ='" + quyenmoi + "' where manhanvien = '" + manhanvien + "'") == 1)
            {
                ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }