Пример #1
0
 public async Task DeleteMSPPayPeriod(long Id)
 {
     try
     {
         await Task.Run(() => ManageMSPPayPeriods.DeleteMSPPayPeriod(Id));
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Пример #2
0
        public async Task <MSPPayPeriodViewModel> GetMSPPayPeriod(long Id)
        {
            try
            {
                tblMSPPayPeriod res = await Task.Run(() => ManageMSPPayPeriods.GetMSPPayPeriod(Id));

                return(res.ConvertToMSPPayPeriodViewModel());
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #3
0
        public async Task <List <MSPPayPeriodViewModel> > GetMSPPayPeriods()
        {
            try
            {
                List <tblMSPPayPeriod> res = await Task.Run(() => ManageMSPPayPeriods.GetMSPPayPeriods());

                return(res.Select(pp => pp.ConvertToMSPPayPeriodViewModel()).ToList());
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #4
0
        public async Task <MSPPayPeriodViewModel> UpdateMSPPayPeriod(MSPPayPeriodViewModel data)
        {
            try
            {
                tblMSPPayPeriod model = await Task.Run(() => ManageMSPPayPeriods.UpdateMSPPayPeriod(data.ConvertTotblMSPPayPeriod()));

                return(model.ConvertToMSPPayPeriodViewModel());
            }
            catch (Exception ex)
            {
                throw;
            }
        }