コード例 #1
0
 public static void Delete(int id)
 {
     using (var db = new ShopSmartPhoneConnectionDB())
     {
         db.Update <Product>("SET Status = 0 WHERE ID=@0", id);
     }
 }
コード例 #2
0
 public static void UpdateImage(String filename, int imageID)
 {
     using (var db = new ShopSmartPhoneConnectionDB())
     {
         db.Update <MoreImage>("SET ImageName = @0 WHERE Image_ID = @1", filename, imageID);
     }
 }
コード例 #3
0
 public static void UpdateNoImage(int id, Product sp)
 {
     using (var db = new ShopSmartPhoneConnectionDB())
     {
         db.Update <Product>("SET ProductName=@0, Price=@1, CategogyID=@2, ManufacturerID=@3, Description=@4, Specifications=@5, Warranty=@6, Accessories=@7, Evaluate=@8 WHERE ID=@9", sp.ProductName, sp.Price, sp.CategogyID, sp.ManufacturerID, sp.Description, sp.Specifications, sp.Warranty, sp.Accessories, sp.Evaluate, id);
     }
 }
コード例 #4
0
 public static void UpdateSpecification(Specification spec)
 {
     using (var db = new ShopSmartPhoneConnectionDB())
     {
         db.Update(spec);
     }
 }