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); } } }
public static IWorkPermit Get_NewWorkPermit(IPersonInApplication personInApp) { if (personInApp.Employee != null) { if (personInApp != null && personInApp.Employee.IsEmployee && personInApp.Application != null && personInApp.Employee.WorkPermits.Count > 0 && personInApp.Application.ForEmployee) { IWorkPermit workpermit = null; foreach (var employeeInWP in personInApp.Employee.WorkPermits) { if (employeeInWP.ProcessNumber != null && employeeInWP.ProcessNumber.Application == personInApp.Application) { workpermit = employeeInWP; break; } } return(workpermit); } else { return(null); } } else { return(null); } }
/* * private static void FillFormForPerson(IPersonInApplication personInApp, List<XfaField> loFields) * { * * * * * * * * * * * * //24.EMAIL * * //--------------------WIZA MAGLUMATLARY * //32.WIZANYN DEREJESI * //33.WIZANYN GORNUSI * //34.WIZANYN MOHLETI * //35.WIZANYN BASLANYAN * //36.WIZANYN TAMAMLANYAN WAGTY * //37.SONKY BERLEN WIZASYNYN DEREJESI, GORNUSI, BELGISI VE MOHLETI * //38.BARJAK SERHET YAKALARY * //40.BOLJAK WELAYATY * //41.BOLJAK ETRABY * //42.BOLJAK SALGYSY * for (int i = 0; i < loFields.Count; i++) * { * * * * * * * //1.PHOTO * * if (loFields[i] is XfaImageField) * { * Image image = personInApp.PersonType.Photo; * //Console.WriteLine((loFields[i] as XfaImageField).Name); * (loFields[i] as XfaImageField).Image = image; * * } * * * //4.CAGYRYAN TARAP YURIDIKI SAHS * * if (loFields[i] is XfaCheckButtonField && (loFields[i] as XfaCheckButtonField).Name == "topmostSubform[0].Page1[0].IP[1].#field[0]") * { * * (loFields[i] as XfaCheckButtonField).Checked = true; * //"topmostSubform[0].Page1[0].IP[1].#field[0]" * } * * * //5.KARHANANYN ADY * * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0].L10[0]") * { * * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.SigningPerson.TitleOfCompany); * * } * //6.HUKUK SALGYSY * * * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0].L11[0]") * { * * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.SigningPerson.AddressOfCompany); * * } * //7 Email * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0].L12[0]") * { * * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.Application.SigningPerson.Email); * * } * * //8.TELEFON * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0].L13[0]") * { * * (loFields[i] as XfaTextField).Value = personInApp.Application.SigningPerson.PhoneOfNumber; * * } * * //9.FAMILIYASY * * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0]._01[0]") * { * * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.LastName).ToUpper(); * * } * * //11.ADY * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0]._03[0]") * { * * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.FirstName).ToUpper(); * * } * * //12.DOGLAN SENESI * if (loFields[i] is XfaDateTimeField && (loFields[i] as XfaDateTimeField).Name == "topmostSubform[0].Page1[0]._04[0]") * { * * (loFields[i] as XfaDateTimeField).Value = personInApp.PersonType.BirthDate.ToString("dd.MM.yyyy"); * * } * * //13.GYNSY * * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._05[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.PersonType.Gender.mgCode; * * } * //14.RAYATLYGY * * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._06[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Passport.Citizenship.mgCode; * * } * * * //15.DOGLAN YURTDY * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._07[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.PersonType.BirthCountry.mgCode; * * } * * //16.DOGLAN YERI * * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0]._08[0]") * { * * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.BirthPlace); * * } * * * //17.SAHSY BELGISI * * * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0]._09[0]") * { * * (loFields[i] as XfaTextField).Value = personInApp.Passport.PersonalNumber.Replace('-', '0'); * * } * //18.PASPORTUNUN GORNUSI * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._10[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Passport.PassportType.mgCode; * * } * * //19.PASPORTYNYN BELGISI * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0]._11[0]") * { * * (loFields[i] as XfaTextField).Value = personInApp.Passport.PassportNumber.Replace(" ",""); * * } * * * //20.BERLEN SENESI * * if (loFields[i] is XfaDateTimeField && (loFields[i] as XfaDateTimeField).Name == "topmostSubform[0].Page1[0]._12[0]") * { * * (loFields[i] as XfaDateTimeField).Value = personInApp.Passport.PassportIssuedDate.ToString("dd.MM.yyyy"); * * } * //21.PASPORT MOHLETI * if (loFields[i] is XfaDateTimeField && (loFields[i] as XfaDateTimeField).Name == "topmostSubform[0].Page1[0]._13[0]") * { * * (loFields[i] as XfaDateTimeField).Value = personInApp.Passport.PassportExpiringDate.ToString("dd.MM.yyyy"); * * } * * //22.BERLEN YURDY * * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._14[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Passport.PassportIssuedCountry.mgCode; * * } * * //23. DASARY YURTDAKY YASAYAN SALGYSY * * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0]._15[0]") * { * * (loFields[i] as XfaTextField).Value = personInApp.PersonType.ForeignAddressCountry.NameOfCountry + ", " + UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.ForeignAddress); * * } * //25.MASGALA YAGDAY * * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page1[0]._18[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.PersonType.MaritalStatus.mgCode; * * } * * * * //form.XFAForm[form.XFAForm.Fields[i]] = "Hello"; * } * * * * } */ /* * * private static void FillVisa(IPersonInApplication personInApp, List<XfaField> loFields) * { * * * for (int i = 0; i < loFields.Count; i++) * { * //Boljak welayaty * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._33[0]") * { * if(personInApp.PersonType.LastAddressOfResidence!=null && personInApp.PersonType.LastAddressOfResidence.Address.Region!=null){ * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.PersonType.LastAddressOfResidence.Address.Region.mgCode; * } * } * * //Boljak etraby * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._34[0]") * { * * if (personInApp.PersonType.LastAddressOfResidence != null && personInApp.PersonType.LastAddressOfResidence.Address.ŞäherEtrap != null) * { * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.PersonType.LastAddressOfResidence.Address.ŞäherEtrap.mgCode; * } * * } * * //Boljak salgysy * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page2[0]._35[0]") * { * if (personInApp.PersonType.LastAddressOfResidence != null) { * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(personInApp.PersonType.LastAddressOfResidence.Address.AddressLine); * } * * * } * * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page2[0]._30[0]") * { * * if (personInApp.PersonType != null && personInApp.PersonType.LastVisa != null) * { * * string derejesi = personInApp.Employee.LastVisa.VisaType.TypeOfVisaL; * string gornusi = personInApp.Employee.LastVisa.VisaCategory.CategoryOfVisaL; * string belgisi = personInApp.Employee.LastVisa.VisaNumber; * string baslanyansene = personInApp.Employee.LastVisa.VisaStartDate.ToString("dd.MM.yyyy"); * string tamamlansene = personInApp.Employee.LastVisa.VisaEndDate.ToString("dd.MM.yyyy"); * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters(derejesi + ", " + gornusi + ", " + belgisi + ", " + baslanyansene + "-" + tamamlansene); * * * * } * * * } * * * * if (personInApp.Application.SubType == SubType.ApplicationForInvitation) * { * * * * //wiza infor * //VISA GEZEKLIGI * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._26[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Application.VisaCategory.mgCode; * * } * //VISA GORNUSI //derejesi * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._25[0]") * { * if (personInApp.PersonType.IsEmployee && personInApp.Application.VisaPeriod.mgCode == "16" && personInApp.Application.VisaPeriod.PeriodInNumber > 1) * { * (loFields[i] as XfaChoiceListField).SelectedItem = "11"; * } * else { * (loFields[i] as XfaChoiceListField).SelectedItem = "14"; * } * * } * * * * //VISA MOHLETI SAN * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page2[0]._27[0]") * { * * * (loFields[i] as XfaTextField).Value = personInApp.Application.VisaPeriod.PeriodInNumber.ToString(); * * } * //VISA MOHLETI AY YYL GUN * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._271[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Application.VisaPeriod.mgCode; * * } * //Bar jak serhet yakasy * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page2[0]._31[0]") * { * if (personInApp.Application.BorderZoneCollectionForLine!=null) * { * (loFields[i] as XfaTextField).Value = UpdateHelperClasses.ReplaceLetters( personInApp.Application.BorderZoneCollectionForLine); * } * * * } * } * * else * * //VISA EXTENSION * if (personInApp.Application.SubType == SubType.ApplicationForVisaExtention) * { * * * if (personInApp.PersonType.IsEmployee) * { * * * //wiza infor * //VISA GEZEKLIGI * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._26[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Application.VisaCategory.mgCode; * * } * //VISA GORNUSI //derejesi * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._25[0]") * { * * if (personInApp.PersonType.IsEmployee && personInApp.Application.VisaPeriod.mgCode == "16" && personInApp.Application.VisaPeriod.PeriodInNumber > 1) * { * (loFields[i] as XfaChoiceListField).SelectedItem = "11"; * } * else * { * (loFields[i] as XfaChoiceListField).SelectedItem = "14"; * } * * } * //wiza infor * //VISA start date * if (loFields[i] is XfaDateTimeField && (loFields[i] as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._28[0]") * { * if (personInApp.PersonType.LastVisa != null) * { * (loFields[i] as XfaDateTimeField).Value = personInApp.PersonType.LastVisa.VisaEndDate.AddDays(1).ToString("dd.MM.yyyy"); * } * * * } * //VISA end date * if (loFields[i] is XfaDateTimeField && (loFields[i] as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._29[0]") * { * if (personInApp.PersonType.LastVisa != null) * { * (loFields[i] as XfaDateTimeField).Value = personInApp.PersonType.LastVisa.VisaEndDate.AddDays(personInApp.Application.VisaPeriod.CountMonth).ToString("dd.MM.yyyy"); * } * * * } * * } * else * { * * * //VISA GEZEKLIGI * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._26[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Application.VisaCategory.mgCode; * * } * * //wiza infor * //VISA start date * if (loFields[i] is XfaDateTimeField && (loFields[i] as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._28[0]") * { * if (personInApp.PersonType.Employee != null && personInApp.PersonType.Employee.LastVisa != null) * { * (loFields[i] as XfaDateTimeField).Value = personInApp.PersonType.LastVisa.VisaEndDate.AddDays(1).ToString("dd.MM.yyyy"); * } * * * } * * //VISA end date * if (loFields[i] is XfaDateTimeField && (loFields[i] as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._29[0]") * { * if (personInApp.PersonType.LastVisa != null) * { * (loFields[i] as XfaDateTimeField).Value = personInApp.PersonType.Employee.LastVisa.VisaEndDate.ToString("dd.MM.yyyy"); * } * * * } * * } * * * * //VISA MOHLETI SAN * if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page2[0]._27[0]") * { * * * (loFields[i] as XfaTextField).Value = personInApp.Application.VisaPeriod.PeriodInNumber.ToString(); * * } * //VISA MOHLETI AY YYL GUN * if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._271[0]") * { * * (loFields[i] as XfaChoiceListField).SelectedItem = personInApp.Application.VisaPeriod.mgCode; * * } * * } * * } * * } */ //1...ApplicationType L01 private static void FillApplicationType(IPersonInApplication personInApp, XfaField loField) { //0.APPLICATIONTYPE if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0].L01[0]") { if (personInApp.Application.SubType == SubType.ApplicationForInvitation) { (loField as XfaChoiceListField).SelectedItem = "2"; } else if (personInApp.Application.SubType == SubType.ApplicationForVisaExtention) { (loField as XfaChoiceListField).SelectedItem = "3"; } else if (personInApp.Application.SubType == SubType.ApplicationForChangingPassport) { (loField as XfaChoiceListField).SelectedItem = "6"; } else if (personInApp.Application.SubType == SubType.ApplicationForBorderZonePermision) { (loField as XfaChoiceListField).SelectedItem = "23"; } else if (personInApp.Application.SubType == SubType.ApplicationForExitVisa) { (loField as XfaChoiceListField).SelectedItem = "9"; } } }
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); } } }
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(); } } } }
private static void FillPersonVisaPeriodForExitVisa(IPersonInApplication personInApp, XfaField loField) { if (personInApp.Application.SubType == SubType.ApplicationForExitVisa) { //wiza infor //VISA GEZEKLIGI if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._26[0]") { (loField as XfaChoiceListField).SelectedItem = "1"; } //wiza infor //VISA start date if (loField is XfaDateTimeField && (loField as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._28[0]") { if (personInApp.PersonType.LastVisa != null) { (loField as XfaDateTimeField).Value = personInApp.PersonType.LastVisa.VisaEndDate.AddDays(1).ToString("dd.MM.yyyy"); } } //VISA end date if (loField is XfaDateTimeField && (loField as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._29[0]") { if (personInApp.PersonType.LastVisa != null) { (loField as XfaDateTimeField).Value = personInApp.PersonType.LastVisa.VisaEndDate.AddDays(personInApp.Application.VisaPeriod.CountMonth).ToString("dd.MM.yyyy"); } } } }
public static string Get_SpecialtyForLetter(IPersonInApplication personInApplication) { if (personInApplication != null && personInApplication.AppliedPerson.LastEducation != null) { if (personInApplication != null && personInApplication.AppliedPerson.IsEmployee && personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel == "Orta") { return("-"); } else if (personInApplication != null && personInApplication.AppliedPerson.IsEmployee && personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel == "Ýokary") { return(personInApplication.AppliedPerson.LastEducation.Spcialty.TitleOfSpeciality); } else if (personInApplication != null && personInApplication.AppliedPerson.IsEmployee && personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel == "Ýörite orta") { return(personInApplication.AppliedPerson.LastEducation.Spcialty.TitleOfSpeciality);; } else { return("-"); } } else { return(null); } }
public static string Get_EducationForLetter(IPersonInApplication personInApplication) { if (personInApplication != null && personInApplication.AppliedPerson.LastEducation != null) { if (personInApplication != null && personInApplication.AppliedPerson.IsEmployee && personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel == "Orta") { return("Orta"); } else if (personInApplication != null && personInApplication.AppliedPerson.IsEmployee && personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel == "Ýokary") { return(personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel + "\n " + personInApplication.AppliedPerson.LastEducation.EducationCountry.NameOfCountryL + "\n " + personInApplication.AppliedPerson.LastEducation.EducationInstitution.TitleOfIEducationInstitution); } else if (personInApplication != null && personInApplication.AppliedPerson.IsEmployee && personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel == "Ýörite orta") { return(personInApplication.AppliedPerson.LastEducation.EducationLevel.TitleOfEducationLevel + "\n " + personInApplication.AppliedPerson.LastEducation.EducationCountry.NameOfCountryL + "\n " + personInApplication.AppliedPerson.LastEducation.EducationInstitution.TitleOfIEducationInstitution); } else { return("-"); } } else { return(null); } }
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); } } }
public static ApplicationStateEnum Get_PersonState(IPersonInApplication person) { if (person.Rejected) { return(ApplicationStateEnum.Rejected); } if (person.Cancelled) { return(ApplicationStateEnum.Cancelled); } if (person.IsComplete) { return(ApplicationStateEnum.Processed); } if (person.AppliedPerson != null && person.AppliedPerson.IsEmployee) { return(Helper.GEt_PersonInAppStateEmp(person)); } else if (person.AppliedPerson != null && person.AppliedPerson.IsFamilyMember) { return(Helper.GEt_PersonInAppStateFM(person)); } else { return(ApplicationStateEnum.None); } }
public static IPersonInApplication Get_PersonInApplication(IPassport passport) { if (passport.Person.IsEmployee) { IPersonInApplication temp = null; foreach (var empInApp in passport.Person.EmployeeInApplications) { if (empInApp.ApplicationType == SubType.ApplicationForChangingPassport && empInApp.PreviousPassport == passport) { return(temp = empInApp); } } return(temp); } else if (passport.Person.IsFamilyMember) { IPersonInApplication temp = null; foreach (var empInApp in passport.Person.FamilyMemberInApplications) { if (empInApp.ApplicationType == SubType.ApplicationForChangingPassport && empInApp.PreviousPassport == passport) { return(temp = empInApp); } } return(temp); } else { return(null); } }
public static void FillPDFForm(IApplication app, IObjectSpace os) { IPersonInApplication person = app.PersonInApplication.First(); PdfDocument pdfdoc = new PdfDocument(); pdfdoc.LoadFromFile(@"d:\Visa_Application_TM_QR_08.pdf"); PdfFormWidget form = pdfdoc.Form as PdfFormWidget; if (form.XFAForm != null) { List <XfaField> loFields = form.XFAForm.XfaFields; for (int i = 0; i < loFields.Count; i++) { //.1.SURAT if (loFields[i] is XfaImageField) { Image image = Image.FromFile(@"d:\person.jpeg"); (loFields[i] as XfaImageField).Image = person.Employee.Photo; } //----------------YUZTUTMANYN MAGLUMATLARY //2.Yuztutmanyn gornusi if (loFields[i] is XfaChoiceListField && (loFields[i] as XfaChoiceListField).Name == "topmostSubform[0].Page1[0].L01[0]") { Console.WriteLine((loFields[i] as XfaChoiceListField).Name); (loFields[i] as XfaChoiceListField).SelectedItem = "3"; } //FAMILIYASY if (loFields[i] is XfaTextField && (loFields[i] as XfaTextField).Name == "topmostSubform[0].Page1[0].L03[0]") { Console.WriteLine((loFields[i] as XfaTextField).Name); (loFields[i] as XfaTextField).Value = "Amanow"; } if (loFields[i] is XfaCheckButtonField && (loFields[i] as XfaCheckButtonField).Name == "topmostSubform[0].Page1[0].IP[1].#field[0]") { Console.WriteLine((loFields[i] as XfaCheckButtonField).Name); (loFields[i] as XfaCheckButtonField).Checked = true; //"topmostSubform[0].Page1[0].IP[1].#field[0]" } if (loFields[i] is XfaCheckButtonField && (loFields[i] as XfaCheckButtonField).Name == "topmostSubform[0].Page1[0].IP[0].IP[0]") { Console.WriteLine((loFields[i] as XfaCheckButtonField).Name); (loFields[i] as XfaCheckButtonField).Checked = false; //"topmostSubform[0].Page1[0].IP[1].#field[0]" } //form.XFAForm[form.XFAForm.Fields[i]] = "Hello"; } } pdfdoc.SaveToFile(@"d:\visanew.pdf"); }
//2... Urgency L02 private static void FillUrgency(IPersonInApplication personInApp, XfaField loField) { //3.TIZLIGI if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page1[0].L02[0]") { (loField as XfaChoiceListField).SelectedItem = personInApp.Application.Urgency.mgCode; } }
public static void AfterChange_Employee(IPersonInApplication personInApp, IObjectSpace os) { if (personInApp != null && personInApp.AppliedPerson != null && personInApp.AppliedPerson.IsEmployee && personInApp.Application != null && personInApp.Application.ApplicationTypeForEmployee != null) { personInApp.Passport = personInApp.AppliedPerson.LastPassport; // Previous Pasport if (personInApp.PreviousPassportVisibility == true) { personInApp.PreviousPassport = Helper.GetPreviousPassport(personInApp.AppliedPerson); } // Last Visa if (personInApp.VisaVisibility == true) { personInApp.Visa = personInApp.AppliedPerson.LastVisa; } //Last Work Persmit if (personInApp.WorkPermitVisibility == true) { personInApp.WorkPermit = Helper.GetLastWorkPermit(personInApp.Employee); } //Last Entrye if (personInApp.RegistrationVisibility == true && personInApp.EmployeeEntryDate != null) { personInApp.EmployeeEntryDate = Helper.GetLastEntry(personInApp.AppliedPerson); personInApp.CheckPoint = personInApp.EmployeeEntryDate.CheckPoint; personInApp.PurposeOfTrave = personInApp.EmployeeEntryDate.PurposeOfTravel; var visaIssuedPlace = os.FindObject <IVisaIssuedPlace>(new BinaryOperator("IsDefault", true)); if (visaIssuedPlace != null) { personInApp.VisaIssuedPlace = os.FindObject <IVisaIssuedPlace>(new BinaryOperator("IsDefault", true)); } } // Last Address Of Residence if (personInApp.AddressOfResidenceVisibility == true) { personInApp.AddressOfResidence = Helper.GetLastAddress(personInApp.AppliedPerson); } // Last Position if (personInApp.Application.ApplicationTypeForEmployee.Position == true) { personInApp.Position = Helper.GetLastPosition(personInApp.Employee); } } }
public static bool GetFMVisibility(IPersonInApplication person) { if (person.Application.ForFamilyMember) { return(true); } else { return(false); } }
public static string Get_PassportNumberAndDateOfExpire(IPersonInApplication personInApp) { if (personInApp != null) { return(personInApp.Passport.PassportNumber + "\n " + personInApp.Passport.PassportExpiringDate.ToString("dd.MM.yyyy")); } else { return(null); } }
public static bool Get_AddressOnBusinessTripVisibility(IPersonInApplication personInApp) { if (personInApp.Application != null && personInApp.Application.ForEmployee && personInApp.Application.ApplicationTypeForEmployee.BusinessTripDestinationVisibility == true) { return(true); } else { return(false); } }
public static string Get_BirthDateAndPlaceForLetter(IPersonInApplication personInApp) { if (personInApp != null) { return(personInApp.AppliedPerson.BirthDate.ToString("dd.MM.yyyy") + "\n " + personInApp.AppliedPerson.BirthPlace); } else { return(null); } }
public static IPersonn Get_EmployeeAsFM(IPersonInApplication person) { if (person.Application != null && person.Application.ForFamilyMember == true) { return(person.FamilyMember.Employee); } else { return(person.Employee); } }
public static string Get_ContractStartDate(IPersonInApplication personInApp) { if (personInApp.Application.ForEmployee && personInApp.ApplicationType == SubType.ApplicationForVisaExtention | personInApp.ApplicationType == SubType.ApplicationForInvitation) { return(personInApp.Application.ManualApplicationDate.ToString("dd.MM.yyyy")); } else { return(null); } }
public static string Get_BirthDateForLetter(IPersonInApplication personInApp) { if (personInApp.Passport != null) { return(personInApp.Passport.PassportNumber); } else { return(null); } }
public static IPersonn Get_PersonType(IPersonInApplication person) { if (person.Application != null && person.Application.ForEmployee == true) { return(person.Employee); } else { return(person.FamilyMember); } }
public static bool Get_BorderZoneVisible(IPersonInApplication personInApp) { if (personInApp.Application != null && personInApp.Application.ChooseBorderZoneType == ChooseBorderZoneTypeEnum.BorderZoneForApplication && personInApp.Application.BorderZoneVisibility == true) { return(true); } else { return(false); } }
//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); } } }
public static void AfterChange_FamilyMember(IPersonInApplication personInApp, IObjectSpace os) { if (personInApp.AppliedPerson != null && personInApp.AppliedPerson.IsFamilyMember && personInApp != null && personInApp.Application != null && personInApp.Application.ApplicationTypeForFamilyMember != null) { // Employee personInApp.Employee = personInApp.FamilyMember.Employee; // Last Passport personInApp.Passport = personInApp.AppliedPerson.LastPassport; if (personInApp.PreviousPassportVisibility == true) { personInApp.PreviousPassport = Helper.GetPreviousPassport(personInApp.AppliedPerson); } // Last Visa if (personInApp.VisaVisibility == true) { personInApp.Visa = personInApp.AppliedPerson.LastVisa; } // Last Address Fo Residence if (personInApp.AddressOfResidenceVisibility == true) { personInApp.AddressOfResidence = personInApp.AppliedPerson.LastAddressOfResidence; } // Last Family Entry if (personInApp.RegistrationVisibility == true) { personInApp.FamilyMemberEntryDate = Helper.GetLastEntry(personInApp.PersonType); personInApp.CheckPoint = personInApp.FamilyMemberEntryDate.CheckPoint; personInApp.PurposeOfTrave = personInApp.FamilyMemberEntryDate.PurposeOfTravel; var visaIssuedPlace = os.FindObject <IVisaIssuedPlace>(new BinaryOperator("IsDefault", true)); if (visaIssuedPlace != null) { personInApp.VisaIssuedPlace = os.FindObject <IVisaIssuedPlace>(new BinaryOperator("IsDefault", true)); } } // Last Position personInApp.Position = Helper.GetLastPosition(personInApp.Employee); } }
public static IApplicationResult Get_RejectionLet(IPersonInApplication personInApp) { if (personInApp.Application != null && personInApp.Application.ForEmployee) { return(Helper.Get_Rejection(personInApp.Application, personInApp.Employee)); } else if (personInApp.Application != null && personInApp.Application.ForFamilyMember) { return(Helper.Get_Rejection(personInApp.Application, personInApp.FamilyMember)); } else { return(null); } }
public static IPersonn Get_AppliedPerson(IPersonInApplication person) { if (person.Application != null && person.Application.ForEmployee) { return(person.Employee); } else if (person.Application != null && person.Application.ForFamilyMember) { return(person.FamilyMember); } else { return(null); } }
public static PdfDocument Fill(IPersonInApplication personInApp) { PdfDocument pdfdoc = new PdfDocument(); pdfdoc.LoadFromFile("Visa_Application_TM_QR_08.pdf"); // pdfdoc.LoadFromFile("Visa_Application_TM_QR_08.pdf"); PdfFormWidget form = pdfdoc.Form as PdfFormWidget; if (form.XFAForm != null) { List <XfaField> loFields = form.XFAForm.XfaFields; // FillFormForPerson(personInApp, loFields); // FillVisa(personInApp, loFields); for (int i = 0; i < loFields.Count; i++) { FillApplicationType(personInApp, loFields[i]); FillUrgency(personInApp, loFields[i]); FillInviterInfo(personInApp, loFields[i]); FillPersonalInfo(personInApp, loFields[i]); FillPersonsPreviousVisa(personInApp, loFields[i]); FillVisaDerejesi(personInApp, loFields[i]); FillLocalAddressInfo(personInApp, loFields[i]); FillPersonVisaPeriodForExitVisa(personInApp, loFields[i]); if (personInApp.PersonType.IsEmployee) { FillEmploymentInfo(personInApp, loFields[i]); FillEmployeeVisaPeriodForExtention(personInApp, loFields[i]); FillEmployeeVisaPeriodForInvitation(personInApp, loFields[i]); FillEducationInfo(personInApp, loFields[i]); } else { FillFMVisaPeriodForExtention(personInApp, loFields[i]); FillFMVisaPeriodForInvitation(personInApp, loFields[i]); FillFMInfo(personInApp, loFields[i]); } } } return(pdfdoc); }
public static string Get_PositionForReport(IPersonInApplication personInApp) { if (personInApp.Application != null && personInApp.Position != null && personInApp.Application.ForEmployee) { return(personInApp.Position.Position.Code + "" + personInApp.Position.Position.TitleOfPosition); } else if (personInApp.Application != null && personInApp.Application.ForFamilyMember) { return(personInApp.Position.Position.Code + "." + personInApp.Position.Position.TitleOfPosition + "-" + personInApp.Employee.FullName + "-ň " + personInApp.FamilyMember.FamilyMemberRelation.RelativeAsL); } else { return(null); } }
private static void FillFMVisaPeriodForExtention(IPersonInApplication personInApp, XfaField loField) { if (personInApp.Application.SubType == SubType.ApplicationForVisaExtention) { //VISA GEZEKLIGI if (loField is XfaChoiceListField && (loField as XfaChoiceListField).Name == "topmostSubform[0].Page2[0]._26[0]") { (loField as XfaChoiceListField).SelectedItem = personInApp.Application.VisaCategory.mgCode; } //wiza infor //VISA start date if (loField is XfaDateTimeField && (loField as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._28[0]") { if (personInApp.PersonType.Employee != null && personInApp.PersonType.Employee.LastVisa != null) { (loField as XfaDateTimeField).Value = personInApp.PersonType.LastVisa.VisaEndDate.AddDays(1).ToString("dd.MM.yyyy"); } } //VISA end date if (loField is XfaDateTimeField && (loField as XfaDateTimeField).Name == "topmostSubform[0].Page2[0]._29[0]") { if (personInApp.PersonType.LastVisa != null) { (loField as XfaDateTimeField).Value = personInApp.PersonType.Employee.LastVisa.VisaEndDate.ToString("dd.MM.yyyy"); } } //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; } } }