Exemplo n.º 1
0
        public async Task <IActionResult> GetPayRollLedgerView(long payRollLedgerId)
        {
            PayRollLedgerModule invMod = new PayRollLedgerModule();

            PayRollLedgerView view = await invMod.PayRollLedger.Query().GetViewById(payRollLedgerId);

            return(Ok(view));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> DeletePayRollLedger([FromBody] PayRollLedgerView view)
        {
            PayRollLedgerModule invMod        = new PayRollLedgerModule();
            PayRollLedger       payRollLedger = await invMod.PayRollLedger.Query().MapToEntity(view);

            invMod.PayRollLedger.DeletePayRollLedger(payRollLedger).Apply();

            return(Ok(view));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> UpdatePayRollLedger([FromBody] PayRollLedgerView view)
        {
            PayRollLedgerModule invMod = new PayRollLedgerModule();

            PayRollLedger payRollLedger = await invMod.PayRollLedger.Query().MapToEntity(view);


            invMod.PayRollLedger.UpdatePayRollLedger(payRollLedger).Apply();

            PayRollLedgerView retView = await invMod.PayRollLedger.Query().GetViewById(payRollLedger.PayRollLedgerId);


            return(Ok(retView));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> AddPayRollLedger([FromBody] PayRollLedgerView view)
        {
            PayRollLedgerModule invMod = new PayRollLedgerModule();

            NextNumber nnPayRollLedger = await invMod.PayRollLedger.Query().GetNextNumber();

            view.PayRollLedgerNumber = nnPayRollLedger.NextNumberValue;

            PayRollLedger payRollLedger = await invMod.PayRollLedger.Query().MapToEntity(view);

            invMod.PayRollLedger.AddPayRollLedger(payRollLedger).Apply();

            PayRollLedgerView newView = await invMod.PayRollLedger.Query().GetViewByNumber(view.PayRollLedgerNumber);


            return(Ok(newView));
        }