示例#1
0
        public async Task <IActionResult> GetPayRollLedgerView(long payRollLedgerId)
        {
            PayRollLedgerModule invMod = new PayRollLedgerModule();

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

            return(Ok(view));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }