public frmEmpresa() { InitializeComponent(); _context = new LifesysContext(); EditUf.DisplayMember = "_value"; EditUf.ValueMember = "_id"; EditUf.DataSource = Enum.GetNames(typeof(Uf)).Select(u => new { _id = (int)Enum.Parse(typeof(Uf), u), _value = u }).ToList(); AtualizaFiltro(); AlternaBotoes(GridEmpresa.Rows.Count == 0); }
public frmFornecedor() { InitializeComponent(); _context = new LifesysContext(); EditEmpresa.DisplayMember = "NomeFantasia"; EditEmpresa.ValueMember = "Id"; EditEmpresa.DataSource = _context.Empresas.ToList(); EditTipoInscricao.DisplayMember = "_value"; EditTipoInscricao.ValueMember = "_id"; EditTipoInscricao.DataSource = Enum.GetNames(typeof(TipoInscricao)).Select(u => new { _id = (int)Enum.Parse(typeof(TipoInscricao), u), _value = u }).ToList(); AtualizaFiltro(); AlternaBotoes(GridFornecedor.Rows.Count == 0); }
public void VerificaEmpresa() { _context = new LifesysContext(); Assert.IsFalse(_context.Empresas.Any()); }
public frmPrincipal() { InitializeComponent(); _context = new LifesysContext(); }