public frmPagamentos() { InitializeComponent(); splitContainer.Panel2Collapsed = true; dgvPagamentos.FormatColumn("Grupo", null, 100); dgvPagamentos.FormatColumn("Categoria", null, 200); dgvPagamentos.FormatColumn("SubCategoria", null, 150); dgvPagamentos.FormatColumn("Descrição", null, 150); dgvPagamentos.FormatColumn("Dia", dgvPagamentos.StyleInteger, 50); dgvPagamentos.FormatColumn("Valor", dgvPagamentos.StyleCurrency, 80); for (var col = 7; col < dgvPagamentos.ColumnCount; col++) { dgvPagamentos.Columns[col].Width = 50; } ResizeForm(dgvPagamentos); chkbtnMeses.BackgroundColorChecked = Color.LightGreen; chkbtnMeses.CheckedChanged += (sender, args) => { foreach (var control in CheckBoxesMeses) { control.Visible = chkbtnMeses.Checked; } }; comboBoxGrupo.Items.AddRange(ClassifTools.GetListOfGrupos(-1).ToArray()); ImportToolStrip(toolStripPagamentos); _ctx.Pagamentos.Load(); bsPagamentos.DataSource = _ctx.Pagamentos.Local.ToBindingList(); _mainBindingSource = bsPagamentos; EnableSaveButtons(); }
private void PopulateGrupos() { comboBoxGrupo.Items.Clear(); comboBoxGrupo.Items.AddRange(ClassifTools.GetListOfGrupos(dgvExtrato).ToArray()); }