public ProjectWBS BizAction(ProjectWBSDto inputData) { var desStatus = ProjectWBS.CreateProjectWBS(inputData.Type, inputData.TargetId, inputData.WF, inputData.WBSCode , inputData.ProjectId, inputData.ParentId, inputData.Name, inputData.CalculationType); CombineErrors(desStatus); if (!HasErrors) { _dbAccess.Add(desStatus.Result); } return(HasErrors ? null : desStatus.Result); }
public void BizAction(ProjectWBSDto inputData) { var projectwbs = _dbAccess.GetProject(inputData.Id); if (projectwbs == null) { throw new NullReferenceException("Could not find the projectwbs. Someone entering illegal ids?"); } var status = projectwbs.UpdateProjectWF(inputData.WF); CombineErrors(status); Message = $"projectwbs wf is update: {projectwbs.ToString()}."; }