Exemple #1
0
        public async Task <IActionResult> GetPayRollDeductionLiabilitiesView(long payRollDeductionLiabilitiesId)
        {
            PayRollDeductionLiabilitiesModule invMod = new PayRollDeductionLiabilitiesModule();

            PayRollDeductionLiabilitiesView view = await invMod.PayRollDeductionLiabilities.Query().GetViewById(payRollDeductionLiabilitiesId);

            return(Ok(view));
        }
Exemple #2
0
        public async Task <IActionResult> DeletePayRollDeductionLiabilities([FromBody] PayRollDeductionLiabilitiesView view)
        {
            PayRollDeductionLiabilitiesModule invMod = new PayRollDeductionLiabilitiesModule();
            PayRollDeductionLiabilities       payRollDeductionLiabilities = await invMod.PayRollDeductionLiabilities.Query().MapToEntity(view);

            invMod.PayRollDeductionLiabilities.DeletePayRollDeductionLiabilities(payRollDeductionLiabilities).Apply();

            return(Ok(view));
        }
Exemple #3
0
        public async Task <IActionResult> AddPayRollDeductionLiabilities([FromBody] PayRollDeductionLiabilitiesView view)
        {
            PayRollDeductionLiabilitiesModule invMod = new PayRollDeductionLiabilitiesModule();

            NextNumber nnPayRollDeductionLiabilities = await invMod.PayRollDeductionLiabilities.Query().GetNextNumber();

            view.PayRollDeductionLiabilitiesNumber = nnPayRollDeductionLiabilities.NextNumberValue;

            PayRollDeductionLiabilities payRollDeductionLiabilities = await invMod.PayRollDeductionLiabilities.Query().MapToEntity(view);

            invMod.PayRollDeductionLiabilities.AddPayRollDeductionLiabilities(payRollDeductionLiabilities).Apply();

            PayRollDeductionLiabilitiesView newView = await invMod.PayRollDeductionLiabilities.Query().GetViewByNumber(view.PayRollDeductionLiabilitiesNumber);


            return(Ok(newView));
        }