Exemplo n.º 1
0
        public static void UpdateSP(String id, NHOM8.SanPham sp)
        {
            var db = new NHOM8DB();

            db.Update(sp, id);
        }
Exemplo n.º 2
0
        public static NHOM8.SanPham ChiTietAdmin(String id)
        {
            var db = new NHOM8DB();

            return(db.SingleOrDefault <NHOM8.SanPham>("select * from SanPhams where SanPhamID = '" + id + "'"));
        }
Exemplo n.º 3
0
        public static IEnumerable <SanPham> DanhSachAdmin()
        {
            var db = new NHOM8DB();

            return(db.Query <NHOM8.SanPham>("select * from SanPhams"));
        }
Exemplo n.º 4
0
        //---------------- Admin
        public static void ThemSP(SanPham sp)
        {
            var db = new NHOM8DB();

            db.Insert(sp);
        }
Exemplo n.º 5
0
        public static NHOM8.SanPham ChiTiet(string a)
        {
            var db = new NHOM8DB();

            return(db.SingleOrDefault <NHOM8.SanPham>("select * from SanPhams where SanPhamID = @0", a));
        }
Exemplo n.º 6
0
        public static IEnumerable <NHOM8.SanPham> DanhSach()
        {
            var db = new NHOM8DB();

            return(db.Query <NHOM8.SanPham>("select * from SanPhams where DanhMucID = '3'"));
        }