/// <summary> /// Handles the Category event of the Add control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> protected void lbAdd_Click(object sender, CommandEventArgs e) { try { int artifactId = 0; int.TryParse(e.CommandArgument.ToString(), out artifactId); ProductDownloadMap map = new ProductDownloadMap(); map.DownloadId = artifactId; map.ProductId = productId; map.Save(WebUtility.GetUserName()); LoadAvailableDownloads(); LoadAssociatedDownloads(); } catch (Exception ex) { Logger.Error(typeof(downloads).Name + ".Add_Category", ex); base.MasterPage.MessageCenter.DisplayCriticalMessage(LocalizationUtility.GetCriticalMessageText(ex.Message)); } }
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); }