public ActionResult ChangeStudentReportStatus(FormCollection formValues) { GetStudentStatusReport(); string changedStatus = formValues["Status"]; bool changedReportStatus; if (changedStatus == "false") { changedReportStatus = false; } else { changedReportStatus = true; } if (changedReportStatus == report_Status) { ViewData["result"] = "Student report current status is Already " + changedReportStatus.ToString() + "."; } else { IStudentReportStatusService reportStatus = new StudentReportStatusService(); reportStatus.UpdateStudentStatusReport(changedReportStatus); ViewData["result"] = "Successfully change report status for all student."; } GetStudentStatusReport(); return(View("StudentReportStatus")); }
public void GetStudentStatusReport() { IStudentReportStatusService reportStatus = new StudentReportStatusService(); bool studentReporStatus = reportStatus.GetStudentStatusReport(); if (studentReporStatus) { ViewData["studentReportStatus"] = "Currently student report status is enable."; report_Status = true; } else { ViewData["studentReportStatus"] = "Currently student report status is disable."; report_Status = false; } }
public void Get_Student_Report_Status_From_Serivce() { IStudentReportStatusService reportStatus = new StudentReportStatusService(); Assert.IsNotNull(reportStatus.GetStudentStatusReport()); }