public AirlineCarrier Find(string CarrierId) { AirlineCarrier claim = new AirlineCarrier(); int i = 0; if (_instance == null) { _instance = new AirlineCarriers(); Load(_userid); } else { _instance.ClearItems(); } Load(_userid); while (i < _instance.Count) { if (_instance.Items[i].CarrierID == CarrierId.TrimEnd().TrimStart()) { claim = _instance.Items[i]; break; } i += 1; } return(claim); }
public AirlineCarriers List(int UserId) { if (_instance == null) { _instance = new AirlineCarriers(UserId); } Load(UserId); return(_instance); }