示例#1
0
        public List <BuySellDoc> SalesOrderFor(string userId)
        {
            Customer customer = CustomerBiz.GetEntityFor(UserId);

            customer.IsNullThrowException("Customer");

            List <BuySellDoc> salesOrderList = FindAll().Where(x => x.CustomerId == customer.Id).ToList();

            return(salesOrderList);
        }
示例#2
0
        public override async Task <IList <ICommonWithId> > GetListForIndexAsync(ControllerIndexParams parms)
        {
            Customer customer = CustomerBiz.GetEntityFor(UserId);

            customer.IsNullThrowException("Customer");

            IList <ICommonWithId> lst = await base.GetListForIndexAsync(parms);

            if (lst.IsNullOrEmpty())
            {
                return(null);
            }

            IList <BuySellDoc> buySellDocLst = lst.Cast <BuySellDoc>().ToList();

            buySellDocLst.IsNullOrEmptyThrowException();
            IList <BuySellDoc> buySellDocLst_Filtered = buySellDocLst.Where(x => x.CustomerId == customer.Id).ToList();
            var lstIcommonwithId = buySellDocLst_Filtered.Cast <ICommonWithId>().ToList();

            return(lstIcommonwithId);
            //now just get the sales orders
        }