示例#1
0
 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);
     }
 }
示例#2
0
 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;
     }
 }