Esempio n. 1
0
        private static void FillFMVisaPeriodForInvitation(IPersonInApplication personInApp, XfaField loField)
        {
            if (personInApp.Application.SubType == SubType.ApplicationForInvitation)
            {
                //wiza infor
                //VISA GEZEKLIGI
                if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._26[0]")
                {
                    (loField as XfaChoiceListField).SelectedItem = personInApp.Application.VisaCategory.mgCode;
                }



                //VISA MOHLETI SAN
                if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page2[0]._27[0]")
                {
                    (loField as XfaTextField).Value = personInApp.Application.VisaPeriod.PeriodInNumber.ToString();
                }
                //VISA MOHLETI AY YYL GUN
                if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._271[0]")
                {
                    (loField as XfaChoiceListField).SelectedItem = personInApp.Application.VisaPeriod.mgCode;
                }
                //Bar jak serhet yakasy
                if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page2[0]._31[0]")
                {
                    if (personInApp.Application.BorderZoneCollectionForLine != null)
                    {
                        (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.BorderZoneCollectionForLine).Trim();
                    }
                }
            }
        }
Esempio n. 2
0
        private static void FillLocalAddressInfo(IPersonInApplication personInApp, XfaField loField)
        {
            //Boljak welayaty
            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._33[0]")
            {
                if (personInApp.PersonType.LastAddressOfResidence != null && personInApp.PersonType.LastAddressOfResidence.Address.Region != null)
                {
                    (loField as XfaChoiceListField).SelectedItem = personInApp.PersonType.LastAddressOfResidence.Address.Region.mgCode;
                }
            }

            //Boljak etraby
            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._34[0]")
            {
                if (personInApp.PersonType.LastAddressOfResidence != null && personInApp.PersonType.LastAddressOfResidence.Address.ŞäherEtrap != null)
                {
                    (loField as XfaChoiceListField).SelectedItem = personInApp.PersonType.LastAddressOfResidence.Address.ŞäherEtrap.mgCode;
                }
            }

            //Boljak salgysy
            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page2[0]._35[0]")
            {
                if (personInApp.PersonType.LastAddressOfResidence != null)
                {
                    (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.LastAddressOfResidence.Address.AddressLine);
                }
            }
        }
Esempio n. 3
0
        private static void FillEducationInfo(IPersonInApplication personInApp, XfaField loField)
        {
            //27.BILIM DEREJESI
            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._19[0]")
            {
                (loField as XfaChoiceListField).SelectedItem = personInApp.PersonType.LastEducation.EducationLevel.mgCode;
            }

            //28.HUNARI

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._20[0]")
            {
                if (personInApp.PersonType.LastEducation != null && personInApp.PersonType.LastEducation.EducationInstitution.TitleOfIEducationInstitution != null)
                {
                    (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.LastEducation.Spcialty.TitleOfSpeciality);
                }
            }



            //29.OKAN YERI

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._21[0]")
            {
                if (personInApp.PersonType.LastEducation != null && personInApp.PersonType.LastEducation.EducationInstitution.TitleOfIEducationInstitution != null)
                {
                    (loField as XfaTextField).Value = personInApp.PersonType.LastEducation.EducationCountry.NameOfCountry + ", " + UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.LastEducation.EducationInstitution.TitleOfIEducationInstitution);
                }
            }
        }
Esempio n. 4
0
        private static void FillEmploymentInfo(IPersonInApplication personInApp, XfaField loField)
        {
            //30.HEREKET CAGI

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page2[0]._38[0]")
            {
                if (personInApp.Application.Bellik != null && !String.IsNullOrEmpty(personInApp.Application.Bellik.BelliklerL))
                {
                    (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.Bellik.BelliklerL);
                }
            }

            //30.MAKSADY

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page2[0]._50[0]")
            {
                if (personInApp.Application.AnketaMaksat != null && !String.IsNullOrEmpty(personInApp.Application.AnketaMaksat.Maksat))
                {
                    (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.AnketaMaksat.Maksat);
                }
            }

            //31.WEZIPESI

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._23[0]")
            {
                if (personInApp.PersonType.LastPosition != null && personInApp.PersonType.LastPosition.Position.TitleOfPosition.Length > 0)
                {
                    (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.LastPosition.Position.TitleOfPosition);
                }
            }
        }
