示例#1
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();
 }
示例#2
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();
 }
示例#3
0
 private void Child_Create(int projectId)
 {
     using (BypassPropertyChecks)
     {
         ProjectId = projectId;
         RoleList.CacheList();
         Role = RoleList.DefaultRole();
         LoadProperty(AssignedProperty, DateTime.Today);
         using (var ctx = ProjectTracker.Dal.DalFactory.GetManager())
         {
             var dal     = ctx.GetProvider <ProjectTracker.Dal.IProjectDal>();
             var project = dal.Fetch(projectId);
             ProjectName = project.Name;
         }
     }
     base.Child_Create();
 }
示例#4
0
 private void Child_Create(int resourceId)
 {
     using (BypassPropertyChecks)
     {
         ResourceId = resourceId;
         RoleList.CacheList();
         Role = RoleList.DefaultRole();
         LoadProperty(AssignedProperty, DateTime.Today);
         using (var ctx = ProjectTracker.Dal.DalFactory.GetManager())
         {
             var dal    = ctx.GetProvider <ProjectTracker.Dal.IResourceDal>();
             var person = dal.Fetch(resourceId);
             FirstName = person.FirstName;
             LastName  = person.LastName;
         }
     }
     base.Child_Create();
 }