private void DeleteSelf(int projectId, [Inject] IAssignmentDal dal) { using (BypassPropertyChecks) { dal.Delete(projectId, ResourceId); } }
private void DeleteSelf(ResourceEdit resource, [Inject] IAssignmentDal dal) { using (BypassPropertyChecks) { dal.Delete(ProjectId, resource.Id); } }
private void Fetch(int resourceId, [Inject] IAssignmentDal dal) { using (LoadListMode) { var data = dal.FetchForResource(resourceId); foreach (var item in data) { Add(DataPortal.FetchChild <ResourceAssignmentEdit>(item)); } } }
private void Fetch(int projectId, [Inject] IAssignmentDal dal) { var data = dal.FetchForProject(projectId); using (LoadListMode) { foreach (var item in data) { Add(DataPortal.FetchChild <ProjectResourceEdit>(item)); } } }
private void Update(int projectId, [Inject] IAssignmentDal dal) { using (BypassPropertyChecks) { var item = dal.Fetch(projectId, ResourceId); item.Assigned = ReadProperty(AssignedProperty); item.RoleId = Role; item.LastChanged = TimeStamp; dal.Update(item); TimeStamp = item.LastChanged; } }
private void Insert(int projectId, [Inject] IAssignmentDal dal) { using (BypassPropertyChecks) { var item = new ProjectTracker.Dal.AssignmentDto { ProjectId = projectId, ResourceId = this.ResourceId, Assigned = ReadProperty(AssignedProperty), RoleId = this.Role }; dal.Insert(item); TimeStamp = item.LastChanged; } }
public AssignmentManager(IAssignmentDal assignmentDal) { _assignmentDal = assignmentDal; }
private void DeleteSelf(ProjectEdit project, [Inject] IAssignmentDal dal) { DeleteSelf(project.Id, dal); }
private void Update(ProjectEdit project, [Inject] IAssignmentDal dal) { Update(project.Id, dal); }
private void Insert(ProjectEdit project, [Inject] IAssignmentDal dal) { Insert(project.Id, dal); }
private void Fetch(int projectId, int resourceId, [Inject] IAssignmentDal dal, [Inject] IResourceDal rdal) { var data = dal.Fetch(projectId, resourceId); Fetch(data, rdal); }