예제 #1
0
        public void Update(int ProductId, int DownloadId)
        {
            ProductDownloadMap item = new ProductDownloadMap();

            item.ProductId = ProductId;

            item.DownloadId = DownloadId;

            item.MarkOld();
            item.Save(UserName);
        }
예제 #2
0
        public void Insert(int ProductId, int DownloadId)
        {
            ProductDownloadMap item = new ProductDownloadMap();

            item.ProductId = ProductId;

            item.DownloadId = DownloadId;


            item.Save(UserName);
        }
예제 #3
0
        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();
            }
        }
예제 #4
0
 public bool Destroy(object ProductId)
 {
     return(ProductDownloadMap.Destroy(ProductId) == 1);
 }
예제 #5
0
 public bool Delete(object ProductId)
 {
     return(ProductDownloadMap.Delete(ProductId) == 1);
 }