Esempio n. 1
0
        public List <ReportDepot> ReportDepot(int depid, string category, string m, int less, int big)
        {
            var list = _stockoutRepository.ReportDepot();

            if (depid != 0)
            {
                list = list.Where(p => p.depotId == depid);
            }
            if (category != "" && category != "0")
            {
                list = list.Where(p => p.materialCategory == category);
            }
            if (m != "")
            {
                list = list.Where(p => p.materialName.Contains(m) || p.materialModel.Contains(m) || p.materialUnit.Contains(m) || p.materialNo.Contains(m));
            }
            if (less != -404)
            {
                list = list.Where(p => p.amout >= less);
            }
            if (big != -404)
            {
                list = list.Where(p => p.amout < big);
            }
            return(list.ToList());
        }