public string DeleteStudentPayment(DeleteStudentPayment obj) { var returnModel = (dynamic)null; var StudentPayment = _StudentPaymentsRepo.Get(obj.StudentPaymentId); if (StudentPayment != null) { _StudentPaymentsRepo.Delete(StudentPayment); returnModel = "Delete Successful."; } return(returnModel); }
public JsonResult DeleteStudentPayment(long StudentPaymentId) { var result = (dynamic)null; string message = (dynamic)null; try { var model = new DeleteStudentPayment() { StudentPaymentId = StudentPaymentId }; message = _StudentPaymentsServ.DeleteStudentPayment(model); result = Json(new { success = true, Message = message }); } catch (Exception ex) { result = Json(new { success = false, Message = "ERROR101:StudentPayments/UpdateStudentPayment - " + ex.Message }); } return(result); }