public string[] RetrieveTermenePastrare(string subfond = null) { return(Dosare .Where(dat => (subfond == null ? true : dat.Subfond == subfond)) .Select(data => data.TermenPastrare) .Distinct() .ToArray()); }
public string[] RetrieveCompartimente(string subfond = null) { return(Dosare .Where(dat => (subfond == null ? true : dat.Subfond == subfond)) .Select((data) => data.DirectiaCompartiment) .Distinct() .ToArray()); }
public int[] RetrieveAniInceput(string compartiment = null, string termenPastrare = null) { return(Dosare .Where(data => ((compartiment != null) ? data.Compartiment == compartiment : true) && ((termenPastrare != null) ? data.TermenPastrare == termenPastrare : true)) .Select(data => data.AnInceput) .Distinct() .OrderBy(integer => integer) .ToArray()); }
public CentralizatorData RetrieveFiltered(string compartiment, string termenPastrare, int an, string subfond = null) { return(new CentralizatorData() { Dosare = Dosare .Where(data => data.Compartiment == compartiment && data.TermenPastrare == termenPastrare && data.AnInceput == an && (subfond != null ? data.Subfond == subfond : true)) .OrderBy(data => ConvertUAToInt(data.NrUA)) .ToList(), DateFirma = DateFirma }); }