Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }