Example #1
0
        public VM.AuditReports GetAuditReports(string MRN, string startdate, string enddate)
        {
            //For getting list of AuditMrnAccessV2
            AuditMrnAccessV2 auditMrnAccessV2 = new AuditMrnAccessV2();
            auditMrnAccessV2.StartTime = Convert.ToDateTime(startdate);
            auditMrnAccessV2.EndTime = Convert.ToDateTime(enddate);
            auditMrnAccessV2.unitnum = MRN;
            auditMrnAccessV2.BackgroundListLoad();

            List<VM.AuditMrnAccessV2Entry> auditMrnAccessV2Entry = new List<VM.AuditMrnAccessV2Entry>();
            foreach (AuditMrnAccessV2Entry item in auditMrnAccessV2)
            {
                //you have to convert item to VM.V2Access model
                VM.AuditMrnAccessV2Entry a = AuditReportsMapper.ToAuditMrnAccessV2Entry(item);
                auditMrnAccessV2Entry.Add(a);

            }

            //For getting list of AuditMrnAccessV3
            AuditMrnAccessV3 auditMrnAccessV3 = new AuditMrnAccessV3();
            auditMrnAccessV3.StartTime = Convert.ToDateTime(startdate);
            auditMrnAccessV3.EndTime = Convert.ToDateTime(enddate);
            auditMrnAccessV3.unitnum = MRN;
            auditMrnAccessV3.BackgroundListLoad();

            List<VM.AuditMrnAccessV3Entry> auditMrnAccessV3Entry = new List<VM.AuditMrnAccessV3Entry>();
            foreach (AuditMrnAccessV3Entry item in auditMrnAccessV3)
            {
                //you have to convert item to VM.V2Access model
                VM.AuditMrnAccessV3Entry a = AuditReportsMapper.ToAuditMrnAccessV3Entry(item);
                auditMrnAccessV3Entry.Add(a);

            }

            VM.AuditReports reports = new VM.AuditReports();
            reports.RSAuditMrnAccessV2Entry = auditMrnAccessV2Entry;
            reports.RSAuditMrnAccessV3Entry = auditMrnAccessV3Entry;

            return reports;
        }
Example #2
0
 // GET: Reports
 public ActionResult AuditReports(VM.AuditReports models)
 {
     return(View(models));
 }