Esempio n. 1
0
        public TermModel ReadTermInformation(string branchId, string termCode)
        {
            var intTerm = termCode.ToInt();

            if (!intTerm.HasValue)
            {
                return(null);
            }

            var term = _repo.Read(t => t.BranchId.Equals(branchId) && t.TermCode.Equals(intTerm.Value)).FirstOrDefault();

            if (term == null)
            {
                return(null);
            }

            return(new TermModel()
            {
                BranchId = term.BranchId, TermCode = term.TermCode, Description = term.Description, Age1 = term.Age1, Age2 = term.Age2, Age3 = term.Age3, Age4 = term.Age4
            });
        }