if (radTabResult.SelectedIndex == 1)//FileEducation
{
var result1 = from p in dc.FileEducations
where (txtFileNo.Text == string.Empty || p.File.FileNo == Convert.ToInt32("0" + txtFileNo.Text))
where (cboHarfParvande.SelectedValue == "" || p.File.FileHarfID == Convert.ToInt32("0" + cboHarfParvande.SelectedValue))
where (!nationalCodeList.Any() || nationalCodeList.Contains(p.File.NationalCode))
where (txtIdentNo.Text == string.Empty || p.File.IdentNum == txtIdentNo.Text)
where (cboSex.SelectedValue == "-1" || p.File.SexID == Convert.ToInt32(cboSex.SelectedValue))
where (txtFName.Text == string.Empty || p.File.FirstName.Replace(" ", "").Contains(txtFName.Text.Replace(" ", "")))
where (txtLName.Text == string.Empty || p.File.LastName.Replace(" ", "").Contains(txtLName.Text.Replace(" ", "")))
where (txtFatherName.Text == string.Empty || p.File.FatherName.Replace(" ", "").Contains(txtFatherName.Text.Replace(" ", "")))
where (this.University.Count == 0 || this.University.Contains(p.UniversityID))
where (this.UniversityType.Count == 0 ||
(p.UniversityID != null && this.UniversityType.Contains(p.University.ParentItemID)) ||
(p.University.HierarchyParentItem != null && this.UniversityType.Contains(p.University.HierarchyParentItem.ParentItemID)))
where (this.AcademicField.Count == 0 ||
this.AcademicField.Contains(p.AcademicFieldID) ||
(p.AcademicFieldID != null && this.AcademicField.Contains(p.AcademicField.ParentItemID)) ||
(p.AcademicField.HierarchyParentItem != null && this.AcademicField.Contains(p.AcademicField.HierarchyParentItem.ParentItemID)))
where (this.EducationLevel.Count == 0 || this.EducationLevel.Contains(p.EducationLevelID))
where (cboStatus.SelectedValue == "-1" || p.StatusID == Convert.ToInt32(cboStatus.SelectedValue))
where (cboReshtehTahsili.SelectedValue == "-1" || p.AcademicField.ParentItemID == Convert.ToInt32(cboReshtehTahsili.SelectedValue))
where (txtStartDate3.Text == string.Empty || p.FinishDate.CompareTo(txtStartDate3.Text) >= 0)
where (txtFinishDate3.Text == string.Empty || p.FinishDate.CompareTo(txtFinishDate3.Text) <= 0)
where (txtReceiveDate_Start.Text == string.Empty || p.ReceiveDate.Substring(0, 10).CompareTo(txtReceiveDate_Start.Text) >= 0)
where (txtReceiveDate_End.Text == string.Empty || p.ReceiveDate.Substring(0, 10).CompareTo(txtReceiveDate_End.Text) <= 0)
where (this.SarbaziNoe.Count == 0 || this.SarbaziNoe.Contains(p.SarbaziNoeID))
where (this.SarbaziNoeKhedmat.Count == 0 || this.SarbaziNoeKhedmat.Contains(p.SarbaziNoeKhedmatID))
where (!chkTarhElzam.Checked || p.SarbaziTarhElzamAzTarikh != "")
where (txtStartDate4.Text == string.Empty || p.SarbaziTarikhAmrie.CompareTo(txtStartDate4.Text) >= 0)
where (txtFinishDate4.Text == string.Empty || p.SarbaziTarikhAmrie.CompareTo(txtFinishDate4.Text) <= 0)
where (txtStartDate5.Text == string.Empty || p.SarbaziPayeKhedmati.CompareTo(txtStartDate5.Text) >= 0)
where (txtFinishDate5.Text == string.Empty || p.SarbaziPayeKhedmati.CompareTo(txtFinishDate5.Text) <= 0)
where (this.MoafiatNoe.Count == 0 || this.MoafiatNoe.Contains(p.MoafiatNoeID))
where (this.MoafiatStatus.Count == 0 ||
(this.MoafiatStatus.Contains(1) && p.MoafiatStatus == "UnderReview") ||
(this.MoafiatStatus.Contains(2) && p.MoafiatStatus == "Confirmed" && !p.MoafiatIsPrinted) ||
(this.MoafiatStatus.Contains(3) && p.MoafiatStatus == "Confirmed" && p.MoafiatIsPrinted) ||
(this.MoafiatStatus.Contains(4) && p.MoafiatRejected))
where (txtStartDate2.Text == string.Empty || p.MoafiatTarikh.CompareTo(txtStartDate2.Text) >= 0)
where (txtFinishDate2.Text == string.Empty || p.MoafiatTarikh.CompareTo(txtFinishDate2.Text) <= 0)
where (this.Place2.Count == 0 || this.Place2.Contains(p.MoafiatPlaceID))
//where (!chkWithoutDegree.Checked || !p.File.FileEducations.Any())
where (!chkFaghedEblagh.Checked || !p.FileEducationEblaghs.Any(e => !e.Rejected))
where (!chkFaghedMoafiat.Checked || p.MoafiatStatus == null || p.MoafiatStatus == "UnderReview")
where (!chkFaghedPayamAvari.Checked || p.SarbaziNoeKhedmat == null || p.SarbaziNoeKhedmat.Qualifier != "PayamAvar")
where (!chkAdamShomulEzafekhedmat.Checked || p.AdamShomulEzafekhedmatAzTarikh != null)
//let fieldPath = dc.HirarchyFullPath(p.AcademicFieldID)
orderby p.File.LastName, p.File.FirstName
select new
{
p.FileID,
p.File.FirstName,
p.File.LastName,
p.File.IdentNum,
p.File.FatherName,
p.File.NationalCode,
p.File.FileNo,
FileHarfID = p.File.FileHarf != null ? p.File.FileHarf.Dsc : "",
ReligionID = p.File.Religion != null ? p.File.Religion.Dsc : "",
NationalityID = p.File.Nationality != null ? p.File.Nationality.Dsc : "",
MarriageStatusID = p.File.MarriageStatus != null ? p.File.MarriageStatus.Dsc : "",
SexID = p.File.Sex.Dsc,
p.File.FormerLastName,
p.File.IssuancePlaceNamex,
p.File.BirthDate,
p.File.ChildCount,
p.File.PostalCode,
p.File.Address,
p.File.Phone,
p.File.Mobile,
p.File.Email,
p.File.DepartureDate,
p.File.TarhDepartureDuration,
p.File.TadavomDepartureDuration,
p.File.TadavomCovid19DepartureDuration,
p.File.AllTadavomDepartureDuration,
p.File.TotalDepartureDuration,
p.File.SarbaziDuration,
TotalTarhDepartureDuration = (p.File.TotalDepartureDuration ?? 0) - (p.File.SarbaziDuration ?? 0),
p.ID,
AcademicFieldID = p.AcademicField != null ? p.AcademicField.Dsc : "",
AcademicFieldGroup = p.AcademicField != null ? GetAcademicFieldGroup(p.AcademicField.Path) : "",
EducationLevelID = p.EducationLevel != null ? p.EducationLevel.Dsc : "",
EducationGerayeshID = p.EducationGerayesh != null ? p.EducationGerayesh.Dsc : "",
UniversityID = p.UniversityID != null ? (p.University.HierarchyParentItem.Dsc + " " + p.University.Dsc) : "",
UniversityTypeID = p.UniversityID != null ? p.University.HierarchyParentItem.Dsc : "",
LevelTypeID = p.LevelType != null ? p.LevelType.Dsc : "",
EducationTypeID = p.EducationType != null ? p.EducationType.Dsc : "",
SahmiyeID = p.Sahmiye != null ? p.Sahmiye.Dsc : "",
TarafTahodID = p.TarafTahod != null ? p.TarafTahod.Dsc : "",
TahodTypeID = p.TahodTypeID != null ? p.TahodType.Dsc : "",
GraduationCountryID = p.GraduationCountry != null ? p.GraduationCountry.Dsc : "",
NoeEtebarArzeshnameID = p.NoeEtebarArzeshname != null ? p.NoeEtebarArzeshname.Dsc : "",
BoursieID = p.Boursie != null ? p.Boursie.Dsc : "",
DoreTakmiliID = p.DoreTakmili != null ? p.DoreTakmili.Dsc : "",
EstefadeArzDolatiID = p.EstefadeArzDolati != null ? p.EstefadeArzDolati.Dsc : "",
PardakhtShahrieID = p.PardakhtShahrie != null ? p.PardakhtShahrie.Dsc : "",
TasvieDaneshgahID = p.TasvieDaneshgah != null ? p.TasvieDaneshgah.Dsc : "",
FormerEducationLevelID = p.FormerEducationLevel != null ? p.FormerEducationLevel.Dsc : "",
FormerAcademicFieldID = p.FormerAcademicField != null ? p.FormerAcademicField.Dsc : "",
StatusID = p.Status != null ? p.Status.Dsc : "",
p.ReceiveDate,
p.StartDate,
p.FinishDate,
FinishDateYear = p.FinishDate.Substring(0, 4),
p.Average,
p.NamGhanon,
p.ModatTahod,
p.SamaaDsc,
p.Dsc,
p.ModatEstefadeArzDolati,
p.TedadVahed,
p.TarikhEtebarArzeshname,
p.FormerGraduationDate,
p.File.LastFileEducationID,
};
return result1.Where(p => !chkLastFileEducation.Checked || p.LastFileEducationID == p.ID).ToList();
}
else if (radTabResult.SelectedIndex == 3)//FileEducationMoafiat
{
string orgAccessCode = AuthenticatedUser.OrgPlaceCode.Substring(0, 3);
var result3 = from p in dc.FileEducations.Where(m => VezaratPermission() || m.MoafiatPlace.Code.StartsWith(orgAccessCode))
where (txtFileNo.Text == string.Empty || p.File.FileNo == Convert.ToInt32("0" + txtFileNo.Text))
where (cboHarfParvande.SelectedValue == "" || p.File.FileHarfID == Convert.ToInt32("0" + cboHarfParvande.SelectedValue))
where (!nationalCodeList.Any() || nationalCodeList.Contains(p.File.NationalCode))
where (txtIdentNo.Text == string.Empty || p.File.IdentNum == txtIdentNo.Text)
where (cboSex.SelectedValue == "-1" || p.File.SexID == Convert.ToInt32(cboSex.SelectedValue))
where (txtFName.Text == string.Empty || p.File.FirstName.Replace(" ", "").Contains(txtFName.Text.Replace(" ", "")))
where (txtLName.Text == string.Empty || p.File.LastName.Replace(" ", "").Contains(txtLName.Text.Replace(" ", "")))
where (txtFatherName.Text == string.Empty || p.File.FatherName.Replace(" ", "").Contains(txtFatherName.Text.Replace(" ", "")))
where (this.University.Count == 0 || this.University.Contains(p.UniversityID))
where (this.UniversityType.Count == 0 ||
(p.UniversityID != null && this.UniversityType.Contains(p.University.ParentItemID)) ||
(p.University.HierarchyParentItem != null && this.UniversityType.Contains(p.University.HierarchyParentItem.ParentItemID)))
where (this.AcademicField.Count == 0 ||
this.AcademicField.Contains(p.AcademicFieldID) ||
(p.AcademicFieldID != null && this.AcademicField.Contains(p.AcademicField.ParentItemID)) ||
(p.AcademicField.HierarchyParentItem != null && this.AcademicField.Contains(p.AcademicField.HierarchyParentItem.ParentItemID)))
where (this.EducationLevel.Count == 0 || this.EducationLevel.Contains(p.EducationLevelID))
where (cboStatus.SelectedValue == "-1" || p.StatusID == Convert.ToInt32(cboStatus.SelectedValue))
where (cboReshtehTahsili.SelectedValue == "-1" || p.AcademicField.ParentItemID == Convert.ToInt32(cboReshtehTahsili.SelectedValue))
where (txtStartDate3.Text == string.Empty || p.FinishDate.CompareTo(txtStartDate3.Text) >= 0)
where (txtFinishDate3.Text == string.Empty || p.FinishDate.CompareTo(txtFinishDate3.Text) <= 0)
where (txtReceiveDate_Start.Text == string.Empty || p.ReceiveDate.Substring(0, 10).CompareTo(txtReceiveDate_Start.Text) >= 0)
where (txtReceiveDate_End.Text == string.Empty || p.ReceiveDate.Substring(0, 10).CompareTo(txtReceiveDate_End.Text) <= 0)
where (this.MoafiatNoe.Count == 0 || this.MoafiatNoe.Contains(p.MoafiatNoeID))
where (this.MoafiatStatus.Count == 0 ||
(this.MoafiatStatus.Contains(1) && p.MoafiatStatus == "UnderReview") ||
(this.MoafiatStatus.Contains(2) && p.MoafiatStatus == "Confirmed" && !p.MoafiatIsPrinted) ||
(this.MoafiatStatus.Contains(3) && p.MoafiatStatus == "Confirmed" && p.MoafiatIsPrinted) ||
(this.MoafiatStatus.Contains(4) && p.MoafiatRejected))
where (txtStartDate2.Text == string.Empty || p.MoafiatTarikh.CompareTo(txtStartDate2.Text) >= 0)
where (txtFinishDate2.Text == string.Empty || p.MoafiatTarikh.CompareTo(txtFinishDate2.Text) <= 0)
where (this.Place2.Count == 0 || this.Place2.Contains(p.MoafiatPlaceID))
orderby p.File.LastName, p.File.FirstName
select new
{
p.FileID,
p.File.FirstName,
p.File.LastName,
p.File.IdentNum,
p.File.FatherName,
p.File.NationalCode,
p.File.FileNo,
FileHarfID = p.File.FileHarf != null ? p.File.FileHarf.Dsc : "",
ReligionID = p.File.Religion != null ? p.File.Religion.Dsc : "",
NationalityID = p.File.Nationality != null ? p.File.Nationality.Dsc : "",
MarriageStatusID = p.File.MarriageStatus != null ? p.File.MarriageStatus.Dsc : "",
SexID = p.File.Sex.Dsc,
p.File.FormerLastName,
p.File.IssuancePlaceNamex,
p.File.BirthDate,
p.File.ChildCount,
p.File.PostalCode,
p.File.Address,
p.File.Phone,
p.File.Mobile,
p.File.Email,
p.File.DepartureDate,
p.File.TarhDepartureDuration,
p.File.TadavomDepartureDuration,
p.File.TadavomCovid19DepartureDuration,
p.File.AllTadavomDepartureDuration,
p.File.TotalDepartureDuration,
p.File.SarbaziDuration,
TotalTarhDepartureDuration = (p.File.TotalDepartureDuration ?? 0) - (p.File.SarbaziDuration ?? 0),
p.ID,
AcademicFieldID = p.AcademicField != null ? p.AcademicField.Dsc : "",
AcademicFieldGroup = GetAcademicFieldGroup(p.AcademicField.Path),
EducationLevelID = p.EducationLevel != null ? p.EducationLevel.Dsc : "",
EducationGerayeshID = p.EducationGerayesh != null ? p.EducationGerayesh.Dsc : "",
UniversityID = p.UniversityID != null ? (p.University.HierarchyParentItem.Dsc + " " + p.University.Dsc) : "",
UniversityTypeID = p.UniversityID != null ? p.University.HierarchyParentItem.Dsc : "",
LevelTypeID = p.LevelType != null ? p.LevelType.Dsc : "",
EducationTypeID = p.EducationType != null ? p.EducationType.Dsc : "",
SahmiyeID = p.Sahmiye != null ? p.Sahmiye.Dsc : "",
TarafTahodID = p.TarafTahod != null ? p.TarafTahod.Dsc : "",
TahodTypeID = p.TahodTypeID != null ? p.TahodType.Dsc : "",
GraduationCountryID = p.GraduationCountry != null ? p.GraduationCountry.Dsc : "",
NoeEtebarArzeshnameID = p.NoeEtebarArzeshname != null ? p.NoeEtebarArzeshname.Dsc : "",
BoursieID = p.Boursie != null ? p.Boursie.Dsc : "",
DoreTakmiliID = p.DoreTakmili != null ? p.DoreTakmili.Dsc : "",
EstefadeArzDolatiID = p.EstefadeArzDolati != null ? p.EstefadeArzDolati.Dsc : "",
PardakhtShahrieID = p.PardakhtShahrie != null ? p.PardakhtShahrie.Dsc : "",
TasvieDaneshgahID = p.TasvieDaneshgah != null ? p.TasvieDaneshgah.Dsc : "",
FormerEducationLevelID = p.FormerEducationLevel != null ? p.FormerEducationLevel.Dsc : "",
FormerAcademicFieldID = p.FormerAcademicField != null ? p.FormerAcademicField.Dsc : "",
StatusID = p.Status != null ? p.Status.Dsc : "",
p.ReceiveDate,
p.StartDate,
p.FinishDate,
p.Average,
p.NamGhanon,
p.ModatTahod,
p.SamaaDsc,
p.Dsc,
p.ModatEstefadeArzDolati,
p.TedadVahed,
p.TarikhEtebarArzeshname,
p.FormerGraduationDate,
MoafiatNoeID = p.MoafiatNoe != null ? p.MoafiatNoe.Dsc : "",
MoafiatPlaceID = p.MoafiatPlace != null ? p.MoafiatPlace.Namex : "",
p.MoafiatShomare,
p.MoafiatTarikh,
MoafiatTarikhYear = p.MoafiatTarikh.Substring(0, 4),
MoafiatTarikhMonth = p.MoafiatTarikh.Substring(5, 2),
p.MoafiatDsc,
MoafiatRonevesht = p.MoafiatRonevesht ?? "",
MoafiatStatus = p.MoafiatStatus == FileStatus.UnderReview.ToString() ? "در حال بررسی" : p.MoafiatStatus == FileStatus.Confirmed.ToString() ? "تایید نهایی" : "",
MoafiatCreatorID = p.MoafiatCreator != null ? p.MoafiatCreator.LastName : "",
MoafiatCreationDate = p.MoafiatCreationDate ?? "",
MoafiatLastModifierID = p.MoafiatLastModifier != null ? p.MoafiatLastModifier.LastName : "",
MoafiatLastModification = p.MoafiatLastModification ?? "",
p.File.LastFileEducationID
};
return result3.Where(p => !chkLastFileEducation.Checked || p.LastFileEducationID == p.ID).ToList();
}
else if (radTabResult.SelectedIndex == 4)//FileEducationSarbazi
{
var result4 = from p in dc.FileEducations
where (txtFileNo.Text == string.Empty || p.File.FileNo == Convert.ToInt32("0" + txtFileNo.Text))
where (cboHarfParvande.SelectedValue == "" || p.File.FileHarfID == Convert.ToInt32("0" + cboHarfParvande.SelectedValue))
where (!nationalCodeList.Any() || nationalCodeList.Contains(p.File.NationalCode))
where (txtIdentNo.Text == string.Empty || p.File.IdentNum == txtIdentNo.Text)
where (cboSex.SelectedValue == "-1" || p.File.SexID == Convert.ToInt32(cboSex.SelectedValue))
where (txtFName.Text == string.Empty || p.File.FirstName.Replace(" ", "").Contains(txtFName.Text.Replace(" ", "")))
where (txtLName.Text == string.Empty || p.File.LastName.Replace(" ", "").Contains(txtLName.Text.Replace(" ", "")))
where (txtFatherName.Text == string.Empty || p.File.FatherName.Replace(" ", "").Contains(txtFatherName.Text.Replace(" ", "")))
where (this.University.Count == 0 || this.University.Contains(p.UniversityID))
where (this.UniversityType.Count == 0 ||
(p.UniversityID != null && this.UniversityType.Contains(p.University.ParentItemID)) ||
(p.University.HierarchyParentItem != null && this.UniversityType.Contains(p.University.HierarchyParentItem.ParentItemID)))
where (this.AcademicField.Count == 0 ||
this.AcademicField.Contains(p.AcademicFieldID) ||
(p.AcademicFieldID != null && this.AcademicField.Contains(p.AcademicField.ParentItemID)) ||
(p.AcademicField.HierarchyParentItem != null && this.AcademicField.Contains(p.AcademicField.HierarchyParentItem.ParentItemID)))
where (this.EducationLevel.Count == 0 || this.EducationLevel.Contains(p.EducationLevelID))
where (cboStatus.SelectedValue == "-1" || p.StatusID == Convert.ToInt32(cboStatus.SelectedValue))
where (cboReshtehTahsili.SelectedValue == "-1" || p.AcademicField.ParentItemID == Convert.ToInt32(cboReshtehTahsili.SelectedValue))
where (txtStartDate3.Text == string.Empty || p.FinishDate.CompareTo(txtStartDate3.Text) >= 0)
where (txtFinishDate3.Text == string.Empty || p.FinishDate.CompareTo(txtFinishDate3.Text) <= 0)
where (txtReceiveDate_Start.Text == string.Empty || p.ReceiveDate.Substring(0, 10).CompareTo(txtReceiveDate_Start.Text) >= 0)
where (txtReceiveDate_End.Text == string.Empty || p.ReceiveDate.Substring(0, 10).CompareTo(txtReceiveDate_End.Text) <= 0)
where (this.SarbaziNoe.Count == 0 || this.SarbaziNoe.Contains(p.SarbaziNoeID))
where (this.SarbaziNoeKhedmat.Count == 0 || this.SarbaziNoeKhedmat.Contains(p.SarbaziNoeKhedmatID))
where (!chkTarhElzam.Checked || p.SarbaziTarhElzamAzTarikh != "")
where (txtStartDate4.Text == string.Empty || p.SarbaziTarikhAmrie.CompareTo(txtStartDate4.Text) >= 0)
where (txtFinishDate4.Text == string.Empty || p.SarbaziTarikhAmrie.CompareTo(txtFinishDate4.Text) <= 0)
where (txtStartDate5.Text == string.Empty || p.SarbaziPayeKhedmati.CompareTo(txtStartDate5.Text) >= 0)
where (txtFinishDate5.Text == string.Empty || p.SarbaziPayeKhedmati.CompareTo(txtFinishDate5.Text) <= 0)
//let fieldPath = dc.HirarchyFullPath(p.AcademicFieldID)
orderby p.File.LastName, p.File.FirstName
select new
{
p.FileID,
p.File.FirstName,
p.File.LastName,
p.File.IdentNum,
p.File.FatherName,
p.File.NationalCode,
p.File.FileNo,
FileHarfID = p.File.FileHarf != null ? p.File.FileHarf.Dsc : "",
ReligionID = p.File.Religion != null ? p.File.Religion.Dsc : "",
NationalityID = p.File.Nationality != null ? p.File.Nationality.Dsc : "",
MarriageStatusID = p.File.MarriageStatus != null ? p.File.MarriageStatus.Dsc : "",
SexID = p.File.Sex.Dsc,
p.File.FormerLastName,
p.File.IssuancePlaceNamex,
p.File.BirthDate,
p.File.ChildCount,
p.File.PostalCode,
p.File.Address,
p.File.Phone,
p.File.Mobile,
p.File.Email,
p.File.DepartureDate,
p.File.TarhDepartureDuration,
p.File.TadavomDepartureDuration,
p.File.TadavomCovid19DepartureDuration,
p.File.AllTadavomDepartureDuration,
p.File.TotalDepartureDuration,
p.File.SarbaziDuration,
TotalTarhDepartureDuration = (p.File.TotalDepartureDuration ?? 0) - (p.File.SarbaziDuration ?? 0),
p.ID,
AcademicFieldID = p.AcademicField != null ? p.AcademicField.Dsc : "",
AcademicFieldGroup = GetAcademicFieldGroup(p.AcademicField.Path),
EducationLevelID = p.EducationLevel != null ? p.EducationLevel.Dsc : "",
EducationGerayeshID = p.EducationGerayesh != null ? p.EducationGerayesh.Dsc : "",
UniversityID = p.UniversityID != null ? (p.University.HierarchyParentItem.Dsc + " " + p.University.Dsc) : "",
UniversityTypeID = p.UniversityID != null ? p.University.HierarchyParentItem.Dsc : "",
LevelTypeID = p.LevelType != null ? p.LevelType.Dsc : "",
EducationTypeID = p.EducationType != null ? p.EducationType.Dsc : "",
SahmiyeID = p.Sahmiye != null ? p.Sahmiye.Dsc : "",
TarafTahodID = p.TarafTahod != null ? p.TarafTahod.Dsc : "",
TahodTypeID = p.TahodTypeID != null ? p.TahodType.Dsc : "",
GraduationCountryID = p.GraduationCountry != null ? p.GraduationCountry.Dsc : "",
NoeEtebarArzeshnameID = p.NoeEtebarArzeshname != null ? p.NoeEtebarArzeshname.Dsc : "",
BoursieID = p.Boursie != null ? p.Boursie.Dsc : "",
DoreTakmiliID = p.DoreTakmili != null ? p.DoreTakmili.Dsc : "",
EstefadeArzDolatiID = p.EstefadeArzDolati != null ? p.EstefadeArzDolati.Dsc : "",
PardakhtShahrieID = p.PardakhtShahrie != null ? p.PardakhtShahrie.Dsc : "",
TasvieDaneshgahID = p.TasvieDaneshgah != null ? p.TasvieDaneshgah.Dsc : "",
FormerEducationLevelID = p.FormerEducationLevel != null ? p.FormerEducationLevel.Dsc : "",
FormerAcademicFieldID = p.FormerAcademicField != null ? p.FormerAcademicField.Dsc : "",
StatusID = p.Status != null ? p.Status.Dsc : "",
p.ReceiveDate,
p.StartDate,
p.FinishDate,
p.Average,
p.NamGhanon,
p.ModatTahod,
p.SamaaDsc,
p.Dsc,
p.ModatEstefadeArzDolati,
p.TedadVahed,
p.TarikhEtebarArzeshname,
p.FormerGraduationDate,
SarbaziNoeID = p.SarbaziNoe != null ? p.SarbaziNoe.Dsc : "",
SarbaziNoeKhedmatID = p.SarbaziNoeKhedmat != null ? p.SarbaziNoeKhedmat.Dsc : "",
SarbaziNoeMoafiatID = p.SarbaziNoeMoafiat != null ? p.SarbaziNoeMoafiat.Dsc : "",
p.SarbaziKasrKhedmat,
p.SarbaziMahKasrKhedmat,
p.SarbaziRozKasrKhedmat,
p.SarbaziDore,
p.SarbaziShomareAmrie,
p.SarbaziTarikhAmrie,
p.SarbaziPayeKhedmati,
p.SarbaziMoafiatDate,
TarhElzam = p.SarbaziTarhElzamAzTarikh != "" ? "بله" : "خیر",
p.File.LastFileEducationID
};
return result4.Where(p => !chkLastFileEducation.Checked || p.LastFileEducationID == p.ID).ToList();
}
return null;
}