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) }); }
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) }; }
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); }
public async Task <ResponseMessage <string> > InsertAsync([FromBody] SysAppAction sysAppAction) { return(new ResponseMessage <string> { data = await _sysAppActionService.InsertAsync(sysAppAction) }); }
public ResponseMessage <string> Insert([FromBody] SysAppAction sysAppAction) { return(new ResponseMessage <string> { data = _sysAppActionService.Insert(sysAppAction) }); }
///<summary> ///异步更新 ///</summary> public async Task <int> UpdateAsync(SysAppAction sysAppAction) { return(await SysAppActionRepository.UpdateAsync(sysAppAction)); }
///<summary> ///更新 ///</summary> public int Update(SysAppAction sysAppAction) { return(SysAppActionRepository.Update(sysAppAction)); }
///<summary> ///异步新增 ///</summary> public async Task <string> InsertAsync(SysAppAction sysAppAction) { return(await SysAppActionRepository.InsertAsync(sysAppAction)); }
///<summary> ///新增 ///</summary> public string Insert(SysAppAction sysAppAction) { return(SysAppActionRepository.Insert(sysAppAction)); }