// // GET: /Issue/Create /// <summary> /// Gets all required Data for the create view /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Create(String id) { student student = db.students.Single(i => i.studentid == id); issue issue = new issue() { studentid = id, date = DateTime.Now }; program program = db.programs.Single(i => i.programcode == student.programcode); 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()); } CreateIssueRequestModel model = new CreateIssueRequestModel() { _issue = issue, _student = student, _program = program, _catagory = catagory, _employee = employees }; return View(model); }
private void Fixupissue(issue previousValue) { if (IsDeserializing) { return; } if (previousValue != null && previousValue.applicationForTermOrCompleteProgramWithdrawals.Contains(this)) { previousValue.applicationForTermOrCompleteProgramWithdrawals.Remove(this); } if (issue != null) { if (!issue.applicationForTermOrCompleteProgramWithdrawals.Contains(this)) { issue.applicationForTermOrCompleteProgramWithdrawals.Add(this); } issueid = issue.issueid; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("issue") && (ChangeTracker.OriginalValues["issue"] == issue)) { ChangeTracker.OriginalValues.Remove("issue"); } else { ChangeTracker.RecordOriginalValue("issue", previousValue); } if (issue != null && !issue.ChangeTracker.ChangeTrackingEnabled) { issue.StartTracking(); } } }
private void Fixupissue(issue previousValue) { if (IsDeserializing) { return; } if (previousValue != null && previousValue.probationaryContractPlans.Contains(this)) { previousValue.probationaryContractPlans.Remove(this); } if (issue != null) { if (!issue.probationaryContractPlans.Contains(this)) { issue.probationaryContractPlans.Add(this); } issueid = issue.issueid; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("issue") && (ChangeTracker.OriginalValues["issue"] == issue)) { ChangeTracker.OriginalValues.Remove("issue"); } else { ChangeTracker.RecordOriginalValue("issue", previousValue); } if (issue != null && !issue.ChangeTracker.ChangeTrackingEnabled) { issue.StartTracking(); } } }
private void Fixupissue(issue previousValue) { if (IsDeserializing) { return; } if (previousValue != null && previousValue.part_timeAnd_orAdditionalCourseRegistrationForm.Contains(this)) { previousValue.part_timeAnd_orAdditionalCourseRegistrationForm.Remove(this); } if (issue != null) { if (!issue.part_timeAnd_orAdditionalCourseRegistrationForm.Contains(this)) { issue.part_timeAnd_orAdditionalCourseRegistrationForm.Add(this); } issueid = issue.issueid; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("issue") && (ChangeTracker.OriginalValues["issue"] == issue)) { ChangeTracker.OriginalValues.Remove("issue"); } else { ChangeTracker.RecordOriginalValue("issue", previousValue); } if (issue != null && !issue.ChangeTracker.ChangeTrackingEnabled) { issue.StartTracking(); } } }