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()}."; }
public void BizAction(long inputData) { var item = _updateDbAccess.GetProject(inputData); if (item == null) { AddError("Could not find the projectwbs. Someone entering illegal ids?"); } if (item.Type == Common.WBSType.Project) { AddError("Project wbs node not allowed for delete!!!"); } if (item.Type == Common.WBSType.Activity) { AddError("MDR wbs node not allowed for delete!!!"); } _dbAccess.Delete(item); Message = $"projectwbs is Delete: {item.ToString()}."; }