ClientModuleConfigOnGetMenuItemOfClientByGroup Field |
Namespace: SOWIApp.Administrator
protected void Application_Start() { // ... //* badges for incoming ticket * SOWIApp.Administrator.ClientModuleConfig.OnGetMenuItemOfClientByGroup += OnGetMenuItemOfClientByGroup; // ... }
/// <summary> /// Sets Ticket badges /// </summary> /// <param name="sender">Is null</param> /// <param name="e">Menu object</param> private void OnGetMenuItemOfClientByGroup(object sender, SOWIData.EventArgData<SOWIData.Management.Models.ClientModuleConfig> e) { if (e.Item != null) { for (int i = 0; i < e.Item.ClientModules.Count; i++) { if (e.Item.ClientModules[i].Active) { if (e.Item.ClientModules[i].Name == "Ticket") { var lAppTicket = new ProTicApp.Ticket(SOWIWeb.Helper.Session.Token.ToGUID()); e.Item.ClientModules[i].Badges = lAppTicket.CountInComing(); } } } } }