Esempio n. 1
0
 public FrmListado()
 {
     InitializeComponent();
     DgvListado.DataSource = null;
     principals.Clear();
     principals            = service.Consultar();
     DgvListado.DataSource = principals;
 }
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     DgvListado.DataSource = null;
     principals.Clear();
     principals            = service.Consultar();
     DgvListado.DataSource = principals;
 }
        public FrmListado()
        {
            InitializeComponent();
            var connectionString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;

            service = new PrincipalService(connectionString);
            DgvListado.DataSource = null;
            principals.Clear();
            principals            = service.Consultar();
            DgvListado.DataSource = principals;
        }