Esempio n. 1
0
 public async Task <ResponseMessage <int> > UpdateAsync([FromBody] SysAppAction sysAppAction)
 {
     //SysAppAction entity = await _sysAppActionService.GetByIdAsync(sysAppAction.id);
     //Utils.CommmonUtils.EntityToEntity(sysAppAction, entity, null);
     //return new ResponseMessage<int> { data = await _sysAppActionService.UpdateAsync(entity) };
     return(new ResponseMessage <int> {
         data = await _sysAppActionService.UpdateAsync(sysAppAction)
     });
 }
Esempio n. 2
0
        public ResponseMessage <int> Update([FromBody] SysAppAction sysAppAction)
        {
            SysAppAction entity = _sysAppActionService.GetById(sysAppAction.id);

            Utils.CommmonUtils.EntityToEntity(sysAppAction, entity, null);
            return(new ResponseMessage <int> {
                data = _sysAppActionService.Update(entity)
            });
            //return new ResponseMessage<int> { data = _sysAppActionService.Update(sysAppAction) };
        }
Esempio n. 3
0
        private treedata2 getNode2(SysAppAction item, List <SysAppAction> col3)
        {
            treedata2 node = new treedata2()
            {
                id    = item.id,
                label = item.action_name,
                pid   = item.parent_id
            };
            List <SysAppAction> childs = col3.Where(t => t.parent_id == item.id).ToList();

            if (childs.Count() > 0)
            {
                List <treedata2> children = new List <treedata2>();
                foreach (var childitem in childs)
                {
                    treedata2 childnode = getNode2(childitem, col3);
                    children.Add(childnode);
                }
                node.children = children;
            }
            return(node);
        }
Esempio n. 4
0
 public async Task <ResponseMessage <string> > InsertAsync([FromBody] SysAppAction sysAppAction)
 {
     return(new ResponseMessage <string> {
         data = await _sysAppActionService.InsertAsync(sysAppAction)
     });
 }
Esempio n. 5
0
 public ResponseMessage <string> Insert([FromBody] SysAppAction sysAppAction)
 {
     return(new ResponseMessage <string> {
         data = _sysAppActionService.Insert(sysAppAction)
     });
 }
Esempio n. 6
0
 ///<summary>
 ///异步更新
 ///</summary>
 public async Task <int> UpdateAsync(SysAppAction sysAppAction)
 {
     return(await SysAppActionRepository.UpdateAsync(sysAppAction));
 }
Esempio n. 7
0
 ///<summary>
 ///更新
 ///</summary>
 public int Update(SysAppAction sysAppAction)
 {
     return(SysAppActionRepository.Update(sysAppAction));
 }
Esempio n. 8
0
 ///<summary>
 ///异步新增
 ///</summary>
 public async Task <string> InsertAsync(SysAppAction sysAppAction)
 {
     return(await SysAppActionRepository.InsertAsync(sysAppAction));
 }
Esempio n. 9
0
 ///<summary>
 ///新增
 ///</summary>
 public string Insert(SysAppAction sysAppAction)
 {
     return(SysAppActionRepository.Insert(sysAppAction));
 }