Пример #1
0
        public async Task <DbStatusResult> UpdatePrankCallCost(PrankCallCostModel entity)
        {
            var cmd = new DbStatusCommand();

            await ExecuteSQLWithParams("[dbo].UpdatePrankCallCost",
                                       GetJsonParam("@PrankCallCost", entity),
                                       cmd.IdParam,
                                       cmd.StatusParam,
                                       cmd.MessageParam);

            return(cmd.StatusResult);
        }
        public async Task <ActionResult <ResponseModel> > AddPrankCallCost([FromBody] PrankCallCostModel prankCallCost)
        {
            var model  = new ResponseModel();
            var result = await _dataContext.AddPrankCallCost(prankCallCost);

            if (!result.Status)
            {
                model.StatusCode = 404;
                model.Message    = result.Message;
            }
            else
            {
                model.StatusCode = 200;
                var objPrankCostLst = await _dataContext.GetPrankCallCostListByPram(string.Empty).ToListAsync();

                if (objPrankCostLst != null)
                {
                    model.ResponseObject = objPrankCostLst;
                }
            }
            return(model);
        }