コード例 #1
0
 //
 // GET: /Reports/
 public ActionResult CampusIssueReport()
 {
     try
     {
         employee employee = db.employees.Single(emp => emp.employeeid == User.Identity.Name);
         String[] Programs = { "All", "Information Systems Security", "Telecommunications Technology", "Computer Programmer", "Systems Analyst", "Network Engineering", "Software Engineering" };
         CampusReportModel model = new CampusReportModel() { Program = "All", ProgList = Programs, StartDate = db.issues.OrderBy(i => i.date).First().date, EndDate = db.issues.OrderByDescending(i => i.date).First().date, User = employee.fname + " " + employee.lname };
         return View(model);
     }
     catch (Exception ex)
     {
         return View();
     }
 }
コード例 #2
0
 public ActionResult CampusIssueReport(CampusReportModel model)
 {
     try
     {
             employee employee = db.employees.Single(emp => emp.employeeid == User.Identity.Name);
             String[] Programs = { "All", "Information Systems Security", "Telecommunications Technology", "Computer Programmer", "Systems Analyst", "Network Engineering", "Software Engineering" };
             model.ProgList = Programs;
             model.User = employee.fname + " " + employee.lname;
         return View(model);
     }
     catch (Exception ex)
     {
         return View(model);
     }
 }