Example #1
0
        public IActionResult SetOfferedServiceStatus(int offeredServiceId)
        {
            var oldStatus = _offeredServiceLogic.GetOfferedServiceById(offeredServiceId).Status;

            _offeredServiceLogic.SetStatus(offeredServiceId, oldStatus);

            return(RedirectToAction("ViewOfferedService", "Admin", new { offeredServiceId = offeredServiceId }));
        }
Example #2
0
        public IActionResult SetOfferedServiceStatus(int offeredServiceId)
        {
            int oldStatus = _offeredServiceLogic.GetOfferedServiceById(offeredServiceId).Status;

            _offeredServiceLogic.SetStatus(offeredServiceId, oldStatus);

            string newStatus = oldStatus == 0 ? "Inactive" : "Active";

            ViewData["IsSet" + newStatus] = true;

            return(RedirectToAction("MyOfferedService", "Profile", new { myOfferedServiceId = offeredServiceId }));
        }