public void PreencheDadosEmployee(Employee employee) { lblEmployeeId.Text = UtilConvert.ToString(employee.EmployeeId); //lblWords.Text = UtilConvert.ToString(employee.Words); //lblWordsLanguage.Text = UtilConvert.ToString(employee.WordsLanguage); lblArchiveId.Text = UtilConvert.ToString(employee.ArchiveId); picProfilePhoto.Image = UtilImage.ByteToImage(new Archive { ArchiveId = employee.ArchiveId }.ObterPorCod().Blob); uiTxtPNome.Text = UtilConvert.ToString(employee.FirstName); uiTxtUNome.Text = UtilConvert.ToString(employee.LastName); uiTxtDataNasc.Text = UtilConvert.ToString(employee.DateBirth.ToString("dd/MM/yyyy")); uiTxtSexo.Text = UtilConvert.ToString(employee.Gender); uiTxtCPF.Text = UtilConvert.ToString(employee.CPF); uiTxtRG.Text = UtilConvert.ToString(employee.RG); uiTxtEmail.Text = UtilConvert.ToString(employee.Email); uiTxtLogradouro.Text = UtilConvert.ToString(employee.StreetLine); //uiPanelEndereco.Text = UtilConvert.ToString("0"); uiTxtBairro.Text = UtilConvert.ToString(employee.Neighborhood); uiTxtPais.Text = UtilConvert.ToString(employee.Country); uiTxtCidade.Text = UtilConvert.ToString(employee.City); uiTxtEstado.Text = UtilConvert.ToString(employee.Region); uiTxtNumero.Text = UtilConvert.ToString(employee.Number); uiTxtCep.Text = UtilConvert.ToString(employee.PostCode); uiTxtTelCel.Text = UtilConvert.ToString(employee.MobileNumber); uiTxtTelFixo.Text = UtilConvert.ToString(employee.PhoneNumber); btnCriar.Visible = false; btnCancelar.Visible = true; btnAtualizar.Visible = true; uiTxtCPF.ReadOnly = true; }
private void CreateUserPanel(Employee employee, FlowLayoutPanel flowLayoutPanel) { uiPanel uiPanel = new uiPanel(); uiPanel.Name = "pnlEmployee" + employee.EmployeeId; uiPanel.Size = new Size(221, 86); uiPanel.PanelRadius = 5; uiPanel.Tag = employee.EmployeeId; uiPanel.BackColor = Color.FromArgb(215, 223, 255); uiPanel.Click += new EventHandler(Employee_Click); PictureBox pictureBox = new PictureBox(); pictureBox.Name = "picEmployee" + employee.EmployeeId; pictureBox.Size = new Size(77, 77); pictureBox.Image = UtilImage.ByteToImage(new Archive { ArchiveId = employee.ArchiveId }.ObterPorCod().Blob); pictureBox.SizeMode = PictureBoxSizeMode.StretchImage; pictureBox.Tag = employee.EmployeeId; pictureBox.BackColor = Color.Transparent; uiPanel.Controls.Add(pictureBox); pictureBox.Location = new Point(4, 4); pictureBox.Click += new EventHandler(Employee_Click); Label label = new Label(); label.Name = "lblEmployee" + employee.EmployeeId; label.Font = new Font("Gadugi", 14, FontStyle.Bold); label.ForeColor = Color.FromArgb(80, 63, 153); label.Tag = employee.EmployeeId; label.BackColor = Color.FromArgb(242, 245, 255); label.Text = employee.FirstName + " " + employee.LastName; label.AutoEllipsis = true; label.AutoSize = false; label.Size = new Size(133, 21); uiPanel.Controls.Add(label); label.Location = new Point(85, 6); label.Click += new EventHandler(Employee_Click); Label labelCPF = new Label(); labelCPF.Name = "lblEmployeeCPF" + employee.EmployeeId; labelCPF.Font = new Font("Gadugi", 8); labelCPF.ForeColor = Color.FromArgb(180, 182, 194); labelCPF.BackColor = Color.FromArgb(242, 245, 255); labelCPF.Text = UtilConvert.ToString(employee.CPF); labelCPF.AutoEllipsis = true; labelCPF.Tag = employee.EmployeeId; labelCPF.AutoSize = false; labelCPF.Size = new Size(131, 14); uiPanel.Controls.Add(labelCPF); labelCPF.Location = new Point(87, 27); labelCPF.Click += new EventHandler(Employee_Click); flowLayoutPanel.Controls.Add(uiPanel); //flowLayoutPanel.Controls.Add(uiPanelEmployee); }
public frmBase() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.None; RoundedForm roundedForm = new RoundedForm(this, pnlBackground); //Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width - 3, Height - 3, 20, 20)); //pnlBackground.Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, pnlBackground.Width, pnlBackground.Height, 20, 20)); UtilChangePanel.MudarConteudo(pnlConteudo, new uctBase()); lblNome.Text = AppDesktop.ActualEmployee.FirstName + " " + AppDesktop.ActualEmployee.LastName; picProfilePhoto.Image = UtilImage.ByteToImage(AppDesktop.ActualArchive.Blob); }
private void uiFlowPanelMoedas_ParentChanged(object sender, EventArgs e) { List <Cryptocurency> cryptocurrencys = new Cryptocurency().ObterTodos(); foreach (Cryptocurency cryptocurrency in cryptocurrencys) { uiPicture uiPicture = uiPicture1; uiPicture.BackgroundImage = UtilImage.ByteToImage(new Archive() { ArchiveId = cryptocurrency.ArchiveId }.ObterPorCod().Blob); uiPicture.Tag = UtilConvert.ToString(cryptocurrency.CryptocurrencyId); //uiPicture.Click += new EventHandler(UiPicture_Click); uiPicture.Visible = true; uiFlowPanelMoedas.Controls.Add(uiPicture); } }
public void PreencheDadosCryptocurrency(Cryptocurency cryptocurency) { newImage = false; picCriptocurrency.Image = UtilImage.ByteToImage(new Archive { ArchiveId = cryptocurency.ArchiveId }.ObterPorCod().Blob); lblCryptocurrencyId.Text = UtilConvert.ToString(cryptocurency.CryptocurrencyId); lblArchiveId.Text = UtilConvert.ToString(cryptocurency.ArchiveId); uiTxtCriptocurrency.Text = UtilConvert.ToString(cryptocurency.Name); uiTxtCryptocurrencyBalance.Text = UtilConvert.ToString(cryptocurency.CryptocurrencyBalance); uiTxtCryptocurrencyUnit.Text = UtilConvert.ToString(cryptocurency.CryptocurrencyUnit); uiTxtDescription.Text = UtilConvert.ToString(cryptocurency.Description); uiTxtCryptocurrencyBase.Text = UtilConvert.ToString(cryptocurency.Base); uiTxtCryptocurrencyBalance.ReadOnly = true; uiTxtCryptocurrencyUnit.ReadOnly = true; btnCriar.Visible = false; btnAtualizar.Visible = true; }