Exemplo n.º 1
0
 /// <summary>
 /// Notifies all clients to reload gadgets after details item save.
 /// </summary>
 /// <param name="concurrencyInfo">Information about save.</param>
 public void ReloadGadgetsAfterSave(ConcurrencyInfo concurrencyInfo)
 {
     Clients.All.ReloadGadgetsAfterSave(concurrencyInfo);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Invoked when client saved details item.
 /// </summary>
 /// <param name="concurrencyInfo">Information about save.</param>
 public void NotifyAboutSave(ConcurrencyInfo concurrencyInfo)
 {
     Clients.Others.NotifyAboutSave(concurrencyInfo);
 }
 /// <summary>
 /// Notifies clients that an item was deleted.
 /// </summary>
 /// <param name="processSystemName">
 /// The process system name.
 /// </param>
 /// <param name="itemId">
 /// The item id.
 /// </param>
 public void NotifyItemDeleted(string processSystemName, int itemId)
 {
     var concurrencyInfo = new ConcurrencyInfo
                               {
                                   ClientId = Utils.ClientId,
                                   UserName = Utils.CurrentUserName,
                                   ProcessSystemName = processSystemName,
                                   Id = itemId,
                                   Deleted = true,
                                   CanOverwrite = false
                               };
     NotifyAboutSaveInternal(concurrencyInfo);
 }
 private static void NotifyAboutSaveInternal(ConcurrencyInfo concurrencyInfo)
 {
     var context = GlobalHost.ConnectionManager.GetHubContext<ConcurrencyStatusHub>();
     context.Clients.All.NotifyAboutSave(concurrencyInfo);
     context.Clients.All.ReloadGadgetsAfterSave(concurrencyInfo);
 }
 /// <summary>
 /// Notifies clients that an item was saved.
 /// </summary>
 /// <param name="processSystemName">
 /// The process system name.
 /// </param>
 /// <param name="itemId">
 /// The item id.
 /// </param>
 /// <param name="canOverwrite">
 /// When <c>true</c>, the item can be overwritten by other users.
 /// </param>
 public void NotifyItemSaved(string processSystemName, int itemId, bool canOverwrite)
 {
     var concurrencyInfo = new ConcurrencyInfo
                               {
                                   ClientId = Utils.ClientId,
                                   UserName = Utils.CurrentUserName,
                                   ProcessSystemName = processSystemName,
                                   Id = itemId,
                                   CanOverwrite = canOverwrite
                               };
     NotifyAboutSaveInternal(concurrencyInfo);
 }