// GET: StudentSearch
        public ActionResult ReportWithOutPaging(string strStartDate, string strEndDate)
        {
            StudentSearchReportViewModel objEntity = new StudentSearchReportViewModel();
            //    Install-Package PagedList.Mvc
            if (  !string.IsNullOrEmpty( strStartDate) && !string.IsNullOrEmpty(strEndDate))
            {

                objEntity.StartDate = Convert.ToDateTime(strStartDate);
                objEntity.EndDate = Convert.ToDateTime(strEndDate);

                var objStudentRepository = new StudentSearchReportRepository();
                objEntity.StudentViewModelList = new List<StudentSearchReportViewModel>();

                objEntity.StudentViewModelList = objStudentRepository.Search(StudentFlags.SelectAllByReport.GetHashCode(), objEntity);

                if (objEntity.StudentViewModelList.Count == 0)
                {

                }
            }
            else
            {
                objEntity.StartDate = DateTime.Now;
                objEntity.EndDate = DateTime.Now;
                objEntity.StudentViewModelList = new List<StudentSearchReportViewModel>();

            }

            return View(objEntity);
        }
        public List<StudentSearchReportViewModel> Search(int flag, StudentSearchReportViewModel entity)
        {
            var objEntityList = new List<StudentSearchReportViewModel>();
            try
            {
                Database objDB = base.GetDatabase();
                // Create a suitable command type and add the required parameter.
                using (DbCommand sprocCmd = objDB.GetStoredProcCommand(SPS_STUDENT_VIEWMODEL_REPORT))
                {

                    objDB.AddInParameter(sprocCmd, COLUMN_NAME_FLAG, DbType.String, flag);
                    objDB.AddInParameter(sprocCmd, COLUMN_NAME_STARTDATE, DbType.DateTime, entity.StartDate);

                    objDB.AddInParameter(sprocCmd, COLUMN_NAME_ENDDATE, DbType.DateTime, entity.EndDate);

                    using (IDataReader reader = objDB.ExecuteReader(sprocCmd))
                    {
                        while (reader.Read())
                        {
                            var objEntityViewModel = new StudentSearchReportViewModel();

                            objEntityViewModel.Id = reader.GetColumnValue<int>(COLUMN_NAME_ID);
                            objEntityViewModel.Name = reader.GetColumnValue<string>(COLUMN_NAME_NAME);

                            objEntityViewModel.Age = reader.GetColumnValue<int>(COLUMN_NAME_AGE);
                            objEntityViewModel.DOB = reader.GetColumnValue<DateTime>(COLUMN_NAME_DOB);
                            objEntityViewModel.Gender = reader.GetColumnValue<GenderEnum>(COLUMN_NAME_GENDER);

                            if (objEntityViewModel != null)
                            {
                                objEntityList.Add(objEntityViewModel);
                            }
                        }
                    }

                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
            }
            return objEntityList;
        }