Esempio n. 1
0
        public async Task <IActionResult> GetPayRollGroupView(long payRollGroupId)
        {
            PayRollGroupModule invMod = new PayRollGroupModule();

            PayRollGroupView view = await invMod.PayRollGroup.Query().GetViewById(payRollGroupId);

            return(Ok(view));
        }
Esempio n. 2
0
        public async Task <IActionResult> DeletePayRollGroup([FromBody] PayRollGroupView view)
        {
            PayRollGroupModule invMod       = new PayRollGroupModule();
            PayRollGroup       payRollGroup = await invMod.PayRollGroup.Query().MapToEntity(view);

            invMod.PayRollGroup.DeletePayRollGroup(payRollGroup).Apply();

            return(Ok(view));
        }
Esempio n. 3
0
        public async Task <IActionResult> UpdatePayRollGroup([FromBody] PayRollGroupView view)
        {
            PayRollGroupModule invMod = new PayRollGroupModule();

            PayRollGroup payRollGroup = await invMod.PayRollGroup.Query().MapToEntity(view);


            invMod.PayRollGroup.UpdatePayRollGroup(payRollGroup).Apply();

            PayRollGroupView retView = await invMod.PayRollGroup.Query().GetViewById(payRollGroup.PayRollGroupId);


            return(Ok(retView));
        }
Esempio n. 4
0
        public async Task <IActionResult> AddPayRollGroup([FromBody] PayRollGroupView view)
        {
            PayRollGroupModule invMod = new PayRollGroupModule();

            NextNumber nnPayRollGroup = await invMod.PayRollGroup.Query().GetNextNumber();

            view.PayRollGroupNumber = nnPayRollGroup.NextNumberValue;

            PayRollGroup payRollGroup = await invMod.PayRollGroup.Query().MapToEntity(view);

            invMod.PayRollGroup.AddPayRollGroup(payRollGroup).Apply();

            PayRollGroupView newView = await invMod.PayRollGroup.Query().GetViewByNumber(view.PayRollGroupNumber);


            return(Ok(newView));
        }