public void Update(int ProductId, int DownloadId) { ProductDownloadMap item = new ProductDownloadMap(); item.ProductId = ProductId; item.DownloadId = DownloadId; item.MarkOld(); item.Save(UserName); }
public void Insert(int ProductId, int DownloadId) { ProductDownloadMap item = new ProductDownloadMap(); item.ProductId = ProductId; item.DownloadId = DownloadId; item.Save(UserName); }
public static void SaveProductMap(int varDownloadId, int[] itemList) { QueryCommandCollection coll = new SubSonic.QueryCommandCollection(); //delete out the existing QueryCommand cmdDel = new QueryCommand("DELETE FROM dashCommerce_Store_Product_Download_Map WHERE DownloadId=@DownloadId", Download.Schema.Provider.Name); cmdDel.AddParameter("@DownloadId", varDownloadId); coll.Add(cmdDel); DataService.ExecuteTransaction(coll); foreach (int item in itemList) { ProductDownloadMap varProductDownloadMap = new ProductDownloadMap(); varProductDownloadMap.SetColumnValue("DownloadId", varDownloadId); varProductDownloadMap.SetColumnValue("ProductId", item); varProductDownloadMap.Save(); } }
public bool Destroy(object ProductId) { return(ProductDownloadMap.Destroy(ProductId) == 1); }
public bool Delete(object ProductId) { return(ProductDownloadMap.Delete(ProductId) == 1); }