Beispiel #1
0
        public void Update(int ProductID, int ProductPhotoID, bool Primary, DateTime ModifiedDate)
        {
            ProductProductPhoto item = new ProductProductPhoto();

            item.ProductID = ProductID;

            item.ProductPhotoID = ProductPhotoID;

            item.Primary = Primary;

            item.ModifiedDate = ModifiedDate;

            item.MarkOld();
            item.Save(UserName);
        }
Beispiel #2
0
        public static void SaveProductMap(int varProductPhotoID, int[] itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM ProductProductPhoto WHERE ProductPhotoID=@ProductPhotoID", ProductPhoto.Schema.Provider.Name);

            cmdDel.AddParameter("@ProductPhotoID", varProductPhotoID);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (int item in itemList)
            {
                ProductProductPhoto varProductProductPhoto = new ProductProductPhoto();
                varProductProductPhoto.SetColumnValue("ProductPhotoID", varProductPhotoID);
                varProductProductPhoto.SetColumnValue("ProductID", item);
                varProductProductPhoto.Save();
            }
        }
Beispiel #3
0
 public bool Destroy(object ProductID)
 {
     return(ProductProductPhoto.Destroy(ProductID) == 1);
 }
Beispiel #4
0
 public bool Delete(object ProductID)
 {
     return(ProductProductPhoto.Delete(ProductID) == 1);
 }