예제 #1
0
 // GET: Products/Create
 public async Task <IActionResult> Create()
 {
     ViewData["BrandId"]  = new SelectList(await _brandServices.GetBrand(), "Id", "ShortName");
     ViewData["StockId"]  = new SelectList(await _stockServices.GetStock(), "Id", "Name");
     ViewData["SupplyId"] = new SelectList(await _userServices.GetSupply(), "Id", "SupplyName");
     return(View());
 }
        public IActionResult GetStock()
        {
            IActionResult result = null;

            try
            {
                var stock = _stockServices.GetStock();
                result = WrapResponse.ResponseOK(stock);
            }
            catch (Exception ex)
            {
                result = WrapResponse.ResponseError(null, ex.Message);
            }


            return(result);
        }