public sp_SAP_WarehouseStockAvailability_Result WarehouseBatches(string itemcode)
 {
     using (var ctx = new DevEntities())
     {
         return(ctx.sp_SAP_WarehouseStockAvailability(itemcode).FirstOrDefault());
     }
 }
Ejemplo n.º 2
0
        public static sp_SAP_WarehouseStockAvailability_Result WarehouseStockCheck(string itemcode, decimal invquantity)
        {
            using (var ctx = new DevEntities())
            {
                var fromwhs = ctx.sp_SAP_WarehouseStockAvailability(itemcode)
                              .Where(x => x.AVAILQTY.Value >= invquantity)
                              .OrderBy(x => x.PRIORITY)
                              .FirstOrDefault();

                return(fromwhs);
            }
        }