public void ReOrder(string sourceId, string targetId) { var source = _functionRepository.FindById(sourceId); var target = _functionRepository.FindById(targetId); int tempOrder = source.SortOrder; source.SortOrder = target.SortOrder; target.SortOrder = tempOrder; _functionRepository.Update(source); _functionRepository.Update(target); }
public void Update(FunctionViewModel functionVm) { var functionDb = _functionRepository.FindById(functionVm.Id); var function = _mapper.Map <Function>(functionVm); _functionRepository.Update(function); _unitOfWork.Commit(); }
public async Task Update(FunctionViewModel functionVm) { var functionDb = await _functionRepository.FindById(functionVm.Id); if (functionDb != null) { functionDb.Name = functionVm.Name; functionDb.IconCss = functionVm.IconCss; functionDb.ParentId = functionVm.ParentId; functionDb.SortOrder = functionVm.SortOrder; functionDb.URL = functionVm.URL; functionDb.Status = functionVm.Status; await _functionRepository.Update(functionDb); _unitOfWork.Commit(); } }
public void Update(FunctionDTO f) { var f1 = functionRepository.GetBy(f.IDCN); f.Mapping(f1); functionRepository.Update(f1); }
public void SaveFunction(FunctionViewModel functionViewModel) { var function = _functionRepository.FindById(functionViewModel.Id); if (function != null) { function.IconCss = functionViewModel.IconCss; function.Name = functionViewModel.Name; function.Status = functionViewModel.Status; function.SortOrder = functionViewModel.SortOrder; _functionRepository.Update(function); } }
public bool SaveEntity(FunctionModel functionModel) { try { if (functionModel.Id > 0) { var function = GetFunctioneById(functionModel.Id).ToFunction(); function.Id = functionModel.Id; function.Name = functionModel.Name; function.URL = functionModel.URL; function.UpdatedDate = DateTime.Now; function.ParentId = functionModel.ParentId != null && functionModel.ParentId > 0 ? functionModel.ParentId : null; function.SortOrder = functionModel.SortOrder; function.IconCss = functionModel.IconCss; function.Status = functionModel.Status; _functionRepository.Update(function); return(true); } else { var function = new Function(); function.Id = functionModel.Id; function.Name = functionModel.Name; function.URL = functionModel.URL; function.ParentId = functionModel.ParentId != null && functionModel.ParentId > 0 ? functionModel.ParentId : null; function.SortOrder = functionModel.SortOrder; function.IconCss = functionModel.IconCss; function.Status = functionModel.Status; function.CreatedDate = DateTime.Now; _functionRepository.Add(function); return(true); } } catch (Exception ex) { return(false); } }
public void Update(Function function) { _functionRepository.Update(function); }
// // Partition // public async Task <SmFunctionGroupSummary> PartitionStart(int scenarioId) { var result = await _functionRepository.Update(scenarioId, FunctionType.Markdown, FunctionGroupType.Partition, _cloudWatchSettings.FunctionVersion, 1, FunctionInstanceType.PartitionStarting, 1, new FunctionInstancePartitionJson(_cloudWatchSettings)); return(SmFunctionGroupSummary.Build(result)); }
public void Update(Function _model) { _Repository.Update(_model); }
public void Update(FunctionViewModel functionVm) { _functionRepository.Update(_mapper.Map <Function>(functionVm)); }
public IActionResult UpdateFunction([FromBody] Function model) { Func_repo.Update(model); return(new OkObjectResult(new { FunctionID = model.FunctionId })); }
public bool Update(t_Function entity, int functionId) { return(functionRepository.Update(entity, functionId)); }
public void Update(Function entity) { _functionRepository.Update(entity); }
public void Update(FunctionViewModel functionVm) { var function = _mapper.Map <Function>(functionVm); _functionRepository.Update(function); }