Example #1
0
        public async Task <bool> CreateTraSpend(SpendData json)
        {
            SpendModel spend = new SpendModel(this._context);
            //var spendObj = JsonSerializer.Deserialize<SpendData>(json); // JSONからオブジェクトにデシリアライズ
            //bool result = await spend.InsertTraSpend(spendObj);
            bool result = await spend.InsertTraSpend(json);

            return(result);
        }
Example #2
0
        public async Task <bool> UpdateTraSpend([FromBody] string json)
        {
            SpendModel spend    = new SpendModel(this._context);
            var        spendObj = JsonSerializer.Deserialize <SpendData>(json); // JSONからオブジェクトにデシリアライズ

            bool result = await spend.UpdateTraSpend(spendObj);

            return(result);
        }
        public async Task <ActionResult <IEnumerable <Mst_Spend> > > GetTraIncome()
        {
            SpendModel spend = new SpendModel(this._context);

            return(await spend.GetMst_SpendAsync());
        }
Example #4
0
        public async Task <ActionResult <IEnumerable <Tra_Spending> > > GetTraSpend()
        {
            SpendModel spend = new SpendModel(this._context);

            return(await spend.GetSpendAsync());
        }