// GET: Softwares public ActionResult Index() { var softwares = db.Softwares.Include(s => s.PurchaseOrder).Include(s => s.Status); List <SoftwareVM> softwareList = new List <SoftwareVM>(); foreach (Software s in softwares) { SoftwareVM sVM = new SoftwareVM(); sVM.ID = s.ID; sVM.SoftwareName = s.Name; sVM.TotalLicNo = s.LicenseNo; sVM.PONumber = s.PurchaseOrder.PO_Number; if (s.Name.Contains("Office")) { sVM.UsedLicNo = db.Assignments.Where(a => a.SoftwareID == s.ID).Count(); } else if (s.Name.Contains("Visio")) { sVM.UsedLicNo = db.Assignments.Where(a => a.VisioID == s.ID).Count(); } softwareList.Add(sVM); } return(View(softwareList)); }
public bool GetDatabaseBackup() { return(SoftwareVM.GetDatabaseBackup()); }