Example #1
0
 /// <summary>
 /// Handles the Click event of the lnkAddToWatchList control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 protected void lnkAddToWatchList_Click(object sender, EventArgs e)
 {
     if (!StopProcessing)
     {
         Data.Item item = DataContext.Items.Where(i => i.ItemId == ItemId).FirstOrDefault();
         if (item.CompanyId.Value != CompanyId && this.GetBL <InventoryBL>().IsCompanyInventorySharingRemoved(item.CompanyId.Value, CompanyId))
         {
             popupInventorySharingRemovedWarning.ShowInventorySharingRemoved(CompanyId, item.CompanyId.Value);
             return;
         }
         else
         {
             Support.AddToWatchList(ItemId, CompanyId);
             LoadData();
         }
     }
 }