//public List<Dropdownlist> GetRenewalReportsofOrg(long OrgId) //{ // var query = _dbFirms.usp_GetOrgRenewalReports(OrgId); // List<Dropdownlist> list = new List<Dropdownlist>(); // foreach (var item in query) // { // list.Add(new Dropdownlist() // { // Value = item.RReportID, // Label = item.RReportYear.ToString(), // OptionalLabel = item.FileNo, // Selected = item.OrganizationID == OrgId ? true : false // }); // } // return list; //} // update it public List <MdlAuditReport> GetAllAuditReportsofRenewalReport(long rrid) { var query = _dbFirms.usp_GetAuditReportsofRenewalReport(rrid); List <MdlAuditReport> list = new List <MdlAuditReport>(); foreach (var item in query) { list.Add(new MdlAuditReport() { AuditReportID = item.AuditReportID, AuditReportYear = item.AuditReportYear, RenewalReport_ID = item.RenewalReport_ID, CharteredAcct = item.CharteredAcct, TotalDonation = item.TotalDonation, EntryDateString = item.EntryDate.ToShortDateString(), }); } return(list); }