public static int GetFieldIndex(string field) { int fieldIndex = 0; using (TechCareerFair.DAL.FieldDAL.FieldDatabaseDataService ds = new FieldDAL.FieldDatabaseDataService()) { List <field> fields = ds.Read(); foreach (field f in fields) { if (f.Name.ToLower().Trim() == field.ToLower().Trim()) { fieldIndex = f.FieldID; break; } } } return(fieldIndex); }
public void Dispose() { _fields = null; _ds = null; }