public static int GetPrevSituationItemForm(string PrevSituation) { HasYouWorked hasYouWorkObj = (HasYouWorked)Enum.Parse(typeof(HasYouWorked), PrevSituation); switch (hasYouWorkObj) { case HasYouWorked.WorkRegisteredBeforeBorn: return(3493); case HasYouWorked.WasFired: return(3493); case HasYouWorked.ImMEI: return(3495); case HasYouWorked.PayedFormByMyOn: return(3707); case HasYouWorked.NoWorkedRegisteredBeforeBorn: return(3491); case HasYouWorked.NeverWorked: return(3489); default: return(0); } }
public bool CheckQualifieNoBornQuestionForm(QualifiedLead form) { YouAre youAreObj = (YouAre)Enum.Parse(typeof(YouAre), form.Situation); HasYouWorked hasYouWorkObj = (HasYouWorked)Enum.Parse(typeof(HasYouWorked), form.PrevSituation); ReceivedWorkInsurances receivedWorkInsurancesObj = ReceivedWorkInsurances.Empty; if (form.SegJobReceive != null) { if (!form.SegJobReceive.Equals("")) { receivedWorkInsurancesObj = (ReceivedWorkInsurances)Enum.Parse(typeof(ReceivedWorkInsurances), form.SegJobReceive); } } // Check Situation condition if ((youAreObj == YouAre.PregnantFirstChild || youAreObj == YouAre.PregnantChildLessFiveYears || youAreObj == YouAre.PregnantChildMoreFiveYears) && (hasYouWorkObj == HasYouWorked.WorkRegisteredBeforeBorn || hasYouWorkObj == HasYouWorked.PayedFormByMyOn || hasYouWorkObj == HasYouWorked.ImMEI)) { return(true); } else if ((youAreObj == YouAre.PregnantFirstChild || youAreObj == YouAre.PregnantChildLessFiveYears || youAreObj == YouAre.PregnantChildMoreFiveYears) && hasYouWorkObj == HasYouWorked.WasFired) { if (receivedWorkInsurancesObj == ReceivedWorkInsurances.No || receivedWorkInsurancesObj == ReceivedWorkInsurances.Yes) { return(true); } } return(false); }
public bool CheckQualifieBornQuestionForm(QualifiedLead form) { YouAre youAreObj = (YouAre)Enum.Parse(typeof(YouAre), form.Situation); HasYouWorked hasYouWorkObj = HasYouWorked.Empty; ReceivedWorkInsurances receivedWorkInsurancesObj = ReceivedWorkInsurances.Empty; if (form.SegJobReceive != null) { if (!form.SegJobReceive.Equals("")) { receivedWorkInsurancesObj = (ReceivedWorkInsurances)Enum.Parse(typeof(ReceivedWorkInsurances), form.SegJobReceive); } } if (form.PrevSituation != null) { if (!form.PrevSituation.Equals("")) { hasYouWorkObj = (HasYouWorked)Enum.Parse(typeof(HasYouWorked), form.PrevSituation); } } if (youAreObj == YouAre.MotherChildMoreFiveYears) { return(false); } if (youAreObj == YouAre.MotherChildLessFiveYears && (hasYouWorkObj == HasYouWorked.PayedFormByMyOn || hasYouWorkObj == HasYouWorked.ImMEI)) { return(true); } if (youAreObj == YouAre.MotherChildLessFiveYears && hasYouWorkObj == HasYouWorked.WorkRegisteredBeforeBorn) { if (receivedWorkInsurancesObj == ReceivedWorkInsurances.No || receivedWorkInsurancesObj == ReceivedWorkInsurances.Yes) { return(true); } } return(false); }
public static string GetPrevSituationItemFormStart(string PrevSituation) { HasYouWorked hasYouWorkObj = (HasYouWorked)Enum.Parse(typeof(HasYouWorked), PrevSituation); return(GetDescription <HasYouWorked>(hasYouWorkObj)); }