public ActionResult <HonorRollsAddViewModel> AddHonorRoll(HonorRollsAddViewModel honorRollsAddViewModel) { HonorRollsAddViewModel honorRollAdd = new HonorRollsAddViewModel(); try { honorRollAdd = _gradeService.AddHonorRoll(honorRollsAddViewModel); } catch (Exception es) { honorRollAdd._failure = false; honorRollAdd._message = es.Message; } return(honorRollAdd); }
public ActionResult <HonorRollsAddViewModel> DeleteHonorRoll(HonorRollsAddViewModel honorRollsAddViewModel) { HonorRollsAddViewModel honorRollDelete = new HonorRollsAddViewModel(); try { honorRollDelete = _gradeService.DeleteHonorRoll(honorRollsAddViewModel); } catch (Exception es) { honorRollDelete._failure = true; honorRollDelete._message = es.Message; } return(honorRollDelete); }
/// <summary> /// Delete Honor Roll /// </summary> /// <param name="honorRollsAddViewModel"></param> /// <returns></returns> public HonorRollsAddViewModel DeleteHonorRoll(HonorRollsAddViewModel honorRollsAddViewModel) { HonorRollsAddViewModel honorRollDelete = new HonorRollsAddViewModel(); try { if (TokenManager.CheckToken(honorRollsAddViewModel._tenantName + honorRollsAddViewModel._userName, honorRollsAddViewModel._token)) { honorRollDelete = this.gradeRepository.DeleteHonorRoll(honorRollsAddViewModel); } else { honorRollDelete._failure = true; honorRollDelete._message = TOKENINVALID; } } catch (Exception es) { honorRollDelete._failure = true; honorRollDelete._message = es.Message; } return(honorRollDelete); }