Example #1
0
        public async Task <IActionResult> GetPayRollCurrentPaySequenceView(long payRollCurrentPaySequenceId)
        {
            PayRollCurrentPaySequenceModule invMod = new PayRollCurrentPaySequenceModule();

            PayRollCurrentPaySequenceView view = await invMod.PayRollCurrentPaySequence.Query().GetViewById(payRollCurrentPaySequenceId);

            return(Ok(view));
        }
Example #2
0
        public async Task <IActionResult> DeletePayRollCurrentPaySequence([FromBody] PayRollCurrentPaySequenceView view)
        {
            PayRollCurrentPaySequenceModule invMod = new PayRollCurrentPaySequenceModule();
            PayRollCurrentPaySequence       payRollCurrentPaySequence = await invMod.PayRollCurrentPaySequence.Query().MapToEntity(view);

            invMod.PayRollCurrentPaySequence.DeletePayRollCurrentPaySequence(payRollCurrentPaySequence).Apply();

            return(Ok(view));
        }
Example #3
0
        public async Task <IActionResult> AddPayRollCurrentPaySequence([FromBody] PayRollCurrentPaySequenceView view)
        {
            PayRollCurrentPaySequenceModule invMod = new PayRollCurrentPaySequenceModule();

            NextNumber nnPayRollCurrentPaySequence = await invMod.PayRollCurrentPaySequence.Query().GetNextNumber();

            view.PayRollCurrentPaySequenceNumber = nnPayRollCurrentPaySequence.NextNumberValue;

            PayRollCurrentPaySequence payRollCurrentPaySequence = await invMod.PayRollCurrentPaySequence.Query().MapToEntity(view);

            invMod.PayRollCurrentPaySequence.AddPayRollCurrentPaySequence(payRollCurrentPaySequence).Apply();

            PayRollCurrentPaySequenceView newView = await invMod.PayRollCurrentPaySequence.Query().GetViewByNumber(view.PayRollCurrentPaySequenceNumber);


            return(Ok(newView));
        }