Example #1
0
        public IEnumerable <ListReleaseInvoice> GetByAccTemp(int acc, string temp)
        {
            var spec = ListReleaseInvoiceQuery.WithByAccountId(acc);

            spec = spec.And(ListReleaseInvoiceQuery.WithByTemplateCode(temp));
            return(_listReleaseInvoice.Find(spec));
        }
Example #2
0
        public IEnumerable <ListReleaseInvoice> GetByTemplateId(string tempCode, int accountId = -1)
        {
            var spec = ListReleaseInvoiceQuery.WithByTemplateid(tempCode);

            spec = accountId != -1 ? spec.And(ListReleaseInvoiceQuery.WithByAccountId(accountId)) : spec;


            return(_listReleaseInvoice.Find(spec));
        }
Example #3
0
        public IEnumerable <ListReleaseInvoice> GetAllListReleaseInvoice(out int totalRecords,
                                                                         int currentPage = 1,
                                                                         int pageSize    = 25,
                                                                         string sortBy   = "Id",
                                                                         bool descending = true)
        {
            var spec = ListReleaseInvoiceQuery.WithAll();

            totalRecords = _listReleaseInvoice.Count(spec);
            var sort = Context.Filters.Sort <ListReleaseInvoice, int>(ti => ti.Id, true);

            switch (sortBy)
            {
            case "Id":
                sort = Context.Filters.Sort <ListReleaseInvoice, int>(ti => ti.Id, descending);
                break;

            default:
                break;
            }
            var pager = Context.Filters.Page <ListReleaseInvoice>(currentPage, pageSize);

            return(_listReleaseInvoice.Find(spec, sort, pager));
        }
Example #4
0
        public IEnumerable <ListReleaseInvoice> GetByAcc(int acc)
        {
            var spec = ListReleaseInvoiceQuery.WithByAccountId(acc);

            return(_listReleaseInvoice.Find(spec));
        }
Example #5
0
        public IEnumerable <ListReleaseInvoice> GetByNo(string no)
        {
            var spec = ListReleaseInvoiceQuery.WithByNo(no);

            return(_listReleaseInvoice.Find(spec));
        }
Example #6
0
 public ListReleaseInvoice GetById(int id)
 {
     return(_listReleaseInvoice.One(ListReleaseInvoiceQuery.WithById(id)));
 }