Esempio n. 5
0
 //Previous Visa _30  ALL
 private static void FillPersonsPreviousVisa(IPersonInApplication personInApp, XfaField loField)
 {
     if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page2[0]._30[0]")
     {
         if (personInApp.PersonType != null && personInApp.PersonType.LastVisa != null)
         {
             string derejesi      = personInApp.PersonType.LastVisa.VisaType.TypeOfVisaL;
             string gornusi       = personInApp.PersonType.LastVisa.VisaCategory.CategoryOfVisaL;
             string belgisi       = personInApp.PersonType.LastVisa.VisaNumber;
             string baslanyansene = personInApp.PersonType.LastVisa.VisaStartDate.ToString("dd.MM.yyyy");
             string tamamlansene  = personInApp.PersonType.LastVisa.VisaEndDate.ToString("dd.MM.yyyy");
             (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(derejesi + ", " + gornusi + ", " + belgisi + ", " + baslanyansene + "-" + tamamlansene);
         }
     }
 }
Esempio n. 6
0
        //3... Inviter Info
        private static void FillInviterInfo(IPersonInApplication personInApp, XfaField loField)
        {
            //4.CAGYRYAN TARAP YURIDIKI SAHS

            if (loField is XfaCheckButtonField && (loField as XfaCheckButtonField).Name == "topmostSubform[0].Page1[0].IP[1].#field[0]")
            {
                (loField as XfaCheckButtonField).Checked = true;
                //"topmostSubform[0].Page1[0].IP[1].#field[0]"
            }


            //5.KARHANANYN ADY

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0].L10[0]")
            {
                (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.SigningPerson.TitleOfCompany);
            }
            //6.HUKUK SALGYSY


            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0].L11[0]")
            {
                (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.SigningPerson.AddressOfCompany);
            }
            //7 Email
            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0].L12[0]")
            {
                (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.SigningPerson.Email);
            }

            //8.TELEFON
            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0].L13[0]")
            {
                (loField as XfaTextField).Value = personInApp.Application.SigningPerson.PhoneOfNumber;
            }
        }
Esempio n. 7
0
        //4... Personal info

        private static void FillPersonalInfo(IPersonInApplication personInApp, XfaField loField)
        {
            //1.PHOTO

            if (loField is XfaImageField)
            {
                Image image = personInApp.PersonType.Photo;
                //Console.WriteLine((loFields[i] as XfaImageField).Name);
                (loField as XfaImageField).Image = image;
            }


            //9.FAMILIYASY

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._01[0]")
            {
                (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.LastName).ToUpper();
            }

            //11.ADY
            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._03[0]")
            {
                (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.FirstName).ToUpper();
            }

            //12.DOGLAN SENESI
            if (loField is XfaDateTimeField && (loField as XfaDateTimeField).Name == "topmostSubform[0].Page1[0]._04[0]")
            {
                (loField as XfaDateTimeField).Value = personInApp.PersonType.BirthDate.ToString("dd.MM.yyyy");
            }

            //13.GYNSY

            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._05[0]")
            {
                (loField as XfaChoiceListField).SelectedItem = personInApp.PersonType.Gender.mgCode;
            }
            //14.RAYATLYGY

            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._06[0]")
            {
                (loField as XfaChoiceListField).SelectedItem = personInApp.Passport.Citizenship.mgCode;
            }


            //15.DOGLAN YURTDY
            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._07[0]")
            {
                (loField as XfaChoiceListField).SelectedItem = personInApp.PersonType.BirthCountry.mgCode;
            }

            //16.DOGLAN YERI

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._08[0]")
            {
                (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.BirthPlace);
            }


            //17.SAHSY BELGISI


            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._09[0]")
            {
                (loField as XfaTextField).Value = personInApp.Passport.PersonalNumber.Replace('-', '0');
            }
            //18.PASPORTUNUN GORNUSI
            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._10[0]")
            {
                (loField as XfaChoiceListField).SelectedItem = personInApp.Passport.PassportType.mgCode;
            }

            //19.PASPORTYNYN BELGISI
            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._11[0]")
            {
                (loField as XfaTextField).Value = personInApp.Passport.PassportNumber.Replace(" ", "");
            }


            //20.BERLEN SENESI

            if (loField is XfaDateTimeField && (loField as XfaDateTimeField).Name == "topmostSubform[0].Page1[0]._12[0]")
            {
                (loField as XfaDateTimeField).Value = personInApp.Passport.PassportIssuedDate.ToString("dd.MM.yyyy");
            }
            //21.PASPORT MOHLETI
            if (loField is XfaDateTimeField && (loField as XfaDateTimeField).Name == "topmostSubform[0].Page1[0]._13[0]")
            {
                (loField as XfaDateTimeField).Value = personInApp.Passport.PassportExpiringDate.ToString("dd.MM.yyyy");
            }

            //22.BERLEN YURDY

            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._14[0]")
            {
                (loField as XfaChoiceListField).SelectedItem = personInApp.Passport.PassportIssuedCountry.mgCode;
            }

            //23. DASARY YURTDAKY YASAYAN SALGYSY

            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._15[0]")
            {
                (loField as XfaTextField).Value = personInApp.PersonType.ForeignAddressCountry.NameOfCountry + ", " + UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.ForeignAddress);
            }
            //25.MASGALA YAGDAY

            if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._18[0]")
            {
                (loField as XfaChoiceListField).SelectedItem = personInApp.PersonType.MaritalStatus.mgCode;
            }

            //26.MASGALA AGZALARY
            if (loField is XfaTextField && (loField as XfaTextField).Name == "topmostSubform[0].Page1[0]._181[0]")
            {
                (loField as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.MaritalStatus.StatusL);
            }

            //form.XFAForm[form.XFAForm.Fields[i]] = "Hello";
        }