public List <Chuyen> FindByCodeTourAndStatus(int _tourCode, int _status) { if (List == null) { List = Chuyen.All(); } return(List.FindAll(delegate(Chuyen t){ return t.MTour == _tourCode && t.TrangThai == _status; })); }
public Chuyen Single(int code) { if (List == null) { List = Chuyen.All(); } return(List.Find(delegate(Chuyen t) { return t.MChuyen == code; })); }
public List <Chuyen> FindByCodeTour(int _tourCode) { if (List == null) { List = Chuyen.All(); } return(List.FindAll(delegate(Chuyen t) { return t.MTour == _tourCode; })); }
public List <Chuyen> FindByStatus(int _status) { if (List == null) { List = Chuyen.All(); } return(List.FindAll(delegate(Chuyen t) { return t.TrangThai == _status; })); }
public List <Chuyen> FindByLessThanPrice(double _price) { List <Chuyen> result = new List <Chuyen>(); if (List == null) { List = Chuyen.All(); } result = List.FindAll(delegate(Chuyen t) { return(t.Gia <= _price); }); IOrderedEnumerable <Chuyen> temp = result.OrderByDescending(x => x.Gia); result = new List <Chuyen>(); foreach (Chuyen item in temp) { result.Add(item); } return(result); }
public Trips() { List = new List <Chuyen>(); List = Chuyen.All(); }