private void TaskListLoadedForPopup(HraListLoadedEventArgs e) { RiskApps3.Model.PatientRecord.Patient p = SessionManager.Instance.GetActivePatient(); if (p != null) { Task t = new Task(p, "Task", "Pending", SessionManager.Instance.ActiveUser.ToString(), DateTime.Now); HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); args.Persist = true; p.Tasks.AddToList(t, args); TaskView tv = new TaskView(t); tv.ShowDialog(); p.Tasks.ReleaseListeners(this); RefreshQueue(); } }
private void TaskListLoaded(HraListLoadedEventArgs e) { RiskApps3.Model.PatientRecord.Patient p = SessionManager.Instance.GetActivePatient(); if (p != null) { string assignedBy = ""; if (SessionManager.Instance.ActiveUser != null) { if (string.IsNullOrEmpty(SessionManager.Instance.ActiveUser.ToString()) == false) { assignedBy = SessionManager.Instance.ActiveUser.ToString(); } } Task t = new Task(p, "Task", "Pending", assignedBy, DateTime.Now); HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); args.Persist = true; p.Tasks.AddToList(t, args); TaskView tv = new TaskView(t); tv.ShowDialog(); p.Tasks.ReleaseListeners(this); RefreshQueue(); } }