// ****************************** Start Reporting Section Code ********************************** public object BindEnquiryReport(DateTime?FromDate, DateTime?ToDate, int?SessionId, int?ClassId, int?SectionId, string EnquiryStatus, string StudentName) { using (response = new Response()) { using (dbcontext = new SchoolManagementEntities()) { try { response.success = true; var rs = dbcontext.USP_BindEnquiryReport(FromDate, ToDate, SessionId, ClassId, SectionId, EnquiryStatus, StudentName) .Select(x => new EnquiryDetailCustomModel { EnquiryId = x.EnquiryId, SessionId = x.SessionId, SessionName = x.Session, ClassId = x.ClassId, ClassName = x.Title, SectionId = x.SectionId, FName = x.StudentName, MobileNo = x.MobileNo, EmailId = x.EmailId, FatherName = x.FatherName, MotherName = x.MotherName, Village = x.Village, Address = x.Address, AadharNumber = x.AadharNumber, EnquiryDate = x.EnquiryDate, Status = x.Status, }).ToList(); return(rs); } catch (Exception ex) { response.success = false; response.message = ex.Message; return(response); } } } }