コード例 #1
0
 private void Fetch(string name, [Inject] IProjectDal dal)
 {
     using (LoadListMode)
     {
         List <Dal.ProjectDto> list = null;
         if (name == null)
         {
             list = dal.Fetch();
         }
         else
         {
             list = dal.Fetch(name);
         }
         foreach (var item in list)
         {
             Add(DataPortal.FetchChild <ProjectInfo>(item));
         }
     }
 }
コード例 #2
0
 private void Fetch(ProjectTracker.Dal.AssignmentDto data, [Inject] IProjectDal dal)
 {
     using (BypassPropertyChecks)
     {
         ProjectId = data.ProjectId;
         Role      = data.RoleId;
         LoadProperty(AssignedProperty, data.Assigned);
         TimeStamp = data.LastChanged;
         var project = dal.Fetch(data.ProjectId);
         ProjectName = project.Name;
     }
 }
コード例 #3
0
ファイル: ProjectCloser.cs プロジェクト: mlivensp/csla
        private void Execute([Inject] IProjectDal dal)
        {
            var data = dal.Fetch(ProjectId);

            if (data.Ended.HasValue)
            {
                throw new InvalidOperationException("Project already closed");
            }
            data.Ended = DateTime.Today;
            dal.Update(data);
            Closed = true;
        }
コード例 #4
0
 private void Create(int projectId, [Inject] IProjectDal dal)
 {
     using (BypassPropertyChecks)
     {
         ProjectId = projectId;
         RoleList.CacheList();
         Role = RoleList.DefaultRole();
         LoadProperty(AssignedProperty, DateTime.Today);
         var project = dal.Fetch(projectId);
         ProjectName = project.Name;
     }
     BusinessRules.CheckRules();
 }
コード例 #5
0
ファイル: ProjectEdit.cs プロジェクト: mlivensp/csla
        private void Fetch(int id, [Inject] IProjectDal dal)
        {
            var data = dal.Fetch(id);

            using (BypassPropertyChecks)
            {
                Id          = data.Id;
                Name        = data.Name;
                Description = data.Description;
                Started     = data.Started;
                Ended       = data.Ended;
                TimeStamp   = data.LastChanged;
                Resources   = DataPortal.FetchChild <ProjectResources>(id);
            }
        }