Example #1
0
 public void SaveProduct(StoreProduct product)
 {
     using (CostarDataContext dc = _conn.GetContext())
     {
         if (product.ProductID > 0)
             dc.StoreProducts.Attach(product, true);
         if (product.ProductID == 0)
         {
             product.AddeDate = DateTime.Now;
             dc.StoreProducts.InsertOnSubmit(product);
         }
         dc.SubmitChanges();
     }
 }
Example #2
0
 partial void DeleteStoreProduct(StoreProduct instance);
Example #3
0
 partial void UpdateStoreProduct(StoreProduct instance);
Example #4
0
 partial void InsertStoreProduct(StoreProduct instance);