public MainResponse UpdateClassExhibitorScratch(ClassExhibitorScratch classExhibitorScratch, string actionBy) { var classExhibitor = _exhibitorClassRepositor.GetSingle(x => x.ExhibitorClassId == classExhibitorScratch.ExhibitorClassId && x.IsDeleted == false); if (classExhibitor != null) { classExhibitor.IsScratch = classExhibitorScratch.IsScratch; classExhibitor.ModifiedBy = actionBy; classExhibitor.ModifiedDate = DateTime.Now; if (classExhibitorScratch.IsScratch == true) { classExhibitor.ScratchDate = DateTime.Now; } _exhibitorClassRepositor.Update(classExhibitor); _mainResponse.Success = true; _mainResponse.Message = Constants.CLASS_EXHIBITOR_SCRATCH; } else { _mainResponse.Success = false; _mainResponse.Message = Constants.NO_RECORD_FOUND; } return(_mainResponse); }
public IActionResult UpdateClassExhibitorScratch(ClassExhibitorScratch classExhibitorScratch) { string actionBy = User.Identity.Name; _mainResponse = _classService.UpdateClassExhibitorScratch(classExhibitorScratch, actionBy); _jsonString = Mapper.Convert <BaseResponse>(_mainResponse); return(new OkObjectResult(_jsonString)); }