public async Task <ViewResultBase> Edit(SystemDictionaryEditInput input) { SystemDictionaryEditOutput output = new SystemDictionaryEditOutput(); //如果为编辑 if (!input.DictionaryId.IsEmptyGuid()) { output = (await _dictionaryLogic.GetByIdAsync(input.DictionaryId)).MapTo <SystemDictionaryEditOutput>(); //获取父级信息 var parentInfo = await _dictionaryLogic.GetByIdAsync(output.ParentId); if (parentInfo != null) { output.ParentName = parentInfo.Name; output.ParentCode = parentInfo.Code; } } //新增 else { if (!input.ParentId.IsEmptyGuid()) { var parentInfo = await _dictionaryLogic.GetByIdAsync(input.ParentId); output.Code = parentInfo.Code; output.ParentId = input.ParentId; output.ParentName = parentInfo.Name; output.ParentCode = parentInfo.Code; } } return(View(output)); }
public async Task <ViewResultBase> Edit(NullableIdInput input) { var process = new DesignerEditModel(); process.WorkflowProcess = new WorkflowProcess(); if (input != null) { if (!input.Id.IsNullOrEmptyGuid()) { process.WorkflowProcess = await _workflowProcessLogic.GetByIdAsync(input.Id); process.ProcessTypeStr = (await _systemDictionaryLogic.GetByIdAsync(process.WorkflowProcess.ProcessType)).Name; } } return(View(process)); }