Esempio n. 1
0
        public bool xoabo()
        {
            laydulieu ld = new laydulieu();

            if (ld.thucthitruyvan(" delete from nhanvien where manhanvien= '" + manhanvien + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
        public bool taomoi()
        {
            laydulieu ld = new laydulieu();

            if (ld.thucthitruyvan(" insert into nhanvien values ('" + manhanvien + "',N'" + hoten + "',N'" + diachi + "',N'" + tendangnhap + "','" + matkhau + "','" + quyenhan + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 3
0
        public bool capnhat()
        {
            laydulieu ld = new laydulieu();

            if (ld.thucthitruyvan(" update nhanvien set hoten=N'" + hoten + "',diachi=N'" + diachi + "',tendangnhap=N'" + tendangnhap + "',matkhau=N'" + matkhau + "' where manhanvien='" + manhanvien + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 4
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update vitriluutru set kho='" + kho + "',ke='" + ke + "',ngan='" + ngan + "' where mavitri='" + mavitri + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 5
0
        public bool taomoi()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("insert into vitriluutru values ('" + mavitri + "','" + kho + "','" + ke + "','" + ngan + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 6
0
        public bool taomoi()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("insert into sach values('" + masach + "',N'" + nhande + "','" + sotrang + "','" + soluong + "','" + namxb + "','" + lanxb + "','" + solanmuon + "','" + maphanloai + "','" + manxb + "','" + mangonngu + "','" + matacgia + "','" + mavitri + "','" + ngaynhap + "',N'" + thethuc + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 7
0
        public bool giahan()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update phieumuon set ngaymuon='" + ngaymuon + "' where maphieumuon='" + maphieumuon + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 8
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update phieumuon set madocgia='" + madocgia + "',thethucmuon=N'" + thethucmuon + "',ngaymuon='" + ngaymuon + "',masach='" + masach + "',manhanvien='" + manhanvien + "',soluongmuon='" + soluongmuon + "' where maphieumuon='" + maphieumuon + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 9
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update nhaxuatban set ten=N'" + ten + "' where manxb='" + manxb + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 10
0
        public bool taomoi()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("insert into nhaxuatban values ('" + manxb + "','" + ten + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 11
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update docgia set hoten=N'" + hoten + "',ngaysinh='" + ngaysinh + "',makhoa='" + makhoa + "',vitri=N'" + vitri + "',diachi=N'" + diachi + "',ngaylapthe='" + ngaylapthe + "' where madocgia='" + madocgia + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 12
0
        public bool taomoi()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("insert into docgia values ('" + madocgia + "',N'" + hoten + "','" + ngaysinh + "','" + makhoa + "',N'" + vitri + "',N'" + diachi + "','" + ngaylapthe + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 13
0
        public bool trasach(string i)
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update sach set soluong= soluong + " + i + " where  masach='" + masach + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 14
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update sach set nhande=N'" + nhande + "',sotrang='" + sotrang + "',soluong='" + soluong + "',namxb='" + namxb + "',lanxb='" + lanxb + "',solanmuon='" + solanmuon + "',maphanloai='" + maphanloai + "',manxb='" + manxb + "',mangonngu='" + mangonngu + "',matacgia='" + matacgia + "',mavitri='" + mavitri + "', ngaynhap='" + ngaynhap + "', thethuc=N'" + thethuc + "' where  masach='" + masach + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 15
0
        public bool xoabo()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("delete from vitriluutru where mavitri='" + mavitri + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 16
0
        public bool taomoi()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("insert into phieumuon values ('" + maphieumuon + "','" + madocgia + "',N'" + thethucmuon + "','" + ngaymuon + "','" + masach + "','" + manhanvien + "','" + soluongmuon + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 17
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update ngonngu set ngonngu=N'" + ngonngu + "' where mangonngu='" + mangonngu + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 18
0
        public bool xoabo()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("delete from phieumuon where maphieumuon='" + maphieumuon + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 19
0
        public bool taomoi()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("insert into sachhong values ('" + masachhong + "','" + masach + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 20
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)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 21
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update tacgia set tentacgia=N'" + tentacgia + "' where matacgia='" + matacgia + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 22
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)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 23
0
        public bool taomoi()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("insert into phanloai values ('" + maphanloai + "',N'" + loai + "')") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 24
0
        public bool capnhat()
        {
            laydulieu dl = new laydulieu();

            if (dl.thucthitruyvan("update phanloai set loai = N'" + loai + "' where maphanloai='" + maphanloai + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                L_Ketnoi.HuyKetNoi();
                return(false);
            }
        }
Esempio n. 25
0
        public bool phanloai(string loai)
        {
            laydulieu     dl = new laydulieu();
            SqlDataReader dr = dl.lay_reader("select maphanloai from phanloai where loai=N'" + loai + "'");

            while (dr.Read())
            {
                this.maphanloai = dr[0].ToString();
            }
            L_Ketnoi.HuyKetNoi();
            laydulieu ld1 = new laydulieu();

            if (ld1.thucthitruyvan(" update sach set maphanloai ='" + this.maphanloai + "' where masach = '" + masach + "'") == 1)
            {
                L_Ketnoi.HuyKetNoi();
                return(true);
            }
            else
            {
                return(false);
            }
        }