Ejemplo n.º 1
0
        public List <StockDistributionModel> GetSelectedData(Model.StockEnquiryModel searchData)
        {
            var body           = JsonConvert.SerializeObject(searchData);
            var searchDataList = ServerResponse.Invoke <List <StockDistributionModel> >("api/stockDistributions/getSelectedData", body, "POST");

            return(searchDataList);
        }
Ejemplo n.º 2
0
        public List <StockInventoryModel> GetAll(Model.StockEnquiryModel searchData)
        {
            var body       = JsonConvert.SerializeObject(searchData);
            var Searchlist = ServerResponse.Invoke <List <StockInventoryModel> >("api/stockInventory/getDetailList", body, "POST");

            return(Searchlist);
        }
Ejemplo n.º 3
0
        public IHttpActionResult GetSearchData(Model.StockEnquiryModel searchData)
        {
            var list = db.StockDistributions.Where(x => x.IsActive == true).Include(x => x.Branch).Include(x => x.Product).Include(x => x.Product.Color);

            if (searchData != null)
            {
                if (!string.IsNullOrEmpty(searchData.BranchName))
                {
                    list = list.Where(x => x.Branch.Name.Contains(searchData.BranchName));
                }
                if (!string.IsNullOrEmpty(searchData.ProductSKU))
                {
                    list = list.Where(x => x.Product.ProductSKU == searchData.ProductSKU);
                }
                if (!string.IsNullOrEmpty(searchData.StyleSKU))
                {
                    list = list.Where(x => x.Product.StyleSKU == searchData.StyleSKU);
                }
                if (!string.IsNullOrEmpty(searchData.ColorCode))
                {
                    list = list.Where(x => x.Product.Color.Code.Contains(searchData.ColorCode));
                }
            }

            return(Ok(list.ToList().RemoveReferences()));
        }