コード例 #1
0
        public static void Sua(int id, nhasanxuat nsx)
        {
            var db = new PhucMobileConnectionDB();

            nsx.MaNSX = id;
            db.Update("nhasanxuat", "MaNSX", nsx);
        }
コード例 #2
0
ファイル: TypeBus.cs プロジェクト: phuccut/PhucMobileShop
        public static void Sua(int id, loaisanpham lsp)
        {
            var db = new PhucMobileConnectionDB();

            lsp.MaLSP = id;
            db.Update("loaisanpham", "MaLSP", lsp);
        }
コード例 #3
0
ファイル: TypeBus.cs プロジェクト: phuccut/PhucMobileShop
 public static IEnumerable <loaisanpham> DanhSach()
 {
     using (var db = new PhucMobileConnectionDB())
     {
         return(db.Query <PhucMobileConnection.loaisanpham>("SELECT * FROM loaisanpham WHERE bixoa<>1"));
     }
 }
コード例 #4
0
 public static IEnumerable <nhasanxuat> DanhSach()
 {
     using (var db = new PhucMobileConnectionDB())
     {
         return(db.Query <PhucMobileConnection.nhasanxuat>("SELECT * FROM nhasanxuat WHERE bixoa<>1"));
     }
 }
コード例 #5
0
ファイル: TypeBus.cs プロジェクト: phuccut/PhucMobileShop
        public static void Xoa(int id)
        {
            var db = new PhucMobileConnectionDB();
            var a  = db.SingleOrDefault <loaisanpham>("SELECT * FROM loaisanpham WHERE MaLSP=@0", id);

            a.bixoa = 1;
            db.Update("loaisanpham", "MaLSP", a);
        }
コード例 #6
0
ファイル: ProductBus.cs プロジェクト: phuccut/PhucMobileShop
        public static void Sua(int id, sanpham sp)
        {
            var db = new PhucMobileConnectionDB();
            var a  = db.SingleOrDefault <sanpham>("SELECT * FROM sanpham WHERE MaSanPham=@0", id);

            a = sp;
            db.Update("sanpham", "MaSanPham", sp);
        }
コード例 #7
0
        public static void Xoa(int id)
        {
            var db = new PhucMobileConnectionDB();
            var a  = db.SingleOrDefault <nhasanxuat>("SELECT * FROM nhasanxuat WHERE MaNSX=@0", id);

            a.bixoa = 1;
            db.Update("nhasanxuat", "MaNSX", a);
        }
コード例 #8
0
ファイル: TypeBus.cs プロジェクト: phuccut/PhucMobileShop
        public static void Them(loaisanpham lsp)
        {
            var db = new PhucMobileConnectionDB();

            db.Insert(lsp);
        }
コード例 #9
0
ファイル: TypeBus.cs プロジェクト: phuccut/PhucMobileShop
        public static loaisanpham ChiTiet(int id)
        {
            var db = new PhucMobileConnectionDB();

            return(db.SingleOrDefault <loaisanpham>("SELECT * FROM loaisanpham WHERE MaLSP = @0", id));
        }
コード例 #10
0
        public static nhasanxuat NSXbyHang(int id)
        {
            var db = new PhucMobileConnectionDB();

            return(db.SingleOrDefault <nhasanxuat>("SELECT * FROM nhasanxuat WHERE MaNSX = @0", id));
        }
コード例 #11
0
        public static void Them(nhasanxuat nsx)
        {
            var db = new PhucMobileConnectionDB();

            db.Insert(nsx);
        }
コード例 #12
0
ファイル: SanPhamBus.cs プロジェクト: phuccut/PhucMobileShop
        public static IEnumerable <PhucMobileConnection.sanpham> SanPhambyNSX(int id)
        {
            var db = new PhucMobileConnectionDB();

            return(db.Query <PhucMobileConnection.sanpham>("SELECT * FROM sanpham WHERE MaNSX = @0", id));
        }
コード例 #13
0
ファイル: SanPhamBus.cs プロジェクト: phuccut/PhucMobileShop
        public static IEnumerable <PhucMobileConnection.sanpham> DanhSachNoiBat()
        {
            var db = new PhucMobileConnectionDB();

            return(db.Query <PhucMobileConnection.sanpham>("SELECT TOP 6 * FROM sanpham ORDER BY SoLuotMua DESC"));
        }
コード例 #14
0
ファイル: SanPhamBus.cs プロジェクト: phuccut/PhucMobileShop
        public static IEnumerable <PhucMobileConnection.sanpham> DanhSach()
        {
            var db = new PhucMobileConnectionDB();

            return(db.Query <PhucMobileConnection.sanpham>("SELECT * FROM sanpham"));
        }
コード例 #15
0
        public static IEnumerable <PhucMobileConnection.nhasanxuat> DanhSachNhaSanXuat()
        {
            var db = new PhucMobileConnectionDB();

            return(db.Query <PhucMobileConnection.nhasanxuat>("SELECT * FROM nhasanxuat"));
        }