Exemple #1
0
 //---sua-----//
 public static LoaiSanPham Update(string id)
 {
     using (var db = new ShopOnlineConnectionDB())
     {
         return(db.Single <LoaiSanPham>("select * from LoaiSanPham where Maloaisanpham =@0", id));
     }
 }
 //---sua-----//
 public static NhaSanXuat Update(string id)
 {
     using (var db = new ShopOnlineConnectionDB())
     {
         return(db.Single <NhaSanXuat>("select * from NhaSanXuat where Manhasanxuat =@0", id));
     }
 }
 //---------khoi phuc-------------//
 public static void KhoiPhuc(string id)
 {
     using (var db = new ShopOnlineConnectionDB())
     {
         var lsp = db.Single <SanPham>("select * from SanPham where Masanpham = @0", id);
         lsp.Tinhtrang = "0";
         db.Update("SanPham", "Masanpham", lsp);
     }
 }
 //---------khoi phuc-------------//
 public static void KhoiPhuc(string id)
 {
     using (var db = new ShopOnlineConnectionDB())
     {
         var lsp = db.Single <NhaSanXuat>("select * from NhaSanXuat where Manhasanxuat = @0", id);
         lsp.TinhTrang = 0;
         db.Update("NhaSanXuat", "Manhasanxuat", lsp);
     }
 }
Exemple #5
0
        //---------khoi phuc-------------//
        public static void KhoiPhuc(string id)
        {
            using (var db = new ShopOnlineConnectionDB())
            {
                var lsp = db.Single <LoaiSanPham>("select * from LoaiSanPham where MaLoaiSanPham = @0", id);

                lsp.TinhTrang = 0;
                db.Update("LoaiSanPham", "MaLoaiSanPham", lsp);
            }
        }