Ejemplo n.º 1
0
        //using for active and deactive user
        public void SetStatusTruck(string id)
        {
            var truckToRemove = _truckRepository.Get(c => c.TruckC == id);

            if (truckToRemove.IsActive == Constants.ACTIVE)
            {
                truckToRemove.IsActive = Constants.DEACTIVE;
            }
            else
            {
                truckToRemove.IsActive = Constants.ACTIVE;
            }

            _truckRepository.Update(truckToRemove);

            SaveTruck();
        }