public string ActionApproved(List <Guid> selectedIds) { using (var context = new VnrHrmDataContext()) { string message = string.Empty; var unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); var repo = new Cat_HDTJobTypePriceRepository(unitOfWork); var lstHDTJobTypePrices = repo.FindBy(m => m.ID != null && selectedIds.Contains(m.ID)).ToList(); foreach (var HDTJobTypePrice in lstHDTJobTypePrices) { HDTJobTypePrice.Status = HDTJobStatus.E_APPROVE.ToString(); } repo.SaveChanges(); message = NotificationType.Success.ToString(); return(message); } }
public string ActionApproved(List<Guid> selectedIds) { using (var context = new VnrHrmDataContext()) { string message = string.Empty; var unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); var repo = new Cat_HDTJobTypePriceRepository(unitOfWork); var lstHDTJobTypePrices = repo.FindBy(m => m.ID != null && selectedIds.Contains(m.ID)).ToList(); foreach (var HDTJobTypePrice in lstHDTJobTypePrices) { HDTJobTypePrice.Status = HDTJobStatus.E_APPROVE.ToString(); } repo.SaveChanges(); message = NotificationType.Success.ToString(); return message; } }