Ejemplo n.º 1
0
        public void Create(ArticleViewModel model)
        {
            Articles entity = new Articles()
            {
                ArticleId       = model.ArticleId,
                ArticleDate     = model.ArticleDate,
                AuthorName      = model.AuthorName,
                Name            = model.Name,
                Title           = model.Title,
                Description     = model.Description,
                Country         = model.Country,
                ArticleMemberID = model.ArticleMemberId
            };

            entities.Articles.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 2
0
        public void Create(TeachersViewModel model)
        {
            Teachers entity = new Teachers()
            {
                MemberID      = model.MemberID,
                TaxNumber     = model.TaxNumber,
                FullName      = model.FullName,
                Country       = model.Country,
                School        = model.School,
                SchoolAddress = model.SchoolAddress,
                Phone         = model.Phone,
                Email         = model.Email,
                SocialMedia   = model.SocialMedia,
                LoginName     = model.LoginName
            };

            entities.Teachers.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 3
0
        public void Create(LiaisonOfficersViewModel model)
        {
            LiaisonOfficers entity = new LiaisonOfficers()
            {
                MemberID      = model.MemberID,
                TaxNumber     = model.TaxNumber,
                FullName      = model.FullName,
                Country       = model.Country,
                Phone         = model.Phone,
                Email         = model.Email,
                OfficeAddress = model.OfficeAddress,
                Occupation    = model.Occupation,
                Employer      = model.Employer,
                LoginName     = model.LoginName
            };

            entities.LiaisonOfficers.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 4
0
        public void Create(StudentsViewModel model)
        {
            Students entity = new Students()
            {
                MemberID       = model.MemberID,
                TaxNumber      = model.TaxNumber,
                FullName       = model.FullName,
                Birthdate      = model.Birthdate,
                Gender         = model.Gender,
                Phone          = model.Phone,
                Email          = model.Email,
                Country        = model.Country,
                Specialization = model.Specialization,
                School         = model.School,
                LoginName      = model.LoginName
            };

            entities.Students.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 5
0
        public void Create(SchoolsViewModel model)
        {
            Schools entity = new Schools()
            {
                MemberID      = model.MemberID,
                TaxNumber     = model.TaxNumber,
                SchoolName    = model.SchoolName,
                ContactPerson = model.ContactPerson,
                Country       = model.Country,
                Address       = model.Address,
                Phone         = model.Phone,
                Email         = model.Email,
                Website       = model.Website,
                SocialMedia   = model.SocialMedia,
                LoginName     = model.LoginName
            };

            entities.Schools.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 6
0
        public void Create(OrganizationsViewModel model)
        {
            Organizations entity = new Organizations()
            {
                MemberID         = model.MemberID,
                TaxNumber        = model.TaxNumber,
                OrganizationName = model.OrganizationName,
                ContactPerson    = model.ContactPerson,
                Country          = model.Country,
                Headquarters     = model.Headquarters,
                JobSector        = model.JobSector,
                Phone            = model.Phone,
                Email            = model.Email,
                Website          = model.Website,
                SocialMedia      = model.SocialMedia,
                LoginName        = model.LoginName
            };

            entities.Organizations.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 7
0
        public void Create(AmbassadorsViewModel model)
        {
            Ambassadors entity = new Ambassadors()
            {
                MemberID    = model.MemberID,
                TaxNumber   = model.TaxNumber,
                LoginName   = model.LoginName,
                FullName    = model.FullName,
                Address     = model.Address,
                Country     = model.Country,
                Phone       = model.Phone,
                Email       = model.Email,
                Website     = model.Website,
                SocialMedia = model.SocialMedia,
                Occupation  = model.Occupation,
                JobSector   = model.JobSector,
                Employer    = model.Employer
            };

            entities.Ambassadors.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 8
0
        public void Create(ApprenticeshipViewModel model)
        {
            Apprenticeships entity = new Apprenticeships()
            {
                ApprenticeshipID = model.ApprenticeshipID,
                PostDate         = model.PostDate,
                DurationMonths   = model.DurationMonths,
                Name             = model.Name,
                Title            = model.Title,
                Description      = model.Description,
                Country          = model.Country,
                Commitment       = model.Commitment,
                Compensation     = model.Compensation,
                JobSector        = model.JobSector,
                Status           = model.Status,
                StartDate        = model.StartDate,
                EndDate          = model.EndDate,
                EmployerID       = model.EmployerID
            };

            entities.Apprenticeships.Add(entity);
            entities.SaveChanges();
        }
Ejemplo n.º 9
0
        public void Create(EmployersViewModel model)
        {
            Employers entity = new Employers()
            {
                MemberID      = model.MemberID,
                TaxNumber     = model.TaxNumber,
                CompanyName   = model.CompanyName,
                ContactPerson = model.ContactPerson,
                Headquarters  = model.Headquarters,
                Country       = model.Country,
                JobSector1    = model.JobSector1,
                JobSector2    = model.JobSector2,
                JobSector3    = model.JobSector3,
                Phone         = model.Phone,
                Email         = model.Email,
                Website       = model.Website,
                SocialMedia   = model.SocialMedia,
                LoginName     = model.LoginName
            };

            entities.Employers.Add(entity);
            entities.SaveChanges();
        }