public void CreateProfileWithProject(int projectId, int processId) { Context.CreateDefaultRolesIfNecessary(); var project = new ProjectDTO {ID = projectId, ProjectID = projectId, ProcessID = processId}; Context.AddProfileWithDefaultRolesMapping(projectId); Profile.Get<ProjectDTO>().Add(project); }
public void HandleDelete(int id) { var project = new ProjectDTO {ID = id, ProjectID = id}; TransportMock.HandleMessageFromTp(Profile, new ProjectDeletedMessage {Dto = project}); }
public void HandleUpdate(int id, string name) { var project = new ProjectDTO {ID = id, ProjectID = id, Name = name}; TransportMock.HandleMessageFromTp(Profile, new ProjectUpdatedMessage {Dto = project}); }
public void AssignProjectToCompany(int projectId, int companyId) { var projectStorage = Context.Storage.Get<ProjectDTO>(); var project = projectStorage.FirstOrDefault(x => x.ProjectID == projectId); if (project == null) { project = new ProjectDTO {ProjectID = projectId, CompanyID = companyId}; projectStorage.Add(project); } else { project.CompanyID = companyId; } }
public void SetProjectEmail(int projectId, string email) { var projectStorage = Context.Storage.Get<ProjectDTO>(); var project = new ProjectDTO {ProjectID = projectId, InboundMailReplyAddress = email}; projectStorage.Add(project); }