Ejemplo n.º 1
0
 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));
         }
     }
 }
Ejemplo n.º 2
0
 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;
     }
 }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
 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();
 }