public static void UpdateMainList(IndeedDetails fromFiltered, ref BindingList<IndeedDetails> mainList) { foreach (IndeedDetails item in mainList) { if(item.jk == fromFiltered.jk) { item.Copy(fromFiltered); } } }
public Boolean FilterExperience(string html, int years, IndeedDetails job) { int count = 0; bool accept = true; List<String> listOfStrings = new List<String>(); if (html.IndexOf("interns") < 0 && html.IndexOf("Page Unavailable") < 0) { foreach (string keyword in experience_keywords) { if (html.IndexOf(keyword) > -1) { Stringsearch(html, keyword, ref listOfStrings); } //if keyword } //for loop through keywords //for loop through ENUM of years written out foreach (var curr_year in Years) { if (html.IndexOf(curr_year) > -1) { Stringsearch(html, curr_year, ref listOfStrings); } //if keyword } } else { accept = false; }//if interns Console.WriteLine("Company: "+job.cmp); Console.WriteLine("Checking for numerical (int) years..."); while(count < listOfStrings.Count && accept == true) { accept = FilterYearsOfExp(listOfStrings[count], years); Console.WriteLine("listOfStrings[" + count + "]: " + listOfStrings[count] + ", accpet: " + accept); count++; } count = 0; if (!accept) { string strYear = IntYeartoString(years); Console.WriteLine("Checking for numerical (string) years..."); while (count < listOfStrings.Count && accept == true) { accept = FilterYearsOfExp(listOfStrings[count], strYear); Console.WriteLine("listOfStrings[" + count + "]: " + listOfStrings[count] + ", accpet: " + accept); count++; } } Console.WriteLine("Company: " + job.cmp + " accept? " + accept); return accept; }
public void Copy(IndeedDetails item) { this.applied = item.applied; this.city = item.city; this.clearance = item.clearance; this.cmp = item.cmp; this.cmpesc = item.cmpesc; this.cmpid = item.cmpid; this.cmplnk = item.cmplnk; this.country = item.country; this.efccid = item.efccid; this.jk = item.jk; this.levelOfInterest = item.levelOfInterest; this.loc = item.loc; this.locid = item.locid; this.num = item.num; this.qualified = item.qualified; this.rd = item.rd; this.srcid = item.srcid; this.srcname = item.srcname; this.title = item.title; this.url = item.url; this.viewed = item.viewed; this.zip = item.zip; }