Ejemplo n.º 1
0
 public AgendaConfirmBox(CommentModel comment, AgendaComentarioBox comentarioBox)
 {
     InitializeComponent();
     Comment       = comment;
     ComentarioBox = comentarioBox;
     this.CenterToScreen();
 }
Ejemplo n.º 2
0
        private void LoadClientData(string Client)
        {
            model = GlobalConfig.Connection.GetClient_ByClientID(int.Parse(Client))[0];
            labelNameField.Text   = $"{ model.FirstName } { model.LastName }";
            labelIDField.Text     = model.ClientID.ToString();
            labelMobileField.Text = model.PhoneNumber.ToString();

            List <CommentModel> comments = GlobalConfig.Connection.GetComment_ByClientID(model.ClientID);

            foreach (CommentModel comment in comments)
            {
                Form form = new AgendaComentarioBox(comment, this);
                form.Name            = $"form_{model.ClientID}";
                form.Dock            = DockStyle.Top;
                form.TopLevel        = false;
                form.FormBorderStyle = FormBorderStyle.None;

                panelGroup.Controls.Add(form);
                this.Tag = form;
                form.BringToFront();
                form.Show();

                Panel margin = new Panel();
                margin.Size      = new Size(50, 3);
                margin.BackColor = Color.FromArgb(1, 225, 225, 225);
                margin.Dock      = DockStyle.Top;
                panelGroup.Controls.Add(margin);
                margin.BringToFront();
                margin.Show();
            }
        }