public IEnumerable <T> Get <T>(params IListParameter[] parameter) { using (Repository = new PayrollItemRepository()) { var data = Repository.Get(parameter); return(data as IEnumerable <T>); } }
public override IEnumerable <T> Get <T>(int start, int limit, string sort, string dir, out int totalCount, params IListParameter[] parameter) { using (Repository = new PayrollItemRepository()) { var data = Repository.Get(start, limit, sort, dir, out totalCount, parameter); return(data as IEnumerable <T>); } }
public void Delete(int id) { using (Repository = new PayrollItemRepository()) { Message = DeleteSuccessMessage; Repository.Delete(id); } }
public void Update(IPayrollItemModel businessModel) { using (Repository = new PayrollItemRepository()) { Message = UpdateSuccessMessage; Repository.Update(businessModel); } }
public void Save(IPayrollItemModel businessModel) { using (Repository = new PayrollItemRepository()) { Message = SaveSuccessMessage; Repository.Save(businessModel); } }
public IEnumerable <T> Get <T>(params IListParameter[] parameter) where T : IPayrollItemModel { using (Repository = new PayrollItemRepository()) { var data = Repository.Get <T>(parameter); return(data); } }
public void Save <T>(T businessModel) where T : IPayrollGroupModel { using (Entities = new kk_sp_payrollEntities()) { OpenConnection(); using (var transaction = Entities.Connection.BeginTransaction(TRANSACTION_ISOLATION)) { var payrollGroupRepository = new PayrollGroupRepository(Entities); payrollGroupRepository.Save(businessModel); var itemRepository = new PayrollItemRepository(Entities); foreach (var payrollItemModel in businessModel.ListPayrollItemModel) { payrollItemModel.PayrolGroupId = businessModel.Id; itemRepository.Save(payrollItemModel); } transaction.Commit(); CloseConnection(); payrollGroupRepository.Dispose(); itemRepository.Dispose(); } } }