Exemplo n.º 1
0
 /**************************************************************************************************/
 private void FollowupListChanged(HraListChangedEventArgs e)
 {
     if (e.hraOperand != null)
     {
         PtFollowup theFollowup = (PtFollowup)e.hraOperand;
     }
 }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            PtFollowup newFollowup        = new PtFollowup(task);
            HraModelChangedEventArgs args = new HraModelChangedEventArgs(null);

            args.Persist = false;
            task.FollowUps.AddToList(newFollowup, args);
        }
Exemplo n.º 3
0
        public PtFollowupRow(PtFollowup ptFollowup)
        {
            this.ptFollowup = ptFollowup;
            InitializeComponent();

            foreach (User u in SessionManager.Instance.MetaData.Users)
            {
                this.who.Items.Add(u);
            }

            UIUtils.fillComboBoxFromLookups(cboFollowupType, "tblFollowup", "FollowupType", true);
            UIUtils.fillComboBoxFromLookups(cboFollowupDisposition, "tblFollowup", "FollowupDisposition", true);
            UIUtils.fillComboBoxFromLookups(cboFollowupNoReason, "tblFollowup", "noApptReason", true);

            FillControls();
        }
Exemplo n.º 4
0
        /**************************************************************************************************/

        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;
                }
            }
        }