public JsonResult GetOccupation(string prefix) { AIA.Life.Models.Opportunity.Suspect objSuspect = new Suspect(); objSuspect.Prefix = prefix; objSuspect = objProspectBusiness.LoadOccupation(objSuspect);; List <string> LstOccupation = objSuspect.LstOccupation.Where(a => a.Text.ToUpper().Contains(prefix.ToUpper())).OrderByDescending(a => a.Text.ToUpper().StartsWith(prefix.ToUpper())).Select(a => a.Text).Distinct().ToList(); return(Json(objSuspect.LstOccupation, JsonRequestBehavior.AllowGet)); }
public AIA.Life.Models.Opportunity.Suspect LoadOccupation(AIA.Life.Models.Opportunity.Suspect objSuspect) { AIA.Life.Business.Prospect.ProspectBusiness objProspectBusiness = new AIA.Life.Business.Prospect.ProspectBusiness(); objSuspect = objProspectBusiness.LoadOccupation(objSuspect); return(objSuspect); }