示例#1
0
 public string GetTab()
 {
     return(ListInvork <string>(() =>
     {
         RequesList <Etab> tab = new RequesList <Etab>()
         {
             isSec = 1,
             Model = new Etab(),
         };
         FactoryAgent f = new FactoryAgent(tab, ExecMethod.Query.Convert(""));
         f.InvokeFactory();
         return (RList <string>)f.Result;
     }));
 }
示例#2
0
 public string UpdateMenu(long id, string name, string icon, string url)
 {
     return(TextInvork <string>(() =>
     {
         RequesList <Emenu> list = new RequesList <Emenu>();
         list.Model = new Emenu {
             Id = id, Mname = name, Micon = icon, Mlink = url
         };
         list.isNeedSync = true;
         FactoryAgent f = new FactoryAgent(list, ExecMethod.Update.Convert(""));
         f.InvokeFactory();
         if (!f.Result.sucess)
         {
             throw new ProcessException(f.Result.ToJson());
         }
         return (ReturnData)f.Result;
     }));
 }
示例#3
0
        public string GetMenuList(int tabId)
        {
            return(ListInvork <string>(() =>
            {
                RequesList <Emenu> tab = new RequesList <Emenu>()
                {
                    isSec = 1,
                    Model = new Emenu {
                        TabId = tabId
                    },
                };
                FactoryAgent f = new FactoryAgent(tab, ExecMethod.Query.Convert(""));
                f.InvokeFactory();


                return (RList <string>)f.Result;
            }));
        }
示例#4
0
 public string UpdateTab(long id, string tabName, string icon)
 {
     return(TextInvork <string>(() =>
     {
         RequesList <Etab> listTabs = new RequesList <Etab>();
         listTabs.Model = new Etab {
             Id = id, MName = tabName, MIcon = icon, Mid = id
         };
         listTabs.isNeedSync = true;
         int b = Math.Abs(Guid.NewGuid().GetHashCode());
         FactoryAgent f = new FactoryAgent(listTabs, ExecMethod.Update.Convert(""));
         f.InvokeFactory();
         if (!f.Result.sucess)
         {
             throw new ProcessException(f.Result.ToJson());
         }
         return (ReturnData)f.Result;
     }));
 }
示例#5
0
 public string AddMenu(string pid, string name, string icon, string url, int tabId)
 {
     return(TextInvork <string>(() =>
     {
         RequesList <Emenu> list = new RequesList <Emenu>();
         list.Model = new Emenu {
             ParentId = pid, Mname = name, Micon = icon, Mlink = url, TabId = tabId
         };
         list.isNeedSync = true;
         int b = Math.Abs(Guid.NewGuid().GetHashCode());
         FactoryAgent f = new FactoryAgent(list, ExecMethod.Add.Convert(""));
         f.InvokeFactory();
         if (!f.Result.sucess)
         {
             throw new ProcessException(f.Result.ToJson());
         }
         return (ReturnData)f.Result;
     }));
 }
示例#6
0
 public string DeleteMenu(int menuId)
 {
     return(TextInvork <string>(() =>
     {
         RequesList <Emenu> menu = new RequesList <Emenu>
         {
             isSec = 0
         };
         menu.isNeedSync = true;
         menu.Model.Id = menuId;
         FactoryAgent f = new FactoryAgent(menu, ExecMethod.Delete.Convert(""));
         f.InvokeFactory();
         if (!f.Result.sucess)
         {
             throw new ProcessException(f.Result.ToJson());
         }
         return (ReturnData)f.Result;
     }));
 }
示例#7
0
 public string AddTab(string name, string icon)
 {
     return(TextInvork <string>(() =>
     {
         RequesList <Etab> listTab = new RequesList <Etab>();
         listTab.Model = new Etab {
             MName = name, MIcon = icon
         };
         listTab.isNeedSync = true;
         int b = Math.Abs(Guid.NewGuid().GetHashCode());
         FactoryAgent f = new FactoryAgent(listTab, ExecMethod.Add.Convert(""));
         f.InvokeFactory();
         if (!f.Result.sucess)
         {
             throw new ProcessException(f.Result.ToJson());
         }
         return (ReturnData)f.Result;
     }));
 }
示例#8
0
 public string DeleteTab(int Id)
 {
     return(TextInvork <string>(() =>
     {
         RequesList <Etab> tab = new RequesList <Etab>
         {
             isSec = 0
         };
         tab.isNeedSync = true;
         tab.Model = new Etab
         {
             Id = Id
         };
         FactoryAgent f = new FactoryAgent(tab, ExecMethod.Delete.Convert(""));
         f.InvokeFactory();
         if (!f.Result.sucess)
         {
             throw new ProcessException(f.Result.ToJson());
         }
         return (ReturnData)f.Result;
     }));
 }