Ejemplo n.º 1
0
        void addApplicant()
        {
            PhoneCodeModel hm = new PhoneCodeModel { phoneCodeDescription = "Home Phone", phoneCode = "AA", lastModifiedDate = DateTime.Now };
            PhoneCodeModel cm = new PhoneCodeModel { phoneCodeDescription = "Cell Phone", phoneCode = "BB", lastModifiedDate = DateTime.Now };

            List<PhoneModel> phones = new List<PhoneModel>();
            PhoneModel p1 = new PhoneModel();
            p1.createDate = DateTime.Now;
            p1.lastModifiedDate = DateTime.Now;
            p1.phoneNumber = 1231231233;
            p1.phoneCd = hm.phoneCode;
            phones.Add(p1);

            PhoneModel p2 = new PhoneModel();
            p2.createDate = DateTime.Now;
            p2.lastModifiedDate = DateTime.Now;
            p2.phoneNumber = 9999999999;
            p2.phoneCd = cm.phoneCode;
            phones.Add(p2);

            ApplicantModel a1 = new ApplicantModel();
            a1.applicantId = 1;
            a1.firstName = "Wes";
            a1.lastName = "Reisz";
            a1.middleInitial = "T";
            a1.ssn = "111111111";
            a1.suffix = ""; //this should default if nothing
            a1.phones = phones.ToArray<PhoneModel>();

            //IService service = new PhoneService();
            //service.addOrUpdatePhone(a1);
        }
Ejemplo n.º 2
0
        public void setupData()
        {
            //add and test phonecodes
            phoneService = new PhoneService();
            applicantService = new ApplicantService();

            ApplicantModel applicant = new ApplicantModel { applicantId = 1, firstName = "Wes", lastName = "Reisz", lastUpdated = DateTime.Now, middleInitial = "T", ssn = "123456789", suffix = "JR" };
            applicantService.addOrUpdateApplicant(applicant);

            PhoneCodeModel hm = new PhoneCodeModel { phoneCodeDescription = "Home Phone", phoneCode = "AA", lastModifiedDate = DateTime.Now };
            phoneService.addPhoneCd(hm);
            phoneService.addOrUpdatePhone(new PhoneModel {applicantId=applicant.applicantId,createDate=DateTime.Now, lastModifiedDate=DateTime.Now, phoneCd=hm.phoneCode,phoneNumber=1231231233});
        }