private void Fetch([Inject] IResourceDal dal) { using (LoadListMode) { List <ProjectTracker.Dal.ResourceDto> list = null; list = dal.Fetch(); foreach (var item in list) { Add(DataPortal.FetchChild <ResourceInfo>(item)); } } }
private void Fetch(ProjectTracker.Dal.AssignmentDto data, [Inject] IResourceDal dal) { using (BypassPropertyChecks) { ResourceId = data.ResourceId; Role = data.RoleId; LoadProperty(AssignedProperty, data.Assigned); TimeStamp = data.LastChanged; var person = dal.Fetch(data.ResourceId); FirstName = person.FirstName; LastName = person.LastName; } }
private void Fetch(int id, [Inject] IResourceDal dal) { var data = dal.Fetch(id); using (BypassPropertyChecks) { Id = data.Id; FirstName = data.FirstName; LastName = data.LastName; TimeStamp = data.LastChanged; Assignments = DataPortal.FetchChild <ResourceAssignments>(id); } }
private void Create(int resourceId, [Inject] IResourceDal dal) { using (BypassPropertyChecks) { ResourceId = resourceId; RoleList.CacheList(); Role = RoleList.DefaultRole(); LoadProperty(AssignedProperty, DateTime.Today); var person = dal.Fetch(resourceId); FirstName = person.FirstName; LastName = person.LastName; } BusinessRules.CheckRules(); }