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(); }
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(); }
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(); }
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(); }