public AreaModel GetArea(string areaGUID) { AreaModel area = null; if (AreaSubsDict != null) { area = AreaSubsDict[areaGUID]; } return(area); }
public void SetDefaultAreaIfNeeded() { if (string.IsNullOrEmpty(SL.AreaGUID)) { AreaModel area = GetFirstArea(); if (area != null) { SL.AreaGUID = area.areaGUID; } } else { if (GetArea(SL.AreaGUID) == null) { AreaModel area = GetFirstArea(); SL.AreaGUID = area != null ? area.areaGUID : string.Empty; } } }
public AreaModel GetFirstArea() { AreaModel firstItem = AreaSubsList != null && AreaSubsList.Count > 0 ? AreaSubsList[0] : null;//SuggestedAreaList != null && SuggestedAreaList.Count > 0 ? SuggestedAreaList[0] : null; return(firstItem); }