Exemple #1
0
        public async Task <ActionResult> Modify(int _stockReceiveDocketId, [FromBody] StockReceiveDocketTypeModel _model)
        {
            string link = URI_API.STOCK_RECEIVE_DOCKET_TYPE_MODIFY.Replace("{id}", $"{_stockReceiveDocketId}");
            ResponseConsult <bool> response = await PutAsJsonAsync <bool>(link, _model);

            return(Ok(response));
        }
Exemple #2
0
        public async Task <ActionResult> Add([FromBody] StockReceiveDocketTypeModel _model)
        {
            string link = URI_API.STOCK_RECEIVE_DOCKET_TYPE_ADD;
            ResponseConsult <int> response = await PostAsJsonAsync <int>(link, _model);

            return(Ok(response));
        }
Exemple #3
0
        public async Task <bool> Modify(int _id, StockReceiveDocketTypeModel _model)
        {
            StockReceiveDocketType entity = await svcStockReceiveDocketType.GetDetail(_id);

            if (entity == null)
            {
                return(false);
            }
            entity = iMapper.Map(_model, entity);
            return(await svcStockReceiveDocketType.Modify(entity));
        }
        public async Task <IActionResult> Modify(int _id, [FromBody] StockReceiveDocketTypeModel _model)
        {
            var result = await busStockReceiveDocketType.Modify(_id, _model);

            return(Ok(context.WrapResponse(result)));
        }
Exemple #5
0
        public async Task <int> Add(StockReceiveDocketTypeModel _model)
        {
            StockReceiveDocketType entity = iMapper.Map <StockReceiveDocketType>(_model);

            return(await svcStockReceiveDocketType.Add(entity));
        }