private void btLogIn_Click(object sender, EventArgs e) { linqxmlDataContext asd = new linqxmlDataContext(); //bool contains = tbl.AsEnumerable() // .Any(row => searchAuthor == row.Field<String>("Author")); var pass = (from c in asd.User where c.Name == tbName.Text select c.Password ).firstordefault }
private void button1_Click(object sender, EventArgs e) { linqxmlDataContext context = new linqxmlDataContext(); var customers = from c in context.customers where c.ExpDate != null select new { Név = c.Name, Lejárat = c.ExpDate }; foreach (var customer in customers) { listBox1.Text += customer.Név + "\r\n"; listBox1.Items.Add(customer.Név); } dataGridView1.DataSource = customers; }