예제 #1
0
        public EditarParticipante(long id)
        {
            InitializeComponent();
            comboBoxSexo.Items.AddRange(ESexo.Values());
            comboBoxEscolaridade.Items.AddRange(EEscolaridade.Values());

            participante = ParticipanteService.GetById(id);
            CarregarCampos();
        }
예제 #2
0
        public MenuInicial()
        {
            InitializeComponent();

            List <ContingenciaInstrucional> CIs = ContingenciaInstrucionalService.GetAll();
            List <ContingenciaColateral>    CCs = ContingenciaColateralService.GetAll();
            List <Sessao> sessoes = SessaoService.GetAll();

            comboBoxSexo.Items.AddRange(ESexo.Values());
            comboBoxEscolaridade.Items.AddRange(EEscolaridade.Values());
            comboBoxCI.Items.AddRange(CIs.Cast <object>().ToArray());
            comboBoxCI.DisplayMember = "Nome";
            comboBoxCC.Items.AddRange(CCs.Cast <object>().ToArray());
            comboBoxCC.DisplayMember = "Nome";

            listViewCI.Items.AddRange(CIs.Select(it => {
                var item = new ListViewItem(it.Nome);
                item.SubItems.Add(it.Id.ToString());
                return(item);
            }).Cast <ListViewItem>().ToArray());

            listViewCC.Items.AddRange(CCs.Select(it => {
                var item = new ListViewItem(it.Nome);
                item.SubItems.Add(it.Id.ToString());
                return(item);
            }).Cast <ListViewItem>().ToArray());

            listViewSessoes.Items.AddRange(sessoes.Select(it => {
                var item = new ListViewItem(it.Nome);
                item.SubItems.Add(it.Id.ToString());
                return(item);
            }).Cast <ListViewItem>().ToArray());

            Image pactolo = new Bitmap(Pactolo.Properties.Resources.Pactolo);

            picturePactolo.Image = ImageUtils.Resize(pactolo, picturePactolo.Width, picturePactolo.Height);

            if (this.Width > width)
            {
                this.Width = width;
            }
            if (this.Height + 70 > height)
            {
                this.Height = height - 70;
            }
        }