Ejemplo n.º 1
0
        public static Applicant GetApplicant()
        {
            Applicant applicant = new Applicant();
            applicant.FirstName = "John";
            applicant.LastName = "Malkovich";
            applicant.BirthDate = DateTime.Now.AddYears(-32);
            applicant.Gender = "Male";
            applicant.HomeStatus = true;
            applicant.MaritalStatus = "Married";
            applicant.NumberOfDependants = 0;
            applicant.SocialSecurityNumber = "1234567891011121314";
            applicant.IdentityNumber = "10987654321";
            applicant.OwnCar = true;
            applicant.UserId = Guid.Parse("1594E441-6275-4015-A217-FD7FF9BDDF90");

            //BankCard cardApplicant1 = new BankCard { CardHolder = "John Malkovich", CardNumber = "876877868", ApplicantId = 1, DateAdded = DateTime.Now, UserAdderId = Guid.Parse("1594E441-6275-4015-A217-FD7FF9BDDF90") };
            //BankAccount bankAccount = new BankAccount { AccountHolder = "John Malkovich", AccountNumber = "787678767", ApplicantId = 1, BankAgencyCode = "001", DateAdded = DateTime.Now, UserAdderId = Guid.Parse("1594E441-6275-4015-A217-FD7FF9BDDF90") };
            //Contact email = new Contact { ApplicantId = 1, ContactDetail = "*****@*****.**", ContactTypeId = (int)ContactsOfType.EmailAddress, DateAdded = DateTime.Now, UserAdderId = Guid.Parse("1594E441-6275-4015-A217-FD7FF9BDDF90") };
            //Contact mobile = new Contact { ApplicantId = 1, ContactDetail = "079999999", ContactTypeId = (int)ContactsOfType.MobilePhone, DateAdded = DateTime.Now, UserAdderId = Guid.Parse("1594E441-6275-4015-A217-FD7FF9BDDF90") };

            //applicant.BankCards.Add(cardApplicant1);
            //applicant.BankAccounts.Add(bankAccount);
            //applicant.Contacts.Add(email);
            //applicant.Contacts.Add(mobile);

            return applicant;
        }
Ejemplo n.º 2
0
        public static Applicant InsertApplicant(MoqContainer mockContainer, Applicant applicant)
        {
            using (ILifetimeScope scope = mockContainer.StartNewLifetime())
            {
                GranaDataDataContext granaAppContext = ServiceModule.ResolveReference<GranaDataDataContext>(scope);
                granaAppContext.Applicants.InsertOnSubmit(applicant);
                granaAppContext.SubmitChanges();

                return applicant;
            }
        }
Ejemplo n.º 3
0
        public void UpdateApplicant(Applicant applicant)
        {
            Applicant originalApplicant = GetApplicant(applicant.ApplicantId);

            originalApplicant.BirthDate = applicant.BirthDate;
            originalApplicant.FirstName = applicant.FirstName;
            originalApplicant.LastName = applicant.LastName;
            originalApplicant.MiddleNames = applicant.MiddleNames;
            originalApplicant.Gender = applicant.Gender;
            originalApplicant.HomeStatus = applicant.HomeStatus;
            originalApplicant.IdentityNumber = applicant.IdentityNumber;
            originalApplicant.MaritalStatus = applicant.MaritalStatus;
            originalApplicant.NumberOfDependants = applicant.NumberOfDependants;
            originalApplicant.OwnCar = applicant.OwnCar;
            originalApplicant.SocialSecurityNumber = applicant.SocialSecurityNumber;
            originalApplicant.CarLicense = applicant.CarLicense;
            context.SubmitChanges();
        }
Ejemplo n.º 4
0
        public static Address GetHomeAddress(Applicant applicant, string postcode)
        {
            Address address = new Address
            {
                Address1 = "Line 1",
                Applicant = applicant,
                Neighborhood = "My Neighborhood",
                DateAdded = DateTime.Now,
                UserAdderId = Guid.Parse("D867862C-462B-4262-A3A1-0A7B8DB2D5D1"),
                State = "Rio",
                Postcode = postcode,
                City = "My City",
                Number = "7"

            };

            return address;
        }
Ejemplo n.º 5
0
 partial void DeleteApplicant(Applicant instance);
Ejemplo n.º 6
0
 partial void UpdateApplicant(Applicant instance);
Ejemplo n.º 7
0
 partial void InsertApplicant(Applicant instance);
Ejemplo n.º 8
0
		private void detach_Applicants(Applicant entity)
		{
			this.SendPropertyChanging();
			entity.aspnet_Membership = null;
		}