/**************************************************************************************************/ private void FollowupListLoaded(HraListLoadedEventArgs e) { //if (task.FollowUps.Count == 0) //{ // if (task.Task_Type == "Patient Followup" || task.Task_Type == "To Do") // { // PtFollowup newFollowup = new PtFollowup(task); // HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); // args.Persist = false; // task.FollowUps.AddToList(newFollowup, args); // } //} //else //{ foreach (PtFollowup theFollowup in task.FollowUps.OrderBy(f => ((PtFollowup)f).Date)) { PtFollowupRow ptr = new PtFollowupRow(theFollowup); ptr.SetScrollState(false); ptr.Width = FollowupFlowPanel.Width - 30; FollowupFlowPanel.Controls.Add(ptr); } //} }
/**************************************************************************************************/ private void FollowupListChanged(HraListChangedEventArgs e) { if (e.hraOperand != null) { PtFollowup theFollowup = (PtFollowup)e.hraOperand; switch (e.hraListChangeType) { case HraListChangedEventArgs.HraListChangeType.ADD: PtFollowupRow ptr = new PtFollowupRow(theFollowup); ptr.Width = FollowupFlowPanel.Width - 30; FollowupFlowPanel.Controls.Add(ptr); FollowupFlowPanel.Controls.SetChildIndex(ptr, 0); //SetSplitterDist(ptr.Height + ptr.Margin.Top); break; case HraListChangedEventArgs.HraListChangeType.DELETE: Control doomed = null; foreach (Control row in FollowupFlowPanel.Controls) { PtFollowupRow r = (PtFollowupRow)row; if (r.GetFollowup() == theFollowup) { doomed = row; } } if (doomed != null) { FollowupFlowPanel.Controls.Remove(doomed); splitContainer1.SplitterDistance -= doomed.Height; } break; } } }
/**************************************************************************************************/ private void FollowupListChanged(HraListChangedEventArgs e) { if (e.hraOperand != null) { PtFollowup theFollowup = (PtFollowup) e.hraOperand; switch (e.hraListChangeType) { case HraListChangedEventArgs.HraListChangeType.ADD: PtFollowupRow ptr = new PtFollowupRow(theFollowup); ptr.Width = FollowupFlowPanel.Width - 30; FollowupFlowPanel.Controls.Add(ptr); FollowupFlowPanel.Controls.SetChildIndex(ptr, 0); //SetSplitterDist(ptr.Height + ptr.Margin.Top); break; case HraListChangedEventArgs.HraListChangeType.DELETE: Control doomed = null; foreach (Control row in FollowupFlowPanel.Controls) { PtFollowupRow r = (PtFollowupRow) row; if (r.GetFollowup() == theFollowup) { doomed = row; } } if (doomed != null) { FollowupFlowPanel.Controls.Remove(doomed); splitContainer1.SplitterDistance -= doomed.Height; } break; } } }