Пример #1
0
        public static SanPham ChiTiet(String a)
        {
            var db  = new ShopOnlineConnectionDB();
            var sql = string.Format("select * from SanPham where masanpham='{0}'", a);

            return(db.SingleOrDefault <SanPham>(sql));
        }
Пример #2
0
        public static SanPham ChiTiet(String a)
        {
            var db = new ShopOnlineConnectionDB();

            return(db.SingleOrDefault <SanPham>("select * from SanPham where MaSanPham = @0", a));
        }
Пример #3
0
        public static SanPham SanPham(int id)
        {
            var db = new ShopOnlineConnectionDB();

            return(db.SingleOrDefault <SanPham>("select * from SanPham where MaSanPham= @0 ", id));
        }
Пример #4
0
        public static NhaSanXuat ChiTietAdmin(String id)
        {
            var db = new ShopOnlineConnectionDB();

            return(db.SingleOrDefault <NhaSanXuat>("select * from NhaSanXuat where MaNhaSanXuat = '" + id + "'"));
        }
Пример #5
0
        public static LoaiSanPham ChiTietAdmin(String id)
        {
            var db = new ShopOnlineConnectionDB();

            return(db.SingleOrDefault <LoaiSanPham>("select * from LoaiSanPham where MaLoaiSanPham = '" + id + "'"));
        }