public OpenHROrganisation(int organisationId, OpenHR001Organisation organisation, OpenHRLocation[] locations, OpenHRUser[] users)
 {
     OrganisationId = organisationId;
     Organisation   = organisation;
     Locations      = locations;
     Users          = users;
 }
Пример #2
0
        private void AddVerticalUserPanel(Session session)
        {
            OpenHRUser            user         = session.User;
            OpenHR001Organisation organisation = session.Organisation.Organisation;

            tableLayoutPanel1.CreateColumn(new ColumnStyle(SizeType.Absolute, 200F));
            Panel panel = CreateVerticalPanel(user.Person.GetCuiDisplayName(), " at " + organisation.name);

            foreach (Slot slot in session.Slots)
            {
                Panel outer = new Panel()
                {
                    Height  = 100,
                    Dock    = DockStyle.Top,
                    Padding = new Padding(10, 10, 10, 0)
                };

                Panel p = new Panel()
                {
                    Dock             = DockStyle.Fill,
                    BackColor        = Color.White,
                    ContextMenuStrip = _contextMenuStrip,
                    Tag = slot
                };

                if (slot.Patient != null)
                {
                    Control c = CreateBookedPatientControl(slot.Patient);
                    p.Controls.Add(c);
                }

                outer.Controls.Add(p);
                panel.Controls.Add(outer);
                outer.BringToFront();
            }

            tableLayoutPanel1.Controls.Add(panel, (tableLayoutPanel1.ColumnCount - 1), 0);
        }