Example #1
0
        public IHttpActionResult GetItemByItemRefNo(string ItemRefNo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var myItem = ItemHelper.GetItemByItemRefNo(ItemRefNo);

            return(Ok(myItem));
        }
Example #2
0
        public IHttpActionResult GetItemByItemRefNo(string ItemRefNo)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var myItem = ItemHelper.GetItemByItemRefNo(ItemRefNo);

            if (myItem == null)
            {
                return(InternalServerError());
            }
            return(Ok(myItem));
        }
Example #3
0
        public IHttpActionResult DeleteItem(string ItemCode, int Type)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            int afRecCnt = ItemHelper.DeleteItem(ItemCode, Type);

            if (afRecCnt <= 0)
            {
                return(BadRequest());
            }
            return(Ok());
        }
Example #4
0
        public IHttpActionResult SaveBarCodeItem(whit1 Item)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            int afRecCnt = ItemHelper.SaveItem(Item);

            if (afRecCnt <= 0)
            {
                return(BadRequest());
            }
            return(Ok());
        }