public bool ManageActivity(ServiceActivitiesDto _manageActivity) { //var _ServiceActivity = _context.ServiceActivities.Where(s => s.Id == _manageActivity.Id).FirstOrDefault(); //bool _IsSave = false; //if (_ServiceActivity != null) //{ // if (_ServiceActivity.OLA_15mins != _manageActivity.OLA_15mins) // { // _ServiceActivity.OLA_15mins = _manageActivity.OLA_15mins; // _IsSave = true; // } // else if (_ServiceActivity.OLA_30mins != _manageActivity.OLA_30mins) // { // _ServiceActivity.OLA_30mins = _manageActivity.OLA_30mins; // _IsSave = true; // } // else if (_ServiceActivity.OLA_day != _manageActivity.OLA_day) // { // _ServiceActivity.OLA_day = _manageActivity.OLA_day; // _IsSave = true; // } // if (_IsSave == true) // { // _context.SaveChanges(); // return true; // } //} return(false); }
public IActionResult ManageActivity([FromBody] ServiceActivitiesDto _manageActivityDto) { if (_manageActivityDto != null) { var returndata = _admin.ManageActivity(_manageActivityDto); if (returndata != true) { return(BadRequest()); } } else { return(BadRequest()); } return(Ok("True")); }