Exemple #1
0
 /// <summary>
 /// 获取分系统及其菜单完成事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void _services_OnGetModulesCompleted(object sender, Model.GetEntityListEventArgs <Model.ModuleInfo> e)
 {
     if (e.Error == null)
     {
         if (e.Result != null)
         {
             List <ModuleInfo> moduleinfo = new List <ModuleInfo>();
             foreach (var item in e.Result)
             {
                 if (item.ModuleName != null)
                 {
                     ModuleInfo info = item.CloneObject <ModuleInfo>(new ModuleInfo());
                     info.InitializationMode = item.UseState == "1" ? InitializationMode.OnDemand : InitializationMode.OnDemand;
                     info.Ref        = string.Empty;
                     info.IsOnWeb    = false;
                     info.ModuleType = item.UseState == "1" ? string.Empty : item.ModuleType;
                     moduleinfo.Add(info);
                 }
             }
             InitMainContext(moduleinfo);
             if (!Application.Current.Resources.Contains("AllModule"))
             {
                 Application.Current.Resources.Add("AllModule", moduleinfo);
             }
             //SaveModuleByLocal(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID, moduleinfo);
             if (this.InitCompleted != null)
             {
                 this.InitCompleted(this, EventArgs.Empty);
             }
         }
     }
 }
Exemple #2
0
 void _services_OnGetUserMenuCompleted(object sender, Model.GetEntityListEventArgs <Model.UserMenu> e)
 {
     if (e.Error == null)
     {
         if (e.Result != null)
         {
             // AnalysisMenu(e.Result);
             _services = null;
         }
     }
 }
Exemple #3
0
 void _services_OnGetShortCutCompleted(object sender, Model.GetEntityListEventArgs <Model.ShortCut> e)
 {
     if (e.Error == null)
     {
         if (e.Result != null)
         {
             ObservableCollection <ShortCutViewModel> items = new ObservableCollection <ShortCutViewModel>();
             foreach (var item in e.Result)
             {
                 ShortCutViewModel tempItem = item.CloneObject <ShortCutViewModel>(new ShortCutViewModel());
                 items.Add(tempItem);
             }
             this.Item = items;
         }
     }
 }