public ActionResult Edit(EditIssueRequestModel model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             StringBuilder sb = new StringBuilder(model._issue.employeeid.Trim().ToUpper());
             sb.Remove(9, sb.Length - 9);
             model._issue.employeeid = sb.ToString();
             db.issues.Attach(model._issue);
             db.ObjectStateManager.ChangeObjectState(model._issue, EntityState.Modified);
             db.SaveChanges();
             return RedirectToAction("Details/" + model._issue.issueid);
         }
     }
     catch (Exception ex)
     {
         return View(model);
     }
     return View(model);
 }
 //
 // GET: /Issue/Edit/5
 /// <summary>
 /// Gets all data required for the Edit View
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult Edit(Guid id)
 {
     issue issue = db.issues.Include("student").Single(i => i.issueid == id);
     student student = db.students.Single(i => i.studentid == issue.studentid);
     program program = db.programs.Single(i => i.programcode == student.programcode);
     ViewBag.studentid = new SelectList(db.students, "studentid", "fname", issue.studentid);
     IEnumerable<catagory> catagory = db.catagories;
     IEnumerable<employee> employee = db.employees;
     List<String> employees = new List<String>();
     employees.Add("Please Select an Employee");
     foreach (employee emp in employee)
     {
         employees.Add(emp.employeeid.Trim() + " - " + emp.fname.Trim() + " " + emp.lname.Trim());
     }
     EditIssueRequestModel model = new EditIssueRequestModel() { _issue = issue, _program = program, _student = student, _catagory = catagory, _employee = employees };
     return View(model);
 }