コード例 #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));
        }
コード例 #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));
        }
コード例 #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));
        }
コード例 #4
0
        public IEnumerable <ListReleaseInvoice> GetByAcc(int acc)
        {
            var spec = ListReleaseInvoiceQuery.WithByAccountId(acc);

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

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