Exemple #1
0
        public DataTable Load()
        {
            DataTable res;
            String    sql = " select * from THELOAI";

            res = XuLy.CreateTable(sql);
            return(res);
        }
Exemple #2
0
        public DataTable Load()
        {
            DataTable res;
            string    sql = " select * from NHAXUATBAN";

            res = XuLy.CreateTable(sql);
            return(res);
        }
Exemple #3
0
        public bool Xoa(String id)
        {
            String sql = "delete from THELOAI where MATHELOAI='" + id + "'";
            bool   res = false;

            if (XuLy.ExecuteNonQuery(sql) > 0)
            {
                res = true;
            }
            return(res);
        }
Exemple #4
0
        public bool Sua(String id, String tenTheLoai)
        {
            String sql = "update THELOAI set TENTHELOAI = N'" + tenTheLoai + "' where MATHELOAI='" + id + "'";
            bool   res = false;

            if (XuLy.ExecuteNonQuery(sql) > 0)
            {
                res = true;
            }
            return(res);
        }
Exemple #5
0
        public bool Them(String id, String tenTheLoai)
        {
            String sql = "insert into THELOAI(MATHELOAI, TENTHELOAI) values('" + id + "', N'" + tenTheLoai + "')";
            bool   res = false;

            if (XuLy.ExecuteNonQuery(sql) > 0)
            {
                res = true;
            }
            return(res);
        }
Exemple #6
0
        public bool Xoa(String id)
        {
            String sql = "delete from NHAXUATBAN where MA_NXB='" + id + "'";
            bool   res = false;

            if (XuLy.ExecuteNonQuery(sql) > 0)
            {
                res = true;
            }
            return(res);
        }
Exemple #7
0
        public bool Sua(string id, string ten, int sdt, string diachi)
        {
            String sql = "update NHAXUATBAN set TEN = N'" + ten + "',SDT = '" + sdt + "',DIACHI = N'" + diachi + "' where MA_NXB='" + id + "'";
            bool   res = false;

            if (XuLy.ExecuteNonQuery(sql) > 0)
            {
                res = true;
            }
            return(res);
        }
Exemple #8
0
        public bool Them(string id, string ten, int sdt, string diachi)
        {
            string sql = "insert into NHAXUATBAN(MA_NXB, TEN, SDT, DIACHI) values('" + id + "', N'" + ten + "', '" + sdt + "', N'" + diachi + "')";
            bool   res = false;

            if (XuLy.ExecuteNonQuery(sql) > 0)
            {
                res = true;
            }
            return(res);
        }