Exemplo n.º 1
0
        public IStatusGeneric RemoveProjectFromperson(PersonProject project)
        {
            var status = new StatusGenericHandler();

            this.ProjectLink.Remove(project);
            return(status);
        }
Exemplo n.º 2
0
        public IStatusGeneric AddProjectToperson(Guid projectId)
        {
            var status = new StatusGenericHandler();

            this.ProjectLink.Add(PersonProject.CreatepersonContractor(0, projectId).Result);
            return(status);
        }
Exemplo n.º 3
0
        public static IStatusGeneric <PersonProject> CreatepersonContractor(int personId, Guid projectId)
        {
            var status = new StatusGenericHandler <PersonProject>();

            var newItem = new PersonProject
            {
                PersonId  = personId,
                ProjectId = projectId
            };

            status.Result = newItem;
            return(status);
        }
Exemplo n.º 4
0
        public static IStatusGeneric <Person> CreatePerson(string firstName, string lastName
                                                           , string nationalId, string mobileNumber, Guid[] projectIds)
        {
            var status = new StatusGenericHandler <Person>();
            var person = new Person
            {
                FirstName    = firstName,
                LastName     = lastName,
                NationalId   = nationalId,
                MobileNumber = mobileNumber
            };

            foreach (var ids in projectIds)
            {
                person.ProjectLink.Add(PersonProject.CreatepersonContractor(0, ids).Result);
            }

            status.Result = person;
            return(status);
        